-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-16602: [Dev] Use GitHub API to merge pull request #13184
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
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.
|
|
|
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 |
|
Good catch! |
cyb70289
left a comment
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.
+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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
|
Umm... I could merge #13228 but couldn't merge #13113... $ dev/merge_arrow_pr.py 13113
ARROW_HOME = /home/kou/work/cpp/arrow.kou/dev
PROJECT_NAME = arrow
=== Pull Request #13113 ===
title ARROW-15893: [CI][Python] Add python minimal builds to nightly builds
source raulcd/ARROW-15893-2
target master
url https://api.github.com/repos/apache/arrow/pulls/13113
=== JIRA ARROW-15893 ===
Summary [Python][CI] Exercise Python minimal build examples
Assignee Raúl Cumplido
Components Continuous Integration, Python
Status In Progress
URL https://issues.apache.org/jira/browse/ARROW-15893
Proceed with merging pull request #13113? (y/n): y
Author 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 |
|
I could merge #13237. |
|
I also got a |
|
Thanks for confirming it. It may be a GitHub API bug... I could merge #13239. |
|
Looks it's related to access token scopes. |
|
FYI, I tried enable all |
|
Looks We use the command to collect committers in release notes, maybe it's an issue need to address. |
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 |
|
I tried several PRs, looks it's ready to merge? |
|
I could merge #13269 (a minor PR) |
|
We didn't get objections on Let's merge this! |
|
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.