Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

PR #12638 removed the campaign command but deleted useful project setup logic. This restores campaign view and custom field creation as a single flag on project new.

Changes

New flag on gh aw project new:

  • --with-campaign-setup - Creates views, custom fields, and enhanced Status field

Implementation:

  • Adapted campaign view/field creation from deleted pkg/campaign/project.go
  • Uses GraphQL API for Status field manipulation (inserts "Review Required" before "Done")
  • Handles both org and user projects via GitHub REST and CLI APIs

Usage:

# Full campaign setup
gh aw project new "Q1 Campaign" --owner myorg --with-campaign-setup

Technical Notes

  • ensureSingleSelectOptionBefore() appends to end if anchor option doesn't exist (documented)
  • Type assertions validated with proper error handling on project creation response
  • View creation uses REST API; field creation uses gh project field-create
Original prompt

From this PR: #12638
Bring back our standard campaign view + custom fields and integrated it into project cmd logic.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 30, 2026 17:36
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add standard campaign view with custom fields integration Integrate campaign setup into project command Jan 30, 2026
Copilot AI requested a review from mnkiefer January 30, 2026 17:56
@mnkiefer mnkiefer marked this pull request as ready for review January 30, 2026 17:57
@mnkiefer
Copy link
Contributor

@copilot No need for granular control (--views, --fields).

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot No need for granular control (--views, --fields).

Removed the --views and --fields flags. Now only --with-campaign-setup is available for creating projects with campaign views and custom fields. (7d3d5df)

@mnkiefer mnkiefer changed the title Integrate campaign setup into project command chore: re-add default campaign views/fields setup Jan 30, 2026
@mnkiefer mnkiefer merged commit cafd94c into main Jan 30, 2026
34 checks passed
@mnkiefer mnkiefer deleted the copilot/bring-back-campaign-view branch January 30, 2026 18:14
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