From c85ad89f19bc3466e3c23f7c9cca5cca814d21f9 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Thu, 8 Jul 2021 19:37:23 -0700 Subject: [PATCH 1/4] Create develop_freeze_comment.yml --- .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..ddd0f2c5f00 --- /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@v1.0.1 + with: + # GITHUB_TOKEN secret + repo-token: ${{ secrets.GITHUB_TOKEN }} + # Message to comment + 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." From 92a5176ae86280f20087201146eeabda25f6f079 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 11:25:25 -0700 Subject: [PATCH 2/4] Update comments --- .github/workflows/develop_freeze_comment.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml index ddd0f2c5f00..619c37e7882 100644 --- a/.github/workflows/develop_freeze_comment.yml +++ b/.github/workflows/develop_freeze_comment.yml @@ -1,5 +1,5 @@ -# 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 +# This workflow will comment on pull tequests that are submitted while develop +# is frozen during the week of release. Skips any pull tequests that have the # label 'ignore-freeze'. # This workflow should be enabled only while develop is frozen. @@ -22,7 +22,5 @@ jobs: - name: PR Comment uses: github-actions-up-and-running/pr-comment@v1.0.1 with: - # GITHUB_TOKEN secret repo-token: ${{ secrets.GITHUB_TOKEN }} - # Message to comment 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." From 009b486ff4f6e8ebff08ffd465ca701c4d7b3f09 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:10:12 -0700 Subject: [PATCH 3/4] Fix typo and update uses --- .github/workflows/develop_freeze_comment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml index 619c37e7882..d049b9f5104 100644 --- a/.github/workflows/develop_freeze_comment.yml +++ b/.github/workflows/develop_freeze_comment.yml @@ -1,5 +1,5 @@ -# This workflow will comment on pull tequests that are submitted while develop -# is frozen during the week of release. Skips any pull tequests that have the +# 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. @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: PR Comment - uses: github-actions-up-and-running/pr-comment@v1.0.1 + uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b with: repo-token: ${{ secrets.GITHUB_TOKEN }} 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." From af7e0ed4bb02212fbe3638f0a2629274aeddf89f Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:17:07 -0700 Subject: [PATCH 4/4] Add test message --- .github/workflows/develop_freeze_comment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/develop_freeze_comment.yml b/.github/workflows/develop_freeze_comment.yml index d049b9f5104..19fd3219524 100644 --- a/.github/workflows/develop_freeze_comment.yml +++ b/.github/workflows/develop_freeze_comment.yml @@ -23,4 +23,6 @@ jobs: uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b with: repo-token: ${{ secrets.GITHUB_TOKEN }} - 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." + # 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."