Skip to content

Commit 6516be1

Browse files
authored
fix(ci): stop ClawSweeper dispatch PAT fallback
Remove the maintainer PAT fallback from the ClawSweeper dispatch workflow so missing app auth fails closed instead of attributing downstream automation to a human token.
1 parent 7fc0859 commit 6516be1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/clawsweeper-dispatch.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,20 @@ jobs:
3737
private-key: ${{ secrets.CLAWSWEEPER_APP_PRIVATE_KEY }}
3838
owner: openclaw
3939
repositories: clawsweeper
40+
permission-contents: write
4041

4142
- name: Dispatch exact ClawSweeper review
4243
if: ${{ github.event_name != 'push' }}
4344
env:
44-
GH_TOKEN: ${{ steps.token.outputs.token || secrets.OPENCLAW_GH_TOKEN }}
45+
GH_TOKEN: ${{ steps.token.outputs.token }}
4546
TARGET_REPO: ${{ github.repository }}
4647
ITEM_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
4748
ITEM_KIND: ${{ github.event_name == 'pull_request_target' && 'pull_request' || 'issue' }}
4849
SOURCE_EVENT: ${{ github.event_name }}
4950
SOURCE_ACTION: ${{ github.event.action }}
5051
run: |
5152
if [ -z "$GH_TOKEN" ]; then
52-
echo "::notice::Skipping ClawSweeper dispatch because no dispatch credential is configured."
53+
echo "::notice::Skipping ClawSweeper dispatch because no ClawSweeper app token is configured. Not falling back to a maintainer token."
5354
exit 0
5455
fi
5556
payload="$(jq -nc \
@@ -71,15 +72,15 @@ jobs:
7172
- name: Dispatch ClawSweeper commit review
7273
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.deleted != true }}
7374
env:
74-
GH_TOKEN: ${{ steps.token.outputs.token || secrets.OPENCLAW_GH_TOKEN }}
75+
GH_TOKEN: ${{ steps.token.outputs.token }}
7576
TARGET_REPO: ${{ github.repository }}
7677
BEFORE_SHA: ${{ github.event.before }}
7778
AFTER_SHA: ${{ github.sha }}
7879
SOURCE_REF: ${{ github.ref }}
7980
CREATE_CHECKS: ${{ vars.CLAWSWEEPER_COMMIT_REVIEW_CREATE_CHECKS || 'false' }}
8081
run: |
8182
if [ -z "$GH_TOKEN" ]; then
82-
echo "::notice::Skipping ClawSweeper commit dispatch because no dispatch credential is configured."
83+
echo "::notice::Skipping ClawSweeper commit dispatch because no ClawSweeper app token is configured. Not falling back to a maintainer token."
8384
exit 0
8485
fi
8586
case "$CREATE_CHECKS" in

0 commit comments

Comments
 (0)