From 8c635b5fbc576f5f8e72189bc679437fafd75cb9 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:21:22 -0700 Subject: [PATCH] Create Github Action to comment on PR while develop is frozen (#5006) * Create develop_freeze_comment.yml * Update comments * Fix typo and update uses * Add test message --- .github/workflows/develop_freeze_comment.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/develop_freeze_comment.yml diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml new file mode 100644 index 00000000000..19fd3219524 --- /dev/null +++ b/.github/workflows/develop_freeze_comment.yml @@ -0,0 +1,28 @@ +# This workflow will comment on pull requests that are submitted while develop +# is frozen during the week of release. Skips any pull requests that have the +# label 'ignore-freeze'. +# This workflow should be enabled only while develop is frozen. + +name: Develop Freeze PR Comment + +on: + # Trigger the workflow on pull request on develop branch + pull_request: + types: + - opened + - reopened + branches: + - develop + +jobs: + freeze-comment: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-freeze') }} + runs-on: ubuntu-latest + steps: + - name: PR Comment + uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # TODO: Replace test message after testing workflow. + # message: "Thanks for the PR! The develop branch is currently frozen in preparation for the release so it may not be addressed until after release week." + message: "Thanks for the PR! This is a test message."