Merge pull request #3702 from SillyTavern/hotfix-pr-workflow-v2 Hotfix pr workflow v2

df48428d1d50910cafb209d6a67b012cd57ad8d6

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +5 -15Ignore whitespace
.github/workflows/pr-auto-manager.yml+5 -15
@@ -19,7 +19,7 @@ jobs:
1919 - name: Label PR Size
2020 # Pull Request Size Labeler
2121 # https://github.com/marketplace/actions/pull-request-size-labeler
2222 uses: codelytv/pr-size-labeler@v1.10.21
2323 with:
2424 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
2525 xs_label: '🟩 ⬤○○○○'
@@ -39,13 +39,9 @@ jobs:
3939
4040 label-by-branches:
4141 name: 🏷️ Label PR by Branches
42- needs: [label-by-size]
4342 runs-on: ubuntu-latest
44- # Run, even if the previous jobs were skipped/failed
4543 # Only label once when PR is created or branches are changed, to allow manual label removal
46- if: |
44+ if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
47- always()
48- && github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
4945
5046 steps:
5147 - name: Checkout Repository
@@ -63,10 +59,7 @@ jobs:
6359
6460 label-by-files:
6561 name: 🏷️ Label PR by Files
66- needs: [label-by-branches]
6762 runs-on: ubuntu-latest
68- # Run, even if the previous jobs were skipped/failed
69- if: always()
7063
7164 steps:
7265 - name: Checkout Repository
@@ -84,12 +77,9 @@ jobs:
8477
8578 remove-stale-label:
8679 name: 🗑️ Remove Stale Label on Comment
87- needs: [label-by-files]
8880 runs-on: ubuntu-latest
8981 # Only runs when this is not done by the github actions bot
90- if: |
82+ if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
91- always()
92- && github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
9383
9484 steps:
9585 - name: Remove Stale Label
@@ -104,7 +94,7 @@ jobs:
10494
10595 check-merge-blocking-labels:
10696 name: 🚫 Check Merge Blocking Labels
10797 needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label]
10898 runs-on: ubuntu-latest
10999 # Run, even if the previous jobs were skipped/failed
110100 if: always()
@@ -154,7 +144,7 @@ jobs:
154144
155145 write-auto-comments:
156146 name: 💬 Post PR Comments Based on Labels
157147 needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label]
158148 runs-on: ubuntu-latest
159149 # Run, even if the previous jobs were skipped/failed
160150 if: always()