Repository navigation
ci(fees): open the fee bump PR with a GitHub App token - #503
Merged
Merged
Conversation
The bump job now creates an installation token of qsl-cross-repo-automation, scoped to this repository with contents and pull-requests write, to push the branch and open the PR so CI runs on it. Without the App secrets, or if token creation fails, it keeps the previous GITHUB_TOKEN behaviour: push the branch and let the notify job open an issue with a compare link. The repository setting that lets Actions create PRs stays off. Docs describe the App install and org secret visibility. Refs #497.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Read the App ID from the repository variable FIRSTRADE_PR_APP_ID and the private key from the repository secret FIRSTRADE_PR_APP_PRIVATE_KEY. APP_CONFIGURED needs both to be non-empty; the fallback to GITHUB_TOKEN is unchanged. The docs (English and zh-CN) now name qsl-qpk-pin-sync (ID 5004823), already installed on this repository, and drop the qsl-cross-repo-automation and organization secret setup.
Pigbibi
marked this pull request as ready for review
November 1, 2026 15:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI assistance
Written by Grok Bot (AI assistant); an independent review happens before merge.
What changed
The
bumpjob in.github/workflows/fee-schedule-check.yml(added in #502) now opens its pullrequest with a GitHub App installation token instead of
GITHUB_TOKEN:actions/create-github-app-tokenpinned tobcd2ba49218906704ab6c1aa796996da409d3eb1(v3.2.0).
app-idis the repository variablevars.FIRSTRADE_PR_APP_ID(the action'sapp-idinput stillworks), the private key is
secrets.FIRSTRADE_PR_APP_PRIVATE_KEY, owner is the repository owner,repositoriesisFirstradePlatform, and onlypermission-contents: writeandpermission-pull-requests: writeare requested.
APP_CONFIGUREDistrue(the variable and the secretare both non-empty; secrets cannot be tested directly in
if:). It iscontinue-on-error.gh pr create, so CI starts on the PR like onany other. Everything else keeps
GITHUB_TOKEN. The token is never echoed (the action masks it).the branch with
GITHUB_TOKEN, PR creation fails, andnotifyopens or updates the issue with acompare link. A failed App push also retries with
GITHUB_TOKEN.contents: write,pull-requests: write); they are still neededfor the fallback.
docs/statement-reconciliation.mdand the zh-CN doc describe the App:qsl-qpk-pin-sync(ID5004823), already installed on this repository with contents and pull-requests write. The setup
is the repository variable
FIRSTRADE_PR_APP_IDand the repository secretFIRSTRADE_PR_APP_PRIVATE_KEY. Theqsl-cross-repo-automationand organization secretmentions are removed.
The repository setting "Allow GitHub Actions to create and approve pull requests" stays off. No new
secrets or keys are added. No test covers the workflow structure, so no test changed.
How verified
actionlint .github/workflows/fee-schedule-check.ymlpasses (on the previous head; this updateonly renames the variable and secret and was checked as valid YAML and by CI).
pytest tests/test_check_fee_schedule.py: 35 passed.scripts/check_style.py --phase 2andscripts/test_style.pypass (one pre-existing advisoryabout the README outline).
applies. This PR triggers the
checkjobonly (the
bumpjob is limited to main).Why
#502 could not open the bump PR because the repository setting for Actions-created PRs is off, and
PRs from
GITHUB_TOKENdo not start CI. An App token avoids both without enabling that setting.Risk
Low. Only the monthly bump job changes, and only when the App secrets exist. The token is limited to
this repository with contents and pull-requests write and expires after the job. Pinned action SHA.
Worst case is the previous fallback behaviour (branch plus issue). Takes effect once the repository
variable
FIRSTRADE_PR_APP_IDand secretFIRSTRADE_PR_APP_PRIVATE_KEYexist.