Skip to content

feat: label agent failure issues with agentic-workflows tag#18842

Merged
pelikhan merged 2 commits intomainfrom
copilot/label-agent-failure-issues
Feb 28, 2026
Merged

feat: label agent failure issues with agentic-workflows tag#18842
pelikhan merged 2 commits intomainfrom
copilot/label-agent-failure-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Issues created by create_missing_tool_issue and create_missing_data_issue handlers were not getting the "agentic-workflows" label, unlike the other conclusion job handlers (handle_agent_failure, handle_noop_message, handle_create_pr_error) which already applied it.

Changes

  • missing_issue_helpers.cjs — Added defaultLabels option to buildMissingIssueHandler. Always merged (with deduplication) into the final labels alongside any user-provided config.labels.

  • create_missing_tool_issue.cjs / create_missing_data_issue.cjs — Pass defaultLabels: ["agentic-workflows"] to guarantee the label is always applied.

  • missing_issue_helpers.test.cjs — Added tests covering: default labels applied when no config.labels set, merge with user labels, and deduplication.

const main = buildMissingIssueHandler({
  handlerType: HANDLER_TYPE,
  defaultTitlePrefix: "[missing tool]",
  defaultLabels: ["agentic-workflows"],  // always applied
  itemsField: "missing_tools",
  // ...
});

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js m k/gh-aw/node_modorigin git add ranch..feature-branch git ache/go/1.25.0/x64/bin/git user.name Test User /git git (http block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js gin/feature-bran/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/vit�� nfig/composer/verun 1/x64/bin/node /vit�� -unreachable=false l tions/node_modules/.bin/git ve Initial commit tions/setup/js/ntest:js tions/setup/js/n-- (http block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js --format=%s ode_modules/vite-t ode_modules/vitesecurity /pre�� 296b7a7cacf7b3d7OUTPUT .com/repo.git.ur-d tions/node_modul168.63.129.16 -m Initial commit -branch git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Agent failure issues generated in the conclusion job must be labeled with "agentic-workflows" tag. This happens in JavaScript.


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

@pelikhan pelikhan marked this pull request as ready for review February 28, 2026 14:00
Copilot AI review requested due to automatic review settings February 28, 2026 14:00
Copilot AI changed the title [WIP] Label agent failure issues with agentic-workflows tag feat: label agent failure issues with agentic-workflows tag Feb 28, 2026
@pelikhan pelikhan merged commit 021bb66 into main Feb 28, 2026
@pelikhan pelikhan deleted the copilot/label-agent-failure-issues branch February 28, 2026 14:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ensures issues created by the “missing tool” / “missing data” handlers are consistently labeled with the agentic-workflows tag to aid triage and tracking.

Changes:

  • Added a defaultLabels option to buildMissingIssueHandler and merged it with user-provided config.labels (with deduplication).
  • Updated create_missing_tool_issue.cjs and create_missing_data_issue.cjs to always apply agentic-workflows.
  • Added unit tests to verify default label application, merging, and deduplication.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
actions/setup/js/missing_issue_helpers.cjs Adds defaultLabels support and merges it with configured labels for created issues.
actions/setup/js/missing_issue_helpers.test.cjs Adds tests for default label application/merge/dedup behavior.
actions/setup/js/create_missing_tool_issue.cjs Passes defaultLabels: ["agentic-workflows"] to ensure consistent labeling.
actions/setup/js/create_missing_data_issue.cjs Passes defaultLabels: ["agentic-workflows"] to ensure consistent labeling.
Comments suppressed due to low confidence (1)

actions/setup/js/missing_issue_helpers.cjs:44

  • The log message Default labels: currently prints the merged label list (defaults + user labels), which is misleading. Consider logging this as Labels:/Applied labels: or logging defaultLabels and userLabels separately.
    core.info(`Title prefix: ${titlePrefix}`);
    if (envLabels.length > 0) {
      core.info(`Default labels: ${envLabels.join(", ")}`);
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to 33
const { handlerType, defaultTitlePrefix, itemsField, templatePath, templateListKey, buildCommentHeader, renderCommentItem, renderIssueItem, defaultLabels = [] } = options;

Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultLabels is merged into the final label list without the same String/trim/filter normalization applied to config.labels. For consistency (and to avoid surprises if a future call site passes non-trimmed/non-string values), consider normalizing defaultLabels the same way before merging/deduping.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to 39
const envLabels = [...new Set([...defaultLabels, ...userLabels])];
const maxCount = config.max || 1; // Default to 1 to create only one issue per workflow run
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

envLabels is no longer just labels sourced from the config/environment—it now includes defaultLabels plus user-provided labels. Renaming this variable to something like issueLabels/appliedLabels would make the intent clearer and reduce confusion for future maintenance.

This issue also appears on line 41 of the same file.

See below for a potential fix:

    const issueLabels = [...new Set([...defaultLabels, ...userLabels])];
    const maxCount = config.max || 1; // Default to 1 to create only one issue per workflow run

    core.info(`Title prefix: ${titlePrefix}`);
    if (issueLabels.length > 0) {
      core.info(`Applied labels: ${issueLabels.join(", ")}`);

Copilot uses AI. Check for mistakes.
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.

3 participants