Auto-close duplicate workflow replaces existing issue labels

Resolved 💬 2 comments Opened May 19, 2026 by fallintoplace Closed Jun 19, 2026

Summary

The duplicate auto-close workflow currently closes an issue by PATCHing the issue with labels: ["duplicate"] together with state: "closed" and state_reason: "duplicate".

GitHub Update an issue API treats the labels field as a replacement for the issue label set, not an additive operation. As a result, when the workflow closes an issue as a duplicate, it can erase existing labels such as platform, area, priority, or lifecycle metadata.

Impact

Duplicate issues can lose useful triage metadata at the same time they are closed. That metadata can still matter for routing, reporting, duplicate analysis, and future auditing.

Suggested fix

Do not include labels in the issue PATCH used to close the issue. Close the issue first, then add the duplicate label via the additive labels endpoint (POST /repos/{owner}/{repo}/issues/{issue_number}/labels) so existing labels are preserved.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗