From 5bf74c3f8f945ec397747e26007f2e64c33e2838 Mon Sep 17 00:00:00 2001 From: Alan Clucas Date: Thu, 6 Feb 2025 03:11:02 +0000 Subject: [PATCH] feat: enable cherry-pick bot (#14151) (cherry picked from commit e4f51c23af08ce2e0cd449b1e454b2d9103e3980) --- .github/cherry-pick-bot.yml | 2 ++ .github/workflows/ci-build.yaml | 12 ++++++++++++ .github/workflows/docs.yaml | 12 ++++++++++++ docs/CONTRIBUTING.md | 10 ++++++++++ docs/releasing.md | 10 +--------- 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 .github/cherry-pick-bot.yml diff --git a/.github/cherry-pick-bot.yml b/.github/cherry-pick-bot.yml new file mode 100644 index 000000000000..1f62315d79dc --- /dev/null +++ b/.github/cherry-pick-bot.yml @@ -0,0 +1,2 @@ +enabled: true +preservePullRequestTitle: true diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 28857b7d35ee..3240aa861915 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -8,6 +8,9 @@ on: pull_request: branches: - "main" + - "release-*" + issue_comment: + types: [created] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -19,6 +22,15 @@ permissions: jobs: changed-files: name: Get changed files + if: > + ( + github.event_name == 'issue_comment' && + github.event.issue.pull_request != null && + github.event.comment.author_association == 'MEMBER' && + github.event.comment.body == '/test' + ) || ( + github.event_name != 'issue_comment' + ) outputs: # reference: https://github.com/tj-actions/changed-files#outputs- tests: ${{ steps.changed-files.outputs.tests_any_modified == 'true' }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 7df11be0449a..33b4adb43c50 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -7,6 +7,9 @@ on: pull_request: branches: - main + - release/* + issue_comment: + types: [created] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -18,6 +21,15 @@ permissions: jobs: docs: runs-on: ubuntu-24.04 + if: > + ( + github.event_name == 'issue_comment' && + github.event.issue.pull_request != null && + github.event.comment.author_association == 'MEMBER' && + github.event.comment.body == '/test' + ) || ( + github.event_name != 'issue_comment' + ) steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 4afbdacbaf96..997d14f2506d 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -134,6 +134,16 @@ Subsequently, if there is still no response, it will be automatically closed as See the [Stale Action configuration](https://github.com/argoproj/argo-workflows/blob/main/.github/workflows/stale.yaml) for more details. +## Automated actions + +As a member (see [roles](https://github.com/argoproj/argoproj/blob/main/community/membership.md)) of the argo-project you can use the following comments on PRs to trigger actions: + +* `/retest` - re-run any failing test cases +* `/test` - trigger the full test suite. +Only use this for PRs where the test suite has not automatically triggered - this is almost always wasteful and will not make things pass that `/retest` doesn't pass. +* `/cherry-pick ` - will [attempt to cherry-pick](https://github.com/googleapis/repo-automation-bots/tree/main/packages/cherry-pick-bot) this commit after it has been merged to the target branch. +This can be used prior to merging and the PR will be created after the merge, or commented after merging for an immediate attempt. + ## Sustainability Effort Argo Workflows is seeking more [Reviewers and Approvers](https://github.com/argoproj/argoproj/blob/main/community/membership.md) to help keep it viable. diff --git a/docs/releasing.md b/docs/releasing.md index 8293f62226f2..9982542a0e0c 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -56,15 +56,7 @@ this was successful. ## Update Changelog Once the tag is published, GitHub Actions will automatically open a PR to update the changelog. Once the PR is ready, -you can approve it, enable auto-merge, and then run the following to force trigger the CI build: - -```bash -git branch -D create-pull-request/changelog -git fetch upstream -git checkout --track upstream/create-pull-request/changelog -git commit -s --allow-empty -m "chore: Force trigger CI" -git push upstream create-pull-request/changelog -``` +you can approve it, enable auto-merge, and comment `/test` to run CI on it. ## Announce on Slack