Skip to content

[product-manager-impersonator] Reuse existing COPILOT_GITHUB_TOKEN in quick setup reruns #1152

Description

@github-actions

Feature Idea

Summary: Add a quick-setup mode that reuses an already-configured COPILOT_GITHUB_TOKEN repository secret so reruns can proceed without requiring token re-entry.

Why a Customer Would Want This

Teams often rerun quick setup to add or refresh workflow files after initial adoption. Today, reruns can still stop at token acquisition even when the repository secret already exists, which creates avoidable friction in CI-like or non-interactive environments.

Rough Implementation Sketch

  • In scripts/quick-setup.sh, before prompting for a token, check whether COPILOT_GITHUB_TOKEN already exists in the target repo (via gh secret list --repo ...).
  • If the secret exists and no explicit override is provided, skip prompt/set and continue with a clear log message (for example: "Reusing existing COPILOT_GITHUB_TOKEN secret").
  • Add an opt-in override flag (for example --force-secret-update) to keep explicit rotation behavior available.
  • Document the rerun behavior in README.md quick setup text and script help output.

Why It Won't Be That Hard

This is a small, localized change in one script path: token handling already centralizes under --skip-secret logic, so adding a pre-check branch and one optional override flag should not require compiler or workflow schema changes.

Evidence

  • Current token flow exits in non-interactive runs when env token is absent, with no existing-secret reuse path: scripts/quick-setup.sh#L215-L244.
  • The script unconditionally calls secret set when a token value is present, rather than first detecting an existing repo secret: scripts/quick-setup.sh#L247-L249.
  • The project positions quick setup as a primary onboarding and install path: README.md#L28-L39.
  • Recent activity shows ongoing setup/token friction around quick setup behavior and docs clarity (e.g., #1071, #1144, #1148, #1145).

Note

🔒 Integrity filter blocked 40 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #359 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #1067 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #1128 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Mint Ephemeral Tokens #1067 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Issue Fixer can use Ephemeral Token #1025 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Create issue when merged PRs had unresolved comments #875 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #687 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #659 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #312 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #703 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #140 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #704 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #424 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #432 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #457 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #436 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 24 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

What is this? | From workflow: Trigger Product Manager Impersonator

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions