Skip to content

Commit

Permalink
Improve cherrypicker
Browse files Browse the repository at this point in the history
  • Loading branch information
edeNFed committed Oct 6, 2024
1 parent 345bbed commit efa98b5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/cherrypick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@ jobs:
body = f"Backporting commit {commit_sha} from main to {target_branch}\n\nOriginal commit message:\n{commit.commit.message}"
new_pr = repo.create_pull(title=title, body=body, head=new_branch, base=target_branch)
new_pr.enable_automerge()
# Add original PR author as reviewer
new_pr.create_review_request(reviewers=[pr.user.login])
# Try to enable auto-merge
try:
new_pr.enable_automerge()
except GithubException as e:
print(f"Warning: Could not enable auto-merge for PR #{new_pr.number}. Error: {str(e)}")
pr.create_issue_comment(f"Backport to {target_branch} successful. New PR: #{new_pr.number}")
print(f"Created PR #{new_pr.number} for backport to {target_branch}")
except GithubException as e:
Expand Down

0 comments on commit efa98b5

Please sign in to comment.