Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/ai-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
- name: Collect PR commit messages
id: collect
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
COMMITS_URL: ${{ github.event.pull_request.commits_url }}
run: |
set -euo pipefail
Expand Down Expand Up @@ -125,7 +127,9 @@ jobs:
- name: Create 'AI assisted' label if absent
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
run: |
gh api "repos/${{ github.repository }}/labels" \
--method POST \
Expand All @@ -137,7 +141,9 @@ jobs:
- name: Label PR as AI assisted
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
run: |
gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \
--method POST \
Expand Down
12 changes: 9 additions & 3 deletions workflow-templates/ai-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
- name: Collect PR commit messages
id: collect
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
COMMITS_URL: ${{ github.event.pull_request.commits_url }}
run: |
set -euo pipefail
Expand Down Expand Up @@ -125,7 +127,9 @@ jobs:
- name: Create 'AI assisted' label if absent
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
run: |
gh api "repos/${{ github.repository }}/labels" \
--method POST \
Expand All @@ -137,7 +141,9 @@ jobs:
- name: Label PR as AI assisted
if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true'
env:
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
# Fall back to the default token when the PAT is unavailable
# (e.g. Dependabot- or fork-triggered runs don't receive Actions secrets)
GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT || github.token }}
run: |
gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" \
--method POST \
Expand Down
Loading