From 2626963db960064c2c4686755d2d4866598d9353 Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Thu, 28 Apr 2022 14:52:41 -0400 Subject: [PATCH] Add a Github action to remind people about backport automation (#12884) --- .github/workflows/backport-reminder.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/backport-reminder.yml diff --git a/.github/workflows/backport-reminder.yml b/.github/workflows/backport-reminder.yml new file mode 100644 index 0000000000..323b90daf6 --- /dev/null +++ b/.github/workflows/backport-reminder.yml @@ -0,0 +1,24 @@ +# This workflow sends a reminder comment to PRs that have labels starting with +# `backport/` to check that the backport has run successfully. + +on: + pull_request: + types: [ labeled ] + # Runs on PRs to main and all release branches + branches: + - main + - release/* + +jobs: + backport-label-check: + if: "startsWith(github.event.label.name, 'backport/')" + runs-on: ubuntu-latest + + steps: + - name: Comment on PR + run: | + github_message="After merging, confirm that you see messages like: 🍒✅ Cherry pick of commit ... onto ... succeeded!" + curl -s -H "Authorization: token ${{ secrets.PR_COMMENT_TOKEN }}" \ + -X POST \ + -d "{ \"body\": \"${github_message}\"}" \ + "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${{ github.event.pull_request.number }}/comments"