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