Skip to content

[plan] Add agentic-workflows label to fallback issues in create_pull_request.cjs #18985

Description

@github-actions

Objective

Ensure that fallback issues created when create_pull_request fails (push failure or PR API failure) always include the agentic-workflows label so they are visible to the triage/grouping system.

Context

Reported in issue #18980. When create_pull_request.cjs falls back to creating a GitHub issue (on push failure or PR creation failure), it uses only the workflow-configured labels. However, handle_agent_failure.cjs always adds "agentic-workflows" to failure issues, and ensureParentIssue() searches label:agentic-workflows to group failures under [aw] Failed runs. Without this label, push-failure fallback issues are invisible to the triage system.

Location

actions/setup/js/create_pull_request.cjs:

  • ~line 726 — push failure fallback issues.create() call (labels: labels)
  • ~line 1003 — PR creation failure fallback issues.create() call (labels: labels)

Approach

  1. Add a constant and a helper function near the top of the file (or in the fallback section):
constMANAGED_FALLBACK_ISSUE_LABEL="agentic-workflows";functionmergeFallbackIssueLabels(labels=[]){constnormalizedLabels=labels.filter(label=>!!label).map(label=>String(label).trim()).filter(label=>label);return[...newSet([MANAGED_FALLBACK_ISSUE_LABEL, ...normalizedLabels])];}
  1. Replace labels: labels with labels: mergeFallbackIssueLabels(labels) at bothissues.create() fallback call sites.

Files to Modify

  • actions/setup/js/create_pull_request.cjs

Acceptance Criteria

Generated by Plan Command for issue #18980

  • expires on Mar 3, 2026, 4:46 AM UTC

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions