Almost done with the second modern-ification of th...
# development
b
Almost done with the second modern-ification of the cherry pick automation. one thing I've realized is that testing this thing SUCKS. With a decent amount of hand-holding, One can use
act
, but it isn't ideal. Do people have thoughts on porting the user-run script to JS? So cherry-picking (when it fails to auto-pick) would be
pants --no-pantsd run build-support/bin/cherry_pick_one.js -- <arg1> <arg2>
(yummy dogfood). The upside is we can actually test some common code and have code re-use.
w
JS wouldn’t be my first choice (given that we already have a lot of Python common code), but i don’t feel strongly about it
b
Ah maybe I should also clarify why I prefer JS: https://github.com/actions/github-script
w
hm. that doesn’t look very maintained… would probably be safer to stick to the core API?
b
I don't think it isn't? https://github.com/actions/github-script/commits/main shows recent activity. Also,
Used by 101k
w
it also doesn’t look like these scripts are testable/lintable, since they are a function fragment
b
w
i remain skeptical, but i won’t block.
avoiding bash is good though.
b
I can speak from current experience, this is very convenient
p
There's also https://ghapi.fast.ai/ and https://github.com/graphql-python/gql which could be used to do something similar in python. That said, JS seems to be the lingua-franca of GHA, so using it for this makes sense.
b
I'm hoping to avoid a Python script with dependencies 😅 DOn't wanna go through that cluster in CI 😛
OK I think I've boiled this down to two scripts: 1. One script for gathering the relevant milestones. The key thing is this needs to output JSON, Bash is not our friend here... ◦ But this is only relevant in CI 2. One script for making a PR given an already-existing branch. This is the one people might be running ◦ The key here is mostly copying the title, reviewers, etc... from the original PR I'm actually thinking of just making 2 a bash script. We can hand the user the arguments, and
gh
can fill in the rest...
p
JSON and Bash have been at war! The impedance mismatch between structured stdout vs line-based string stdout is often problematic.