-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: use github cli to squash the pr #57675
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't let us specify which is the commit head
@bjohansebas I think that the
|
Thanks @lpinca, I didn't really know the block very well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you delete the rm output.json
line? I don’t think we’re using it anymore
Do you know if GH_PROMPT_DISABLED is defined as an environment variable? I'm learning about how Node's CI works, and I don't know if this environment variable is set by default. |
Why do you ask? It doesn't seem that variable is listed on |
Because there may be occasions when the GitHub CLI displays prompts, adding I don't know if it makes sense to add it. |
I've tried to land a PR with $ gh pr merge 57654 --squash --body 'PR-URL: https://github.com/nodejs/node/pull/57654
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: James M Snell <[email protected]>' --subject 'doc: clarify `unhandledRejection` events behaviors in process doc' --match-head-commit c9c90f70097af0c445a92045f47a3ba3deb1cd16
X Pull request nodejs/node#57654 is not mergeable: the base branch policy prohibits the merge.
To have the pull request merged after all the requirements have been met, add the `--auto` flag.
To use administrator privileges to immediately merge the pull request, add the `--admin` flag.
$ gh pr merge 57654 --squash --body 'PR-URL: https://github.com/nodejs/node/pull/57654
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: James M Snell <[email protected]>' --subject 'doc: clarify `unhandledRejection` events behaviors in process doc' --match-head-commit c9c90f70097af0c445a92045f47a3ba3deb1cd16 --auto
GraphQL: Pull request Auto merge is not allowed for this repository (enablePullRequestAutoMerge) It looks like CLI is wrong here, the PR is definitely mergeable, not sure where it's getting that information from |
Hmm, I've tried the command several times against other repositories. Do you have GitHub CLI updated? |
$ gh --version
gh version 2.69.0 (1980-01-01)
https://github.com/cli/cli/releases/tag/v2.69.0 It's the latest version, despite being allegedly 45 years old 😅 I've asked @JakobJingleheimer to run the command for me, and it worked (he's using |
the output specifically cites |
How could this be unlocked, given that these commands perform similar tasks in principle and there shouldn't be any permission issues, since the token will be the same with my change or with the previous method |
We should try to set it up on nodejs/node-auto-test and see how it performs. I'll try to do that over the weekend |
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <[email protected]>
I tested with https://github.com/nodejs/node-auto-test/actions/runs/14282489948/job/40033645347, the CI sees the same error as I was seeing ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also update tools/actions/merge.sh
?
it now includes the |
Can you remove the mention of Line 3 in e8633dd
|
It is needed on this line Line 49 in e8633dd
|
'{merge_method:"squash",commit_title:$title,commit_message:$body,sha:$head}' > output.json | ||
cat output.json | ||
if ! gh api -X PUT "repos/${OWNER}/${REPOSITORY}/pulls/${pr}/merge" --input output.json > output; then | ||
if ! gh pr merge "$pr" --squash --body "$commit_body" --subject "$commit_title" --match-head-commit "$commit_head" --admin > output; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I was saying in https://github.com/nodejs/node/pull/57675/files#r2032046457, this command does not output anything so we can probably not use it for now :/
Now GitHub CLI allow editing the commit message when squash-merging a PR