Skip to content
Discussion options

You must be logged in to vote

No — GHES 3.18 does not support closing an issue as a duplicate via REST or GraphQL API.

The “Close as duplicate” feature shown in the UI (with the “Closed as duplicate of #...”) was introduced in GitHub.com’s Issues 2.0 (the new issue forms and issue states system).

That functionality was not exposed via API in GHES 3.18 — neither REST nor GraphQL supported setting the “duplicate” reason when closing an issue.

The only programmatic option available in GHES 3.18 is to update the issue state (e.g., closed) and add a comment or label indicating duplication manually, using:

REST: PATCH /repos/{owner}/{repo}/issues/{issue_number} with "state": "closed"

Then optionally add a comment linking to…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Rand-Random
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Rand-Random
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enterprise Discussions related to GitHub Enterprise Cloud, Enterprise Server and Organizations Question Ask and answer questions about GitHub features and usage
3 participants