Skip to content

Commit

Permalink
fix: only run PR comment workflow on open PRs
Browse files Browse the repository at this point in the history
The PR comment workflow was running on all PR comments, including those on closed PRs.
Added a condition to check github.event.issue.state to ensure the workflow only runs
when the PR is open.
  • Loading branch information
spachava753 committed Jan 20, 2025
1 parent 9e16a25 commit 4203e5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-comment-cpe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

jobs:
cpe-process-comment:
# Only run on PR comments
if: github.event.issue.pull_request
# Only run on PR comments and if PR is open
if: ${{ github.event.issue.pull_request && github.event.issue.state == 'open' }}
runs-on: ubuntu-latest
permissions: write-all
steps:
Expand Down

0 comments on commit 4203e5d

Please sign in to comment.