Skip to content

fix(fix-dependabot-alerts): refresh app token before creating PR#2393

Merged
TalZaccai merged 1 commit into
mainfrom
dev/talzacc/fix-dep-token-refresh
May 26, 2026
Merged

fix(fix-dependabot-alerts): refresh app token before creating PR#2393
TalZaccai merged 1 commit into
mainfrom
dev/talzacc/fix-dep-token-refresh

Conversation

@TalZaccai
Copy link
Copy Markdown
Contributor

GitHub App installation tokens expire after 1 hour, but the fix-dependabot-alerts build/verify phase routinely runs longer than that. The original app token minted at job start was expired by the time the Create pull request step ran, causing gh pr list / gh pr create to fail with 401 Bad credentials. The git push itself succeeded because actions/checkout uses the workflow's own GITHUB_TOKEN (valid for the full job lifetime), so the branch was pushed but no PR was opened.

This change mints a fresh app token immediately before the create-PR step.

Repro: workflow_dispatch run 26475336645 — job duration 1h 14m; app token minted at 21:10:02, Create pull request step ran at 22:24:49 (~14 min past token expiry).

The remediation branch from that run (automated/fix-dependabot-alerts-20260526-63) is being opened as a separate PR manually.

GitHub App installation tokens expire after 1 hour, but the build and
verify phase routinely runs longer than that. The original app token
minted at job start was expired by the time the `Create pull request`
step ran, causing `gh pr list` / `gh pr create` to fail with
401 Bad credentials. The `git push` itself succeeded because
actions/checkout uses the workflow's own GITHUB_TOKEN (valid for the
full job lifetime), so the branch was pushed but no PR was opened.

Mint a fresh app token immediately before the create-PR step.

Repro: workflow_dispatch run 26475336645 (job duration 1h 14m).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TalZaccai TalZaccai temporarily deployed to development-fork May 26, 2026 23:19 — with GitHub Actions Inactive
@TalZaccai TalZaccai temporarily deployed to development-fork May 26, 2026 23:19 — with GitHub Actions Inactive
@TalZaccai TalZaccai added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 5c7281c May 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant