Skip to content
Merged
12 changes: 12 additions & 0 deletions .changeset/patch-track-unresolved-temporary-ids.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions actions/setup/js/add_comment.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,20 @@ async function main(config = {}) {
core.setOutput("comment_id", comment.id);
core.setOutput("comment_url", comment.html_url);
}

// Add metadata for tracking (includes comment ID, item number, and repo info)
// This is used by the handler manager to track comments with unresolved temp IDs
try {
comment._tracking = {
commentId: comment.id,
itemNumber: itemNumber,
repo: `${context.repo.owner}/${context.repo.repo}`,
isDiscussion: commentEndpoint === "discussions",
};
} catch (error) {
// Silently ignore tracking errors to not break existing functionality
core.debug(`Failed to add tracking metadata: ${getErrorMessage(error)}`);
}
}

// Write summary for all created comments
Expand Down
14 changes: 9 additions & 5 deletions actions/setup/js/close_issue.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ async function closeIssue(github, owner, repo, issueNumber) {
}

async function main(config = {}) {
return processCloseEntityItems(ISSUE_CONFIG, {
getDetails: getIssueDetails,
addComment: addIssueComment,
closeEntity: closeIssue,
}, config);
return processCloseEntityItems(
ISSUE_CONFIG,
{
getDetails: getIssueDetails,
addComment: addIssueComment,
closeEntity: closeIssue,
},
config
);
}

module.exports = { main };
6 changes: 1 addition & 5 deletions actions/setup/js/create_issue.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ async function main(config = {}) {
const triggeringDiscussionNumber = context.payload?.discussion?.number;

// Read labels from config object
let envLabels = config.labels
? (Array.isArray(config.labels) ? config.labels : config.labels.split(","))
.map(label => String(label).trim())
.filter(label => label)
: [];
let envLabels = config.labels ? (Array.isArray(config.labels) ? config.labels : config.labels.split(",")).map(label => String(label).trim()).filter(label => label) : [];
const createdIssues = [];
for (let i = 0; i < createIssueItems.length; i++) {
const createIssueItem = createIssueItems[i];
Expand Down
Loading
Loading