You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/06/05 13:14:26 UTC

[arrow-rs] branch master updated: Add labels to cherry pick scripts + writeup (#409)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new ddc8a36  Add labels to cherry pick scripts + writeup (#409)
ddc8a36 is described below

commit ddc8a36a1e29181d08be91518253ca86f5a6cb71
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Sat Jun 5 09:14:20 2021 -0400

    Add labels to cherry pick scripts + writeup (#409)
    
    * Add labels when cherry picking with script
    
    * fixup
    
    * document tags
    
    * add note
    
    * prettier
---
 dev/release/README.md         | 9 +++++++++
 dev/release/cherry-pick-pr.py | 9 ++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/dev/release/README.md b/dev/release/README.md
index ccddb87..d3640b7 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -249,6 +249,15 @@ git clone git@github.com:apache/arrow-rs.git /tmp/arrow-rs
 ARROW_GITHUB_API_TOKEN=$ARROW_GITHUB_API_TOKEN CHECKOUT_ROOT=/tmp/arrow-rs CHERRY_PICK_SHA=b2de5446cc1e45a0559fb39039d0545df1ac0d26 python3 dev/release/cherry-pick-pr.py
 ```
 
+## Tags
+
+There are two tags that help keep track of backporting:
+
+1. [`cherry-picked`](https://github.com/apache/arrow-rs/labels/cherry-picked) for PRs that have been cherry-picked/backported to `active_release`
+2. [`release-cherry-pick`](https://github.com/apache/arrow-rs/labels/release-cherry-pick) for the PRs that are the cherry pick
+
+You can find candidates to cherry pick using this filter: https://github.com/apache/arrow-rs/pulls?page=2&q=is%3Apr+is%3Aclosed+-label%3Arelease-cherry-pick+-label%3Acherry-picked
+
 ## Rationale for creating PRs:
 
 1. PRs are a natural place to run the CI tests to make sure there are no logical conflicts
diff --git a/dev/release/cherry-pick-pr.py b/dev/release/cherry-pick-pr.py
index 65095b6..2886a0d 100755
--- a/dev/release/cherry-pick-pr.py
+++ b/dev/release/cherry-pick-pr.py
@@ -117,11 +117,15 @@ def make_cherry_pick():
     run_cmd(['git', 'push', '-u', 'origin', new_branch])
 
 
+
 def make_cherry_pick_pr():
     from github import Github
     g = Github(token)
     repo = g.get_repo(TARGET_REPO)
 
+    release_cherry_pick_label = repo.get_label('release-cherry-pick')
+    cherry_picked_label = repo.get_label('cherry-picked')
+
     # Default titles
     new_title = 'Cherry pick {} to active_release'.format(new_sha)
     new_commit_message = 'Automatic cherry-pick of {}\n'.format(new_sha)
@@ -132,14 +136,17 @@ def make_cherry_pick_pr():
         new_commit_message += '* Originally appeared in {}: {}\n'.format(
             orig_pull.html_url, orig_pull.title)
         new_title = 'Cherry pick {} to active_release'.format(orig_pull.title)
+        orig_pull.add_to_labels(cherry_picked_label)
 
     pr = repo.create_pull(title=new_title,
                           body=new_commit_message,
                           base='refs/heads/active_release',
                           head='refs/heads/{}'.format(new_branch),
-                          maintainer_can_modify=True
+                          maintainer_can_modify=True,
                           )
 
+    pr.add_to_labels(release_cherry_pick_label)
+
     print('Created PR {}'.format(pr.html_url))