Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

Campaign specs need to configure GitHub tokens for Projects v2 operations, but the token configuration wasn't being serialized into generated .g.campaign.md files, requiring manual edits after generation.

Changes

  • Campaign spec: Added project-github-token field to CampaignSpec struct
  • Orchestrator builder: Pass token from spec to UpdateProjectConfig.GitHubToken when specified
  • Markdown generation: Serialize github-token field in safe-outputs YAML when token is configured
  • Tests: Added coverage for token flow through builder and markdown generation

Example

Campaign spec (.campaign.md):

project-url: "https://github.com/orgs/githubnext/projects/60"
project-github-token: "${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}"

Generated orchestrator (.campaign.g.md):

safe-outputs:
    update-project:
        github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}
        max: 10

Token is omitted from output when not specified in spec, maintaining backward compatibility.

Original prompt

For campaigns, we are still missing the coding pattern:

safe-outputs:
  update-project:
    github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}

But campaigns are just specs... this somehow needs to be added to the generated .g.campaign.md file...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@mnkiefer mnkiefer marked this pull request as ready for review December 19, 2025 10:27
- Add ProjectGitHubToken field to CampaignSpec struct
- Pass github-token through BuildOrchestrator to UpdateProjectConfig
- Serialize github-token in generated .g.campaign.md files
- Add tests for github-token configuration and serialization
- Update existing campaign specs with token configuration

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add safe outputs coding pattern for campaigns Add project-github-token support for campaign specs Dec 19, 2025
Copilot AI requested a review from mnkiefer December 19, 2025 10:45
@mnkiefer mnkiefer merged commit 5f72b58 into main Dec 19, 2025
147 checks passed
@mnkiefer mnkiefer deleted the copilot/add-safe-outputs-pattern branch December 19, 2025 11:07
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