-
Notifications
You must be signed in to change notification settings - Fork 296
feat: label agent failure issues with agentic-workflows tag #18842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,15 +25,17 @@ const { sanitizeContent } = require("./sanitize_content.cjs"); | |
| * @param {function(string): string[]} options.buildCommentHeader - Returns header lines for the comment body given runUrl | ||
| * @param {function(Object, number): string[]} options.renderCommentItem - Renders a single item for an existing-issue comment | ||
| * @param {function(Object, number): string[]} options.renderIssueItem - Renders a single item for a new-issue body | ||
| * @param {string[]} [options.defaultLabels] - Labels always applied to created issues (merged with config.labels) | ||
| * @returns {HandlerFactoryFunction} | ||
| */ | ||
| function buildMissingIssueHandler(options) { | ||
| const { handlerType, defaultTitlePrefix, itemsField, templatePath, templateListKey, buildCommentHeader, renderCommentItem, renderIssueItem } = options; | ||
| const { handlerType, defaultTitlePrefix, itemsField, templatePath, templateListKey, buildCommentHeader, renderCommentItem, renderIssueItem, defaultLabels = [] } = options; | ||
|
|
||
| return async function main(config = {}) { | ||
| // Extract configuration | ||
| const titlePrefix = config.title_prefix || defaultTitlePrefix; | ||
| const envLabels = config.labels ? (Array.isArray(config.labels) ? config.labels : config.labels.split(",")).map(label => String(label).trim()).filter(label => label) : []; | ||
| const userLabels = config.labels ? (Array.isArray(config.labels) ? config.labels : config.labels.split(",")).map(label => String(label).trim()).filter(label => label) : []; | ||
| const envLabels = [...new Set([...defaultLabels, ...userLabels])]; | ||
| const maxCount = config.max || 1; // Default to 1 to create only one issue per workflow run | ||
|
Comment on lines
+38
to
39
|
||
|
|
||
| core.info(`Title prefix: ${titlePrefix}`); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultLabelsis merged into the final label list without the same String/trim/filter normalization applied toconfig.labels. For consistency (and to avoid surprises if a future call site passes non-trimmed/non-string values), consider normalizingdefaultLabelsthe same way before merging/deduping.