Skip to content

Instantly share code, notes, and snippets.

@sdiepend
Created June 13, 2024 07:32
Show Gist options
  • Save sdiepend/d6d3c23cf850391b94dd52b039855ad4 to your computer and use it in GitHub Desktop.
Save sdiepend/d6d3c23cf850391b94dd52b039855ad4 to your computer and use it in GitHub Desktop.
Create a draftissue in Github Projects
import requests
query_draftissue = f'''
mutation {{
addProjectV2DraftIssue(input: {{ projectId: "{gh_project_id}" title: "{title}" body: "{body}" }}) {{
projectItem {{
id
}}
}}
}}
'''
json_draftissue = { 'query' : query_draftissue }
response_draftissue = requests.post(url=url, json=json_draftissue, headers=headers)
print(response_draftissue.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment