Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Remove Campaign Command and Related Code

This PR removes the "campaign" CLI command and all associated implementation code from the codebase.

Changes completed:

  • Remove campaign command registration from main.go
  • Remove pkg/campaign package directory and all files (35 files deleted)
  • Remove campaign-related files in pkg/cli:
    • compile_campaign.go
    • compile_campaign_validation_test.go
    • compile_campaign_orchestrator_test.go
  • Keep pkg/workflow/campaign_trigger_test.go (tests trigger events, not campaign feature)
  • Remove campaign imports from other files:
    • cmd/gh-aw/main.go
    • pkg/cli/commands.go
    • pkg/cli/compile_workflow_processor.go
    • pkg/cli/compile_orchestration.go
    • pkg/cli/compile_post_processing.go
    • pkg/cli/compile_orchestrator.go
    • pkg/cli/copilot-agents.go
    • pkg/cli/init.go
    • pkg/workflow/tools.go
    • pkg/workflow/compiler.go
  • Remove campaign-related templates:
    • Deleted templates from pkg/cli/templates/ (5 files)
    • Deleted templates from .github/aw/ (6 files)
    • Removed template copy commands from Makefile sync-templates target
  • Move getRepositoryRelativePath to compile_helpers.go
  • Fix test files to remove campaign references:
    • cmd/gh-aw/capitalization_test.go
    • cmd/gh-aw/argument_syntax_test.go
  • Remove special case handling for campaign files:
    • Removed .campaign.md and .campaign.g.md special cases from getLockFilePath() in run_workflow_validation.go
    • Removed campaign file exclusions from IsAgenticWorkflow() in stringutil/identifiers.go
    • Simplified IsLockFile() documentation to remove campaign references
    • Removed campaign file skip logic from init.go
    • Removed obsolete .campaign.g.md cleanup code from git.go
    • Updated test files to remove campaign test cases
  • Build successfully completes
  • All tests pass
  • Code formatting complete

Summary:

Successfully removed ~10,000 lines of campaign-related code including:

  • 35 files in pkg/campaign/
  • 3 files in pkg/cli/
  • 11 template files (5 from pkg/cli/templates/, 6 from .github/aw/)
  • Campaign references from 10+ other files
  • All special case handling for .campaign.md and .campaign.g.md files
  • Template copy commands from Makefile
  • Test file updates

The build and tests now pass cleanly without the campaign feature.

Original prompt

Remove the "campaign" command and related golang code.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 29, 2026 23:17
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove campaign command and related golang code Remove campaign command and related code Jan 29, 2026
Copilot AI requested a review from pelikhan January 29, 2026 23:39
@pelikhan
Copy link
Contributor

@copilot find and remove special cases for '.campaign.g.md' and special case for compiling campaign files '.campaign.md'

@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 00:02
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot find and remove special cases for '.campaign.g.md' and special case for compiling campaign files '.campaign.md'

Done. Removed all special case handling for .campaign.md and .campaign.g.md files:

  • Simplified getLockFilePath() to handle only regular .md.lock.yml conversion
  • Updated IsAgenticWorkflow() to accept all .md files without campaign exclusions
  • Removed campaign file skip logic from init workflow parsing
  • Removed obsolete .campaign.g.md cleanup code from gitattributes handling
  • Updated all related test files

Commit: 8d6747d

* Initial plan

* Remove campaign command test case from integration tests

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions
Copy link
Contributor

🔍 PR Triage Results

Category: bug | Risk: medium | Priority: 63/100

Scores Breakdown

  • Impact: 40/50 - Bug category addressing issue resolution
  • Urgency: 5/30 - Recently created (0 days old)
  • Quality: 18/20 - Ready for review with good description

📋 Recommended Action: BATCH REVIEW

This PR is part of batch-bug-medium-001 containing 12 similar PRs. Consider reviewing together for efficiency:

  • All are bug fixes or dependency updates
  • Similar medium risk level
  • Same priority tier (60-63/100)

Batch Group: View all PRs in this batch


Triaged by PR Triage Agent on 2026-01-30
Full report: PR Triage Discussion

AI generated by PR Triage Agent

@mnkiefer
Copy link
Contributor

@pelikhan LGTM! 🎉 Let's merge!

@mnkiefer mnkiefer merged commit ec6d382 into main Jan 30, 2026
51 checks passed
@mnkiefer mnkiefer deleted the copilot/remove-campaign-command-code branch January 30, 2026 06:00
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.

3 participants