Skip to content
Discussion options

You must be logged in to vote

Hey @xe0896 ! I've run into this exact same limitation. You are completely right. the REST API payload for the marked_as_duplicate timeline event is currently missing the reference to the canonical (original) issue.

While we wait for GitHub to patch this on the REST side, here are two workarounds you can use depending on your stack:

Workaround 1: Use the GraphQL API

GitHub's GraphQL API is generally more up-to-date with entity relationships. The MarkedAsDuplicateEvent in GraphQL actually exposes the canonical field.

You can fetch the exact timeline event and the original issue number using this query:

query {
  repository(owner: "OWNER", name: "REPO") {
    issue(number: YOUR_ISSUE_NUMBER)…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xe0896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apps API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates API Discussions around GitHub API platform and docs
2 participants