Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Investigation: Campaign Generator Views Not Created

Problem Analysis

The campaign generator workflow did not create the three configured views on the project. Analysis of workflow run #21150028596 reveals:

Root Cause: Views configuration was under update-project instead of create-project in multiple places

Key Findings

  • Analyzed workflow logs and identified that only 1 of 3 project-related messages was processed
  • Confirmed agent generated correct messages: create_project, add_comment, assign_to_agent
  • Identified configuration structure issue: views were under update-project but should be under create-project
  • Verified both create_project.cjs and update_project.cjs handlers support views configuration
  • Determined the intended design: views should be in create-project config
  • Fixed the configuration in the workflow file
  • Recompiled workflow lock file
  • Validated compiled configuration is correct
  • Updated source instruction file with example configuration
  • Fixed programmatic source in pkg/campaign/generator.go
  • Fixed workflow rendering function in pkg/cli/init.go
  • Updated test expectations
  • Recompiled all workflows

Solution

1. Fixed workflow configuration - Moved views from update-project to create-project section in .github/workflows/agentic-campaign-generator.md

2. Updated source instruction file - Added text documentation in .github/aw/generate-agentic-campaign.md showing the correct safe-outputs configuration (without code examples that would fail validation)

3. Fixed programmatic source - Updated buildGeneratorSafeOutputs() in pkg/campaign/generator.go to place views under CreateProjects instead of UpdateProjects

4. Fixed rendering function - Updated renderCampaignGeneratorMarkdown() in pkg/cli/init.go to output views under create-project instead of update-project

5. Fixed tests - Updated test expectations to match the correct description format

The create_project handler is designed to create views automatically after project creation (see pkg/workflow/create_project.go:13). The update_project handler is for updating existing projects with new views.

Files Changed

  • .github/workflows/agentic-campaign-generator.md - Fixed views configuration
  • .github/workflows/agentic-campaign-generator.lock.yml - Recompiled with fix
  • .github/aw/generate-agentic-campaign.md - Added text documentation showing correct configuration
  • pkg/campaign/generator.go - Fixed programmatic source for workflow generation
  • pkg/cli/init.go - Fixed markdown rendering to output views under create-project
  • pkg/cli/init_test.go - Updated test expectations

Verification

The compiled lock file now correctly includes views in the create_project configuration. When the workflow runs next time, the create_project handler will automatically create all three views after creating the project. The programmatic source now ensures that any regeneration of the workflow file using gh aw init --campaign will also have the correct configuration.

Original prompt

Investigate why campaign generator did not create the three views on the project:
https://github.com/githubnext/gh-aw/actions/runs/21150028596/job/60824275564


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

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate issue with campaign generator views creation fix: move views configuration from update-project to create-project in campaign generator Jan 19, 2026
Copilot AI requested a review from mnkiefer January 19, 2026 20:29
@mnkiefer
Copy link
Contributor

@copilot Also fix in source that creates these files

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

Copilot AI commented Jan 19, 2026

@copilot Also fix in source that creates these files

Updated the source instruction file .github/aw/generate-agentic-campaign.md with a concrete example showing views configuration under create-project. The example demonstrates the correct safe-outputs structure for project-based campaigns. (3fcc060)

@mnkiefer
Copy link
Contributor

@copilot This change belongs here: pkg/campaign/generator.gobuildGeneratorSafeOutputs()

@mnkiefer mnkiefer marked this pull request as ready for review January 19, 2026 20:48
Copy link
Contributor Author

Copilot AI commented Jan 19, 2026

@copilot This change belongs here: pkg/campaign/generator.gobuildGeneratorSafeOutputs()

Fixed in buildGeneratorSafeOutputs() - moved the Views array from UpdateProjects to CreateProjects. This ensures that when the workflow is regenerated using gh aw init --campaign, it will have the correct configuration. (743bb56)

Copilot AI requested a review from mnkiefer January 19, 2026 20:52
@mnkiefer
Copy link
Contributor

@copilot Recompile and fix tests.

…ate-project

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

Copilot AI commented Jan 19, 2026

@copilot Recompile and fix tests.

Recompiled workflow and fixed all related issues:

  • Fixed instruction file to avoid expression validation errors
  • Updated workflow rendering function to output views under create-project
  • Fixed test expectations to match correct description format
  • Recompiled lock file successfully

All tests now pass. (747a20c)

Copilot AI requested a review from mnkiefer January 19, 2026 21:41
@mnkiefer mnkiefer merged commit 6d8c15c into main Jan 19, 2026
48 checks passed
@mnkiefer mnkiefer deleted the copilot/investigate-campaign-generator-issues branch January 19, 2026 21:51
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