3232 - name : Collect PR commit messages
3333 id : collect
3434 env :
35- GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT }}
35+ # Fall back to the default token when the PAT is unavailable
36+ # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
37+ GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT || github.token }}
3638 COMMITS_URL : ${{ github.event.pull_request.commits_url }}
3739 run : |
3840 set -euo pipefail
@@ -125,7 +127,9 @@ jobs:
125127 - name : Create 'AI assisted' label if absent
126128 if : steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
127129 env :
128- GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT }}
130+ # Fall back to the default token when the PAT is unavailable
131+ # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
132+ GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT || github.token }}
129133 run : |
130134 gh api "repos/${{ github.repository }}/labels" \
131135 --method POST \
@@ -137,7 +141,9 @@ jobs:
137141 - name : Label PR as AI assisted
138142 if : steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
139143 env :
140- GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT }}
144+ # Fall back to the default token when the PAT is unavailable
145+ # (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
146+ GH_TOKEN : ${{ secrets.COMMAND_BOT_PAT || github.token }}
141147 run : |
142148 gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \
143149 --method POST \
0 commit comments