fix: improve bot detection and event filtering in GitHub workflow conditions
| @@ -107,7 +107,7 @@ jobs: | ||
| 107 | 107 | needs: [label-on-content, label-on-labels] |
| 108 | 108 | runs-on: ubuntu-latest |
| 109 | 109 | # Only run this on new comments, to automatically remove the stale label |
| 110 | 110 | if: always() && (github.event_name == 'issue_comment' && github.actorevent.sender.type != 'github-actions[bot]Bot') |
| 111 | 111 | |
| 112 | 112 | steps: |
| 113 | 113 | - name: Mint App Token |
| @@ -169,7 +169,7 @@ jobs: | ||
| 169 | 169 | needs: [label-by-branches, label-by-files] |
| 170 | 170 | runs-on: ubuntu-latest |
| 171 | 171 | # Only runs on comments not done by the github actions bot |
| 172 | 172 | if: always() && (github.event_name == 'pull_request_review_comment' && github.actorevent.sender.type != 'github-actions[bot]Bot') |
| 173 | 173 | |
| 174 | 174 | # Override permissions, issue labeler needs issues write access |
| 175 | 175 | permissions: |
| @@ -257,7 +257,7 @@ jobs: | ||
| 257 | 257 | needs: [label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels] |
| 258 | 258 | runs-on: ubuntu-latest |
| 259 | 259 | # Run, even if the previous jobs were skipped/failed |
| 260 | - if: always() | |
| 260 | + if: always() && (github.event_name == 'pull_request_target') | |
| 261 | 261 | |
| 262 | 262 | steps: |
| 263 | 263 | - name: Mint App Token |
| @@ -287,7 +287,11 @@ jobs: | ||
| 287 | 287 | update-linked-issues: |
| 288 | 288 | name: 🔗 Mark Linked Issues Done on Staging Merge |
| 289 | 289 | runs-on: ubuntu-latest |
| 290 | - if: always() && (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'staging') | |
| 290 | + if: > | |
| 291 | + always() && | |
| 292 | + github.event_name == 'pull_request_target' && | |
| 293 | + github.event.pull_request.merged == true && | |
| 294 | + github.event.pull_request.base.ref == 'staging' | |
| 291 | 295 | |
| 292 | 296 | # Override permissions, We need to be able to write to issues |
| 293 | 297 | permissions: |