Skip to content

Commit 61caf9c

Browse files
committed
Add temporary diagnostic step
1 parent d10560e commit 61caf9c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/stale-issue-cleanup.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ jobs:
4949
curl -fsSL https://gh.io/copilot-install | bash
5050
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
5151
52+
- name: Verify token (diagnostic - remove after first successful run)
53+
env:
54+
GH_TOKEN: ${{ secrets.STALE_ISSUES_TOKEN }}
55+
run: |
56+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
57+
-H "Authorization: token $GH_TOKEN" \
58+
https://api.github.com/user)
59+
echo "GitHub API /user HTTP status: $HTTP_STATUS"
60+
if [ "$HTTP_STATUS" != "200" ]; then
61+
echo "::error::STALE_ISSUES_TOKEN is invalid (HTTP $HTTP_STATUS). Please update the repo secret with a fresh PAT."
62+
exit 1
63+
fi
64+
echo "Token is valid."
65+
5266
- name: Run stale issue cleanup agent
5367
env:
5468
GH_TOKEN: ${{ secrets.STALE_ISSUES_TOKEN }}

0 commit comments

Comments
 (0)