mirror of
https://github.com/konpa/devicon.git
synced 2025-08-12 01:24:42 +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:
committed by
GitHub
parent
ed1798836c
commit
70df11eef5
16
.github/scripts/build_assets/api_handler.py
vendored
16
.github/scripts/build_assets/api_handler.py
vendored
@@ -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
|
||||
|
4
.github/scripts/build_assets/arg_getters.py
vendored
4
.github/scripts/build_assets/arg_getters.py
vendored
@@ -82,7 +82,7 @@ def get_in_develop_labeler_args():
|
||||
help="The GitHub token to access the GitHub REST API.",
|
||||
type=str)
|
||||
|
||||
parser.add_argument("body",
|
||||
help="The PR's initial comment by the author AKA the `body` attribute of the `pull_request` API object.",
|
||||
parser.add_argument("pr_num",
|
||||
help="The PR's number",
|
||||
type=str)
|
||||
return parser.parse_args()
|
||||
|
Reference in New Issue
Block a user