Skip to content

MOBILE-0000: Use a GitHub App token instead of the PAT in release flows - #66

Merged
justSmK merged 2 commits into
developfrom
feature/MOBILE-0000-github-app-token
Oct 28, 2026
Merged

justSmK merged 2 commits into
developfrom
feature/MOBILE-0000-github-app-token

Conversation

@justSmK

@justSmK justSmK commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Release PRs and the master → develop merge-back now use an installation token of the mindbox-mobile-ci GitHub App
instead of PAT_FOR_TRIGGERING_BRANCH_PROTECTION. Each job mints its own token for this repository with only the
permissions its step needs; the key and client ID come from the org secret MOBILE_CI_APP_PRIVATE_KEY and the org
variable MOBILE_CI_APP_CLIENT_ID. Release and merge-back PRs will be authored and merged by mindbox-mobile-ci[bot].
The PAT secret stays until a release passes with the App.

The same steps ran in a sandbox: PR checks start without approval, auto-merge completes after the token is revoked,
the bot's merge starts push workflows, and merges that change workflow files need no Workflows permission.

Also ignores the local .claude folder.

Release PRs and the master-to-develop merge-back were opened and merged
with PAT_FOR_TRIGGERING_BRANCH_PROTECTION, a personal token of an org
admin account, only because events made with GITHUB_TOKEN start no
workflows. An installation token of the mindbox-mobile-ci App starts
them the same way, covers only this repository and the permissions of
its step, and expires within an hour.

The key comes from the org secret MOBILE_CI_APP_PRIVATE_KEY and the
client ID from the org variable MOBILE_CI_APP_CLIENT_ID. Release and
merge-back PRs are now authored by mindbox-mobile-ci[bot].

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the migration to GitHub App installation tokens.

No open issues 🎉

What changed in this PR

Migrates release PR creation and the master-to-develop merge-back from a personal access token to installation tokens for the mindbox-mobile-ci GitHub App.

Changes:

  • Creates per-job App tokens with scoped permissions and passes them to GitHub CLI steps through GH_TOKEN.
  • Updates reusable workflow secret declarations and callers to use MOBILE_CI_APP_PRIVATE_KEY.
  • Ignores the local .claude/ directory.
File Description
.gitignore Adds .claude/ to ignored paths.
.github/​workflows/​publish-reusable.yml Uses an App token to create and auto-merge merge-back PRs.
.github/​workflows/​publish-common-trigger.yml Passes the App private key to the reusable publishing workflow.
.github/​workflows/​manual-prepare_release_branch.yml Creates an App token for opening release PRs.

Review effort: Balanced

@justSmK
justSmK merged commit e32d2aa into develop Oct 28, 2026
5 checks passed
@justSmK
justSmK deleted the feature/MOBILE-0000-github-app-token branch October 28, 2026 11:55
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.

2 participants