Skip to content

GitHub API - Issue Deletion #46529

Discussion options

You must be logged in to vote

The easiest way to delete an issue via the GitHub API is with theirs GraphGL API

axios({
	method: 'POST',
		url: 'https://api.github.com/graphql',
		headers: {
			Authorization: `bearer ${config.GH_TOKEN}`,
		        'Content-Type': 'application/json',
		},
		data: {
			query: `
				mutation {
					deleteIssue(input: {issueId: "${issue.node_id}" }) {
						repository {
							id
						}
					}
				}
			`,
		},
	});
});

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@0xAndrewBlack
Comment options

@norwd
Comment options

@PavanLuca
Comment options

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 0xAndrewBlack
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions and conversations related to APIs or Webhooks Question
3 participants