mirror of https://github.com/acidanthera/audk.git
.github/request-reviews.yml: Removed unused functionality
Removed the `download_gh_file()` function which is no longer needed with sparse checkout. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
parent
d3e9e10770
commit
eaf2b82eda
|
@ -8,7 +8,6 @@
|
|||
import git
|
||||
import logging
|
||||
import re
|
||||
import requests
|
||||
|
||||
from collections import OrderedDict
|
||||
from edk2toollib.utility_functions import RunPythonScript
|
||||
|
@ -173,32 +172,6 @@ def get_pr_sha(token: str, owner: str, repo: str, pr_number: int) -> str:
|
|||
return ""
|
||||
|
||||
|
||||
def download_gh_file(github_url: str, local_path: str, token=None):
|
||||
"""Downloads a file from GitHub.
|
||||
|
||||
Args:
|
||||
github_url (str): The GitHub raw file URL.
|
||||
local_path (str): A local path to write the file contents to.
|
||||
token (_type_, optional): A GitHub authentication token.
|
||||
Only needed for a private repo. Defaults to None.
|
||||
"""
|
||||
headers = {}
|
||||
if token:
|
||||
headers["Authorization"] = f"Bearer {token}"
|
||||
|
||||
try:
|
||||
response = requests.get(github_url, headers=headers)
|
||||
response.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
print(
|
||||
f"::error title=HTTP Error!::Error downloading {github_url}: {response.reason}"
|
||||
)
|
||||
return
|
||||
|
||||
with open(local_path, "w", encoding="utf-8") as file:
|
||||
file.write(response.text)
|
||||
|
||||
|
||||
def add_reviewers_to_pr(
|
||||
token: str, owner: str, repo: str, pr_number: int, user_names: List[str]
|
||||
) -> List[str]:
|
||||
|
|
|
@ -11,4 +11,3 @@
|
|||
edk2-pytool-library==0.*
|
||||
GitPython==3.*
|
||||
PyGithub==2.*
|
||||
requests==2.*
|
||||
|
|
Loading…
Reference in New Issue