Open Shivbulbule123 opened 1 year ago
import requests import json
username = 'your-username' password = 'your-password' repository = 'your-repository' owner = 'your-repository-owner'
url = f'https://api.github.com/repos/{owner}/{repository}/issues'
headers = {'Content-Type': 'application/json'}
issue = { 'title': 'Bug: Description of the bug', 'body': 'Detailed description of the bug, including steps to reproduce', 'labels': ['bug'] }
response = requests.post(url, headers=headers, auth=(username, password), data=json.dumps(issue))
if response.status_code == 201: print('Issue created successfully.') else: print('Error creating issue:', response.content)
This code is to track the bug present