Skip to content

Fix campaign discovery to extract worker_workflow from tracker-id#11481

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/fix-campaign-tracked-items
Closed

Fix campaign discovery to extract worker_workflow from tracker-id#11481
Copilot wants to merge 3 commits intomainfrom
copilot/fix-campaign-tracked-items

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Campaign items discovered via tracker-id weren't populating the worker_workflow Project board field. The normalizeItem() function received the workflow name but didn't include it in the normalized output.

Changes

Core Fix (actions/setup/js/campaign_discovery.cjs)

  • Modified normalizeItem() to accept optional workerWorkflow parameter and include it in output
  • Pass trackerId as worker_workflow in searchByTrackerId()
  • Pass undefined in searchByLabel() (label-based discovery has no workflow context)

Documentation (templates in .github/aw/ and pkg/cli/templates/)

  • Note that tracker-id items include worker_workflow field in discovery manifest
  • Specify orchestrators should use manifest's worker_workflow when populating Project fields

Example

Discovery manifest now includes workflow name for tracker-id discovered items:

{
  "url": "https://github.com/owner/repo/issues/123",
  "content_type": "issue",
  "number": 123,
  "repo": "owner/repo",
  "worker_workflow": "security-scanner",  // ← Now populated
  "created_at": "2025-01-01T00:00:00Z",
  "state": "open"
}

Orchestrators can now directly use this field instead of defaulting to "unknown" for all items.

Original prompt

Fix campaign tracked items not filling in Project board fields (worker workflow, etc.)


💡 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 2 commits January 23, 2026 10:29
- Update normalizeItem() to accept optional worker_workflow parameter
- Pass trackerId as worker_workflow in searchByTrackerId()
- Pass undefined in searchByLabel() since label-based discovery lacks workflow info
- Add comprehensive tests for worker_workflow field population
- All JavaScript tests pass (147 test files, 3023 tests)

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Document that tracker-id discovered items include worker_workflow field
- Update orchestrate template to mention worker_workflow in manifest
- Update project update instructions to use worker_workflow from manifest
- Applied to both .github/aw/ templates and pkg/cli/templates/

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix campaign tracked items not filling in project board fields Fix campaign discovery to extract worker_workflow from tracker-id Jan 23, 2026
Copilot AI requested a review from mnkiefer January 23, 2026 10:33
@mnkiefer mnkiefer closed this Jan 23, 2026
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