Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 5.1: Usar a API do GitHub para abrir pull requests #17

Open
CoutoDev opened this issue Jul 23, 2024 · 0 comments
Open

Task 5.1: Usar a API do GitHub para abrir pull requests #17

CoutoDev opened this issue Jul 23, 2024 · 0 comments
Assignees

Comments

@CoutoDev
Copy link
Owner

Usar a API do GitHub para abrir pull requests.

Dicas:

  • Faça uma requisição POST para criar um pull request.

Exemplo de Código:

url = f'https://api.github.com/repos/{USERNAME}/{REPO}/pulls'
data = {
    "title": "New post",
    "head": branch_name,
    "base": "main"
}
requests.post(url, json=data, headers=headers)

Documentação da API do GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant