Skip to content

fix(ci): require app tokens in downstream release templates - #401

Merged
c-vigo merged 2 commits into
release/0.3.1from
bugfix/400-smoke-test-dispatch-failure
Mar 20, 2026
Merged

c-vigo merged 2 commits into
release/0.3.1from
bugfix/400-smoke-test-dispatch-failure

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Description

Hardens downstream release workflow templates to avoid protected-branch failures by requiring explicit Commit/Release app tokens instead of falling back to github.token on write paths.

Type of Change

  • fix -- Bug fix
  • feat -- New feature
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • Updated assets/workspace/.github/workflows/prepare-release.yml
    • Generate Commit App and Release App tokens
    • Route protected branch/ref writes to Commit App token
    • Route PR operations to Release App token
  • Updated assets/workspace/.github/workflows/release-core.yml
    • Remove github.token fallback in auth resolution
    • Generate explicit app tokens and use Commit App token for commit-action writes
  • Updated assets/workspace/.github/workflows/release-publish.yml
    • Remove github.token fallback in auth resolution
    • Resolve fallback to explicit Release App token
  • Updated assets/workspace/.github/workflows/release.yml
    • Use explicit Release App token for rollback issue creation
  • Updated assets/workspace/.github/workflows/sync-issues.yml
    • Remove github.token fallback from cache deletion and commit-action steps
  • Updated docs:
    • docs/DOWNSTREAM_RELEASE.md
    • docs/CROSS_REPO_RELEASE_GATE.md
    • Added required token/secrets model for downstream projects
  • Updated changelog:
    • CHANGELOG.md
    • assets/workspace/.devcontainer/CHANGELOG.md

Changelog Entry

Changed

  • Downstream release templates now require explicit app tokens for write paths (#400)
    • Update assets/workspace/.github/workflows/prepare-release.yml, release-core.yml, release-publish.yml, release.yml, and sync-issues.yml to remove github.token fallback from protected write operations
    • Route protected branch/ref writes through Commit App tokens and release orchestration/issue operations through Release App tokens
    • Document downstream token requirements in docs/DOWNSTREAM_RELEASE.md and docs/CROSS_REPO_RELEASE_GATE.md

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • Ran repository hooks via commit flow (YAML lint/checks, commit message validation, manifest sync checks) and all passed.
  • Verified no github.token usages remain in assets/workspace/.github/workflows/*.yml.
  • Verified branch is rebased/merged with origin/release/0.3.1 and has no merge conflicts.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Assumes downstream repositories provide both COMMIT_APP_* and RELEASE_APP_* secrets, matching the documented gate contract.

Refs: #400

@c-vigo c-vigo self-assigned this Mar 20, 2026
@c-vigo
c-vigo requested a review from Copilot March 20, 2026 13:56

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.

Pull request overview

This PR hardens the downstream workspace release workflow templates to avoid protected-branch/ruleset failures by removing github.token usage on write paths and requiring explicit GitHub App tokens (Commit App vs Release App) for different classes of operations.

Changes:

  • Added explicit Commit/Release GitHub App token generation and routed write operations to the appropriate app token across downstream release workflows.
  • Removed github.token fallbacks in auth resolution and write-path steps (commit-action, PR operations, etc.).
  • Documented the downstream “token model” and required secrets, and updated changelogs accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/DOWNSTREAM_RELEASE.md Documents required app secrets and the split Commit/Release token responsibilities.
docs/CROSS_REPO_RELEASE_GATE.md Documents gate contract expectations for downstream token usage on write paths.
CHANGELOG.md Adds an Unreleased entry describing the downstream token requirement change.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the root changelog entry in the workspace template.
assets/workspace/.github/workflows/prepare-release.yml Generates Commit/Release app tokens and routes protected writes to Commit App token; PR ops to Release App token.
assets/workspace/.github/workflows/release-core.yml Removes github.token fallback, generates app tokens, and uses Commit App token for protected branch writes.
assets/workspace/.github/workflows/release-publish.yml Removes github.token fallback and uses explicit Release App token as the fallback auth token.
assets/workspace/.github/workflows/release.yml Uses explicit Release App token for rollback issue creation.
assets/workspace/.github/workflows/sync-issues.yml Removes github.token fallback from cache deletion and commit-action steps, using app token output instead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/DOWNSTREAM_RELEASE.md Resolved
@c-vigo
c-vigo merged commit c3f3d93 into release/0.3.1 Mar 20, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/400-smoke-test-dispatch-failure branch March 20, 2026 14:20
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