You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ul...@apache.org on 2021/07/15 10:05:19 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #809] [INFRA]
Support reopened PR in pr merge tool
This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new b840e37 [KYUUBI #809] [INFRA] Support reopened PR in pr merge tool
b840e37 is described below
commit b840e374c2c5c6e56cf837c5031f75e0afb8b962
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Thu Jul 15 18:05:07 2021 +0800
[KYUUBI #809] [INFRA] Support reopened PR in pr merge tool
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
Make the `dev/merge_kyuubi_pr.py` work as expected on reopened PR.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
Test passed on merge the reopened PR #807.
- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes #809 from pan3793/merge_pr.
Closes #809
fd7176f8 [Cheng Pan] [INFRA] Support reopen pr in pr merge tool
cc02b5e2 [Cheng Pan] [INFRA] Fix typo in merge_kyuubi_pr script
Authored-by: Cheng Pan <ch...@apache.org>
Signed-off-by: ulysses-you <ul...@gmail.com>
---
dev/merge_kyuubi_pr.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dev/merge_kyuubi_pr.py b/dev/merge_kyuubi_pr.py
index 763b4b5..5ca1f93 100755
--- a/dev/merge_kyuubi_pr.py
+++ b/dev/merge_kyuubi_pr.py
@@ -51,10 +51,10 @@ def get_json(url):
except HTTPError as e:
if "X-RateLimit-Remaining" in e.headers and e.headers["X-RateLimit-Remaining"] == '0':
print("Exceeded the GitHub API rate limit; see the instructions in " +
- "dev/merge_spark_pr.py to configure an OAuth token for making authenticated " +
+ "dev/merge_kyuubi_pr.py to configure an OAuth token for making authenticated " +
"GitHub requests.")
else:
- print("Unable to fetch URL, exiting: %s" % url)
+ print("Unable to fetch URL, exiting: %s" % url, e)
sys.exit(-1)
@@ -136,7 +136,7 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc):
merge_message_flags += ["-m", title]
if body is not None:
# We remove @ symbols from the body to avoid triggering e-mails
- # to people every time someone creates a public fork of Spark.
+ # to people every time someone creates a public fork of Kyuubi.
merge_message_flags += ["-m", body.replace("@", "")]
committer_name = run_cmd("git config --get user.name").strip()
@@ -252,7 +252,7 @@ def main():
# Merged pull requests don't appear as merged in the GitHub API;
# Instead, they're closed by asfgit.
merge_commits = \
- [e for e in pr_events if e["event"] == "closed"]
+ [e for e in pr_events if e["event"] == "closed" and e["commit_id"]]
if merge_commits:
merge_hash = merge_commits[0]["commit_id"]