Repository navigation
ci(repo): mint the release token from the GitHub App #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,9 +12,25 @@ jobs: | |
| release-please: | ||
| if: github.repository == 'sentdm/sent-dm-java' | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| HAS_APP: ${{ secrets.SDK_APP_ID != '' && secrets.SDK_APP_PRIVATE_KEY != '' }} | ||
|
|
||
| steps: | ||
| - name: Mint the release token from the GitHub App | ||
| # A tag or release created with the built-in token starts no | ||
| # workflow, so the publish workflow would never run; a personal | ||
| # access token expires or dies with its owner's account. The App's | ||
| # token does neither. | ||
| id: app | ||
| if: env.HAS_APP == 'true' | ||
| uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v3.3.0 | ||
| with: | ||
| app-id: ${{ secrets.SDK_APP_ID }} | ||
| private-key: ${{ secrets.SDK_APP_PRIVATE_KEY }} | ||
| owner: sentdm | ||
| repositories: ${{ github.event.repository.name }} | ||
|
|
||
|
Comment on lines
+20
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 (optional) If the App is not installed on this repository, or lacks write grants here, releases stay broken and the PAT fallback never kicks in. Why this was flaggedThe trigger is a configuration state this checkout cannot show. Either the App installation does not include sentdm/sent-dm-java, or it lacks contents and pull-requests write there. The only existing use, .github/workflows/seal-dispatch.yml:47, mints for Verification: nit. Trigger: the SDK_APP_ID/SDK_APP_PRIVATE_KEY secrets are visible to this repo, but the App installation does not include sentdm/sent-dm-java. The mint step (lines 20-32) has no |
||
| - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 | ||
| id: release | ||
| with: | ||
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | ||
| token: ${{ steps.app.outputs.token || secrets.RELEASE_PLEASE_TOKEN }} | ||
|
Comment on lines
+15
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Maintainers can lose this fix, or block every SDK's release, when the next regeneration rewrites this release workflow. CLAUDE.md lists "the publish, release and sync workflows" as generator-owned, and commit 8b2e6de has no Why this was flaggedCLAUDE.md says "Generator-owned, so don't edit them here: ... the publish, release and sync workflows" and "Changing lines the generator writes conflicts the next time the API document changes, and a conflict blocks every SDK's release". REVIEW.md asks for any change to a generator-owned file outside a generated commit to be reported as Important. The only commit in range, 8b2e6de "ci(repo): mint the release token from the GitHub App", has no Verification: CLAUDE.md lines 19-22 say the release workflow is generator-owned. Commit 8b2e6de has no |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Anyone reading this public repo's commit history or PR can see a private Sent repository and an internal ticket, which CLAUDE.md forbids. Commit 8b2e6de names the "sent-dm-sdk-pipeline App" and the "seal dispatch". The PR text also cites "EPIC-4427".
sent-dm-sdk-pipelineis Sent's private config repo (seal-dispatch.yml:37CONFIG_REPO: sentdm/sent-dm-sdk-pipeline). Fix: reword the commit message and PR description so they say only "the GitHub App", with no internal repo name and no ticket ID, before merging.Why this was flagged
CLAUDE.md says: "This repository is public. Nothing in it, including PR text,
CHANGELOG.mdand release notes, links to or names Sent's private repositories, internal systems or providers." REVIEW.md also lists naming a private Sent repository or an internal system as Important. The message of commit 8b2e6de says "The token now comes from the sent-dm-sdk-pipeline App, as the seal dispatch's already does". The PR description namessent-dm-sdk-pipelineand "EPIC-4427", an internal tracker ID. seal-dispatch.yml:37 shows thatsentdm/sent-dm-sdk-pipelineis the private config repo. Once merged, the commit message stays permanently inmain's public history. Theci:type keeps it out of the changelog, but the history itself is still public.Verification: The PR's only commit, 8b2e6de, says in its body: "The token now comes from the sent-dm-sdk-pipeline App, as the seal dispatch's already does". In the base, .github/workflows/seal-dispatch.yml:37 has
CONFIG_REPO: sentdm/sent-dm-sdk-pipeline. The PR description also cites "EPIC-4427", an internal tracker ID.