Skip to content

Commit

Permalink
Add cherry-pick bot for the pulsar (apache#8500)
Browse files Browse the repository at this point in the history
**Motivation**

We want to make the pulsar can cherry-pick automatically. This action will make a closed PR can cherry-pick by the command /pulsarbot cherry-pick to branch-X.Y.

When a PR is merged, the bot will say,

Hey. If you want to cherry-pick this pr to a target branch, please comments '/pulsarbot cherry-pick to branch-X.Y'.
Then you can comment /pulsarbot cherry-pick to branch-X.Y, the bot will open a new PR for cherry-picking the closed PR.

If we open a new PR to do the cherry-pick, we can also use the CI to check the branch.
  • Loading branch information
zymap authored Nov 11, 2020
1 parent 5283238 commit 26dacd6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci-pulsarbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ jobs:

- name: Execute pulsarbot command
id: pulsarbot
if: github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/pulsarbot')
env:
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
uses: apache/pulsar-test-infra/pulsarbot@master

# Just use a github user who has permission to create a branch on the apache/pulsar repo.
# We can consider creating a bot user to do this.
- name: Cherry-pick prompt
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
uses: apache/pulsar-test-infra/cherry-pick@master
env:
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
with:
type: prompt-comment
github_user: codelipenghui
github_email: '[email protected]'
github_repos: 'apache/pulsar'

- name: Cherry-pick
if: github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/pulsarbot cherry-pick')
uses: apache/pulsar-test-infra/cherry-pick@master
env:
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
with:
github_user: codelipenghui
github_email: '[email protected]'
github_repos: 'apache/pulsar'

0 comments on commit 26dacd6

Please sign in to comment.