summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2024-07-31 18:44:04 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-05 19:30:26 +0000
commiteaf2b82eda199260022504a1a0f7966b0dd56944 (patch)
tree93dfe0274a9084c52e411c213273274378c0e636
parentd3e9e1077059e8f565daae31811fe3f0d245fb17 (diff)
downloadedk2-eaf2b82eda199260022504a1a0f7966b0dd56944.tar.gz
.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>
-rw-r--r--.github/scripts/GitHub.py27
-rw-r--r--.github/scripts/requirements.txt1
2 files changed, 0 insertions, 28 deletions
diff --git a/.github/scripts/GitHub.py b/.github/scripts/GitHub.py
index da9e94a84d..43eb5c7e4f 100644
--- a/.github/scripts/GitHub.py
+++ b/.github/scripts/GitHub.py
@@ -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]:
diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt
index 44f0bdd335..c589084ab0 100644
--- a/.github/scripts/requirements.txt
+++ b/.github/scripts/requirements.txt
@@ -11,4 +11,3 @@
edk2-pytool-library==0.*
GitPython==3.*
PyGithub==2.*
-requests==2.*