Uh oh!
There was an error while loading. Please reload this page.
ARROW-16602: [Dev] Use GitHub API to merge pull request - #13184
Conversation
We use local "git merge" to merge a pull request in dev/merge_arrow_pr.py. If we use "git merge" to merge a pull request, GitHub's Web UI shows "Closed" mark not "Merged" mark in a pull request page. This sometimes confuses new contributors. "Why was my pull request closed without merging?" See apache#12004 (comment) for example. If we use GitHub API https://docs.github.com/en/rest/pulls/pulls#merge-a-pull-request to merge a pull request, GitHub's Web UI shows "Merged" mark not "Closed" mark. See apache#13180 for example. I used GitHub API to merge the pull request. And we don't need to create a local branch on local repository to merge a pull request. But we must specify ARROW_GITHUB_API_TOKEN to run dev/merge_arrow_pr.py.
kou
commented
May 18, 2022
I used this to merge #13180 but I changed a bit after the merge. So we need to merge another pull request with this before we merge this. |
I could merge #12053 with this... |
Hi Kou, should we update this documentation (https://github.com/apache/arrow/blob/master/dev/README.md?plain=1#L56-L58) to specify that now |
kou
commented
May 21, 2022
Good catch! |
cyb70289
left a comment
There was a problem hiding this comment.
+1
When creating personal github access token, there are many choices can be possibily enabled in the "Select scopes" UI, do you know the necessary ones for merging PR?
https://github.com/settings/tokens/new
We need only the |
jorisvandenbossche
left a comment
There was a problem hiding this comment.
Didn't look at the code in detail, but generally looks good! (and you say it worked on a few test PRs, so that sounds good enough to give this a try)
kou
commented
May 25, 2022
Umm... I could merge #13228 but couldn't merge #13113... $ dev/merge_arrow_pr.py 13113ARROW_HOME = /home/kou/work/cpp/arrow.kou/devPROJECT_NAME = arrow=== Pull Request #13113 ===title ARROW-15893: [CI][Python] Add python minimal builds to nightly buildssource raulcd/ARROW-15893-2target masterurl https://api.github.com/repos/apache/arrow/pulls/13113=== JIRA ARROW-15893 ===Summary [Python][CI] Exercise Python minimal build examplesAssignee Raúl CumplidoComponents Continuous Integration, PythonStatus In ProgressURL https://issues.apache.org/jira/browse/ARROW-15893Proceed with merging pull request #13113? (y/n): yAuthor 1: Raúl Cumplido <raulcumplido@gmail.com>Traceback (most recent call last): File "/home/kou/work/cpp/arrow.kou/dev/merge_arrow_pr.py", line 594, in <module> cli() File "/home/kou/work/cpp/arrow.kou/dev/merge_arrow_pr.py", line 575, in cli pr.merge() File "/home/kou/work/cpp/arrow.kou/dev/merge_arrow_pr.py", line 437, in merge self.cmd.fail(f'Failed to merge pull request: {message}') File "/home/kou/work/cpp/arrow.kou/dev/merge_arrow_pr.py", line 289, in fail raise Exception(msg)Exception: Failed to merge pull request: Not Found |
kou
commented
May 26, 2022
I could merge #13237. |
raulcd
commented
May 26, 2022
I also got a |
kou
commented
May 26, 2022
Thanks for confirming it. It may be a GitHub API bug... I could merge #13239. |
cyb70289
commented
May 27, 2022
Looks it's related to access token scopes. |
cyb70289
commented
May 27, 2022
FYI, I tried enable all |
cyb70289
commented
May 27, 2022
Looks We use the command to collect committers in release notes, maybe it's an issue need to address. |
kou
commented
May 27, 2022
Wow! Thanks for the information! I could merge #13113 with |
Good catch! I've updated the command line that is used for release note. $ git shortlog -csn 'HEAD^..HEAD' 1 GitHub
$ git shortlog -sn --group=trailer:signed-off-by 'HEAD^..HEAD' 1 Sutou Kouhei
It seems that the |
cyb70289
commented
May 31, 2022
I tried several PRs, looks it's ready to merge? |
jorisvandenbossche
commented
May 31, 2022
I could merge #13269 (a minor PR) |
kou
commented
May 31, 2022
We didn't get objections on Let's merge this! |
wesm
commented
May 31, 2022
awesome! |
We use local "git merge" to merge a pull request in
dev/merge_arrow_pr.py.
If we use "git merge" to merge a pull request, GitHub's Web UI shows
"Closed" mark not "Merged" mark in a pull request page. This sometimes
confuses new contributors. "Why was my pull request closed without
merging?" See
#12004 (comment) for
example.
If we use GitHub API
https://docs.github.com/en/rest/pulls/pulls#merge-a-pull-request to
merge a pull request, GitHub's Web UI shows "Merged" mark not "Closed"
mark. See #13180 for example. I
used GitHub API to merge the pull request.
And we don't need to create a local branch on local repository to
merge a pull request. But we must specify ARROW_GITHUB_API_TOKEN to
run dev/merge_arrow_pr.py.