Uh oh!
There was an error while loading. Please reload this page.
tools: use github cli to squash the pr - #57675
Conversation
nodejs-github-bot
commented
Mar 29, 2025
Review requested:
|
aduh95
left a comment
There was a problem hiding this comment.
That doesn't let us specify which is the commit head
lpinca
commented
Mar 31, 2025
@bjohansebas I think that the |
bjohansebas
commented
Apr 1, 2025
Thanks @lpinca, I didn't really know the block very well. |
aduh95
left a comment
There was a problem hiding this comment.
Can you delete the rm output.json line? I don’t think we’re using it anymore
bjohansebas
commented
Apr 1, 2025
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. |
aduh95
commented
Apr 1, 2025
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. |
aduh95
commented
Apr 1, 2025
I've tried to land a PR with $ gh pr merge 57654 --squash --body 'PR-URL: https://github.com/nodejs/node/pull/57654Reviewed-By: Luigi Pinca <luigipinca@gmail.com>Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>Reviewed-By: James M Snell <jasnell@gmail.com>' --subject 'doc: clarify `unhandledRejection` events behaviors in process doc' --match-head-commit c9c90f70097af0c445a92045f47a3ba3deb1cd16X 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/57654Reviewed-By: Luigi Pinca <luigipinca@gmail.com>Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>Reviewed-By: James M Snell <jasnell@gmail.com>' --subject 'doc: clarify `unhandledRejection` events behaviors in process doc' --match-head-commit c9c90f70097af0c445a92045f47a3ba3deb1cd16 --autoGraphQL: 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 |
bjohansebas
commented
Apr 1, 2025
Hmm, I've tried the command several times against other repositories. Do you have GitHub CLI updated? |
aduh95
commented
Apr 2, 2025
$ gh --versiongh version 2.69.0 (1980-01-01)https://github.com/cli/cli/releases/tag/v2.69.0It'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 |
bnb
commented
Apr 2, 2025
the output specifically cites |
bjohansebas
commented
Apr 3, 2025
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 |
aduh95
commented
Apr 3, 2025
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 <luigipinca@gmail.com>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#57675 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95
commented
Apr 5, 2025
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 ( |
aduh95
left a comment
There was a problem hiding this comment.
Can you please also update tools/actions/merge.sh?
bjohansebas
commented
Apr 6, 2025
it now includes the |
aduh95
commented
Apr 6, 2025
Can you remove the mention of Line 3 in e8633dd |
bjohansebas
commented
Apr 6, 2025
It is needed on this line Line 49 in e8633dd |
Uh oh!
There was an error while loading. Please reload this page.
| '{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.
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 :/
I think the best thing would be to remove the TODO and explain why github cli can't be used |
This pull request has been marked as stale due to 210 days of inactivity. |
Now GitHub CLI allow editing the commit message when squash-merging a PR