1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-30 17:50:35 +02:00

Bugfix/fix in-develop labeler (#1410)

* fix issue not being labeled with in-develop

* restrict to only run on merge to develop

* Remove Python setup

Co-authored-by: Josélio Júnior <76992016+lunatic-fox@users.noreply.github.com>

---------

Co-authored-by: Josélio Júnior <76992016+lunatic-fox@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Jørgen Kalsnes Hagen
2023-04-26 18:44:36 +02:00
committed by GitHub
parent ed1798836c
commit 70df11eef5
5 changed files with 69 additions and 10 deletions

View File

@@ -180,3 +180,19 @@ def get_issues_by_labels(token: str, labels: List[str]):
issues.extend(issues_only)
return issues
def get_pr_by_number(token: str, pr_num: str):
url = base_url + "pulls/" + pr_num
headers = {
"Authorization": f"token {token}"
}
print(f"Querying the GitHub API for requests")
response = requests.get(url, headers=headers)
if not response:
print(f"Can't query the GitHub API. Status code is {response.status_code}. Message is {response.text}")
sys.exit(1)
pr = response.json()
return pr