Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Campaign generator runs failed to update issues when only the body field was provided, logging "No update fields provided" and treating the operation as a no-op.

Root Cause

Body updates use internal fields (_rawBody, _operation) that are processed later by executeUpdate to handle append/prepend/replace operations. The validation logic in update_handler_factory.cjs filtered these out and incorrectly concluded no update was needed:

// Before: Skips when only internal fields present
const updateFields = Object.keys(updateData).filter(k => !k.startsWith("_"));
if (updateFields.length === 0) {
  return { success: true, skipped: true };
}

Changes

  • update_handler_factory.cjs: Check for _rawBody existence before skipping validation
  • update_handler_factory.test.cjs: Add test case for body-only updates
// After: Proceeds when _rawBody indicates pending body update
const updateFields = Object.keys(updateData).filter(k => !k.startsWith("_"));
const hasRawBody = updateData._rawBody !== undefined;

if (updateFields.length === 0 && !hasRawBody) {
  return { success: true, skipped: true };
}

Impact

Affects update_issue and update_pull_request handlers. The update_discussion handler is unaffected as it sets body directly without using the internal field pattern.

Original prompt

Investigate why campaign generator run skips update-issue:
No update fields provided for issue #11225 - treating as no-op (skipping update)
✓ Message 2 (update_issue) completed successfully
Run: https://github.com/githubnext/gh-aw/actions/runs/21239895948/job/61115627158


💡 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.

The update_handler_factory validation incorrectly skipped updates when only
_rawBody was present. Body updates use internal fields (_rawBody, _operation)
that are processed later by executeUpdate. The validation now checks for
_rawBody existence and proceeds with the update when present.

Fixes body-only updates for update_issue and update_pull_request handlers.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review January 22, 2026 07:56
Copilot AI changed the title [WIP] Investigate reason for campaign generator skipping update-issue Fix: body-only updates incorrectly skipped in update_issue/update_pull_request handlers Jan 22, 2026
Copilot AI requested a review from mnkiefer January 22, 2026 08:03
@mnkiefer mnkiefer merged commit 9259d58 into main Jan 22, 2026
83 checks passed
@mnkiefer mnkiefer deleted the copilot/investigate-campaign-generator-skip branch January 22, 2026 08:13
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