Skip to content

Commit

Permalink
code freeze bot: skip comment checks when issue comment not created (#11
Browse files Browse the repository at this point in the history
)

This will speed the job up a little bit and prevent it from unnecessarily checking comments when a pull request has been first created
  • Loading branch information
gdams authored Oct 20, 2022
1 parent 96849c3 commit a49b7cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/code-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- uses: khan/pull-request-comment-trigger@v1.1.0
if: github.event_name == 'issue_comment'
id: thaw
with:
trigger: '/thaw'
Expand All @@ -58,6 +59,7 @@ jobs:
body: Sorry @${{ github.actor }}, the code freeze is still in place.

- uses: khan/pull-request-comment-trigger@v1.1.0
if: github.event_name == 'issue_comment'
id: check
with:
trigger: '/merge'
Expand All @@ -77,6 +79,7 @@ jobs:
Please can two [Adoptium PMC](https://projects.eclipse.org/projects/adoptium/who) members comment `/approve`?
- uses: khan/pull-request-comment-trigger@v1.1.0
if: github.event_name == 'issue_comment'
id: approval
with:
trigger: '/approve'
Expand Down Expand Up @@ -127,7 +130,7 @@ jobs:
thaw:
needs: freeze
runs-on: ubuntu-latest
if: github.repository_owner == 'adoptium' && always() && needs.freeze.result == 'skipped'
if: github.repository_owner == 'adoptium' && github.event_name == 'issue_comment' && always() && needs.freeze.result == 'skipped'
steps:
- uses: khan/pull-request-comment-trigger@v1.1.0
id: thaw
Expand Down

0 comments on commit a49b7cd

Please sign in to comment.