Skip to content

fix(generate-changelog): push the changelog branch with the app token - #94

Merged
marc0olo merged 1 commit into
mainfrom
fix/changelog-push-with-app-token
Sep 25, 2026
Merged

marc0olo merged 1 commit into
mainfrom
fix/changelog-push-with-app-token

Conversation

@marc0olo

@marc0olo marc0olo commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Since reuse_branch (#80), the changelog pull request of repositories using this workflow gets stuck after its first update, e.g. dfinity/pic-js#290.

Problem

create-pr pushes the branch with the git credentials of actions/checkout, which used the default token. Before #80, every run pushed a new branch and then opened the pull request with the app token, so the pull request's workflows were triggered by the app's opened event. With reuse_branch, every run force pushes the branch of the pull request that is already open. Each update is then a synchronize event from github-actions[bot]:

  • pull_request_target workflows don't run, as GitHub doesn't trigger workflows for events caused by the default token. Required workflows such as the org's External PR Ruleset never report, so the pull request stays blocked even when approved.
  • pull_request workflows wait for approval in repositories that require it for external contributors, as github-actions[bot] counts as one.

On dfinity/pic-js#290, every force push since #80 is by github-actions[bot], with runs in action_required and no External PR Ruleset run. Pull requests without such an update, like dfinity/icp-js-core#1400 or the release pull request dfinity/pic-js#280, ran every workflow as pr-automation-bot-public[bot].

Fix

Check out with the app token, which create-pr then pushes with. The token is already created before the checkout. The create-pr README now says to pass the token to actions/checkout too, and its example does.

🤖 Generated with Claude Code

create-pr pushes with the credentials of the checkout, which used the
default token. With reuse_branch, those force pushes update an open pull
request as github-actions[bot]: pull_request_target workflows don't run, so
required workflows never report, and pull_request workflows wait for
approval where external contributors need it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates changelog automation to push reused branches with the GitHub App token, ensuring downstream workflows trigger correctly.

Changes:

  • Documents matching tokens for checkout and create-pr.
  • Configures changelog checkout with the App token.
File Description
actions/​create-pr/​README.md Documents token requirements and updates the example.
.github/​workflows/​generate-changelog.yaml Uses the App token for checkout and pushes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@marc0olo
marc0olo merged commit a98f5d0 into main Sep 25, 2026
16 of 17 checks passed
@marc0olo
marc0olo deleted the fix/changelog-push-with-app-token branch September 25, 2026 14:03
sea-snake pushed a commit to dfinity/icp-js-auth that referenced this pull request Sep 25, 2026
Picks up dfinity/ci-tools#94. `bdfe993..a98f5d0` is only that commit.

Since `reuse_branch` (dfinity/ci-tools#80), the changelog pull request
is force pushed on every push to `main`, and those pushes came from the
default token as `github-actions[bot]`. Its workflows then waited for
approval, and required `pull_request_target` workflows such as the
External PR Ruleset never ran, which blocks the pull request even when
approved (e.g. dfinity/pic-js#290). With #94, the branch is pushed with
the app token instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
marc0olo added a commit to dfinity/icp-js-bindgen that referenced this pull request Sep 25, 2026
Picks up dfinity/ci-tools#94. `bdfe993..a98f5d0` is only that commit.

Since `reuse_branch` (dfinity/ci-tools#80), the changelog pull request
is force pushed on every push to `main`, and those pushes came from the
default token as `github-actions[bot]`. Its workflows then waited for
approval, and required `pull_request_target` workflows such as the
External PR Ruleset never ran, which blocks the pull request even when
approved (e.g. dfinity/pic-js#290). With #94, the branch is pushed with
the app token instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
marc0olo added a commit to dfinity/icp-js-sdk-docs that referenced this pull request Sep 25, 2026
Picks up dfinity/ci-tools#94. `bdfe993..a98f5d0` is only that commit.

Since `reuse_branch` (dfinity/ci-tools#80), the changelog pull request
is force pushed on every push to `main`, and those pushes came from the
default token as `github-actions[bot]`. Its workflows then waited for
approval, and required `pull_request_target` workflows such as the
External PR Ruleset never ran, which blocks the pull request even when
approved (e.g. dfinity/pic-js#290). With #94, the branch is pushed with
the app token instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
sea-snake pushed a commit to dfinity/icp-js-signer that referenced this pull request Sep 25, 2026
Picks up dfinity/ci-tools#94. `bdfe993..a98f5d0` is only that commit.

Since `reuse_branch` (dfinity/ci-tools#80), the changelog pull request
is force pushed on every push to `main`, and those pushes came from the
default token as `github-actions[bot]`. Its workflows then waited for
approval, and required `pull_request_target` workflows such as the
External PR Ruleset never ran, which blocks the pull request even when
approved (e.g. dfinity/pic-js#290). With #94, the branch is pushed with
the app token instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
marc0olo added a commit to dfinity/icp-js-core that referenced this pull request Sep 25, 2026
Picks up dfinity/ci-tools#94. `bdfe993..a98f5d0` is only that commit.

Since `reuse_branch` (dfinity/ci-tools#80), the changelog pull request
is force pushed on every push to `main`, and those pushes came from the
default token as `github-actions[bot]`. Its workflows then waited for
approval, and required `pull_request_target` workflows such as the
External PR Ruleset never ran, which blocks the pull request even when
approved (e.g. dfinity/pic-js#290). With #94, the branch is pushed with
the app token instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

3 participants