From 057c26710a1f1daf68c00a72180963191d49953d Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 31 Jul 2024 18:21:30 -0400 Subject: .github/request-reviews.yml: Cache PIP modules - Optimizes and makes the PIP module installation process for the workflow more robust by caching the pip modules used so the only time the workflow needs to reach to PyPi is when new PIP modules are published. - Improves long term stability by locking the major versions for PIP modules in the workflow. This is to reduce overall maintenance over time to automatically pick up new versions while also not being broken in the process. - Removes edk2-pytool-extensions as it is not used. The new "requirements.txt" file is used to lock versions and support the caching step which depends on a requirements file. Signed-off-by: Michael Kubacki --- .github/scripts/requirements.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/scripts/requirements.txt (limited to '.github/scripts/requirements.txt') diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt new file mode 100644 index 0000000000..4b4988cc2f --- /dev/null +++ b/.github/scripts/requirements.txt @@ -0,0 +1,12 @@ +## @file +# GitHub Helpers Python PIP requirements file +# +# This file provides the list of python components used in GitHub scripts in this repository. +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +edk2-pytool-library==0.* +requests==2.* -- cgit From 98f17cdcf41df331ac3cdd4be0686219fa812b7f Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 31 Jul 2024 18:28:27 -0400 Subject: .github/request-reviews.yml: Switch to GitPython Uses `GitPython` instead of invoking the git executable directly. This has the benefit of improving code readability and less support code for binary interaction. Signed-off-by: Michael Kubacki --- .github/scripts/requirements.txt | 1 + 1 file changed, 1 insertion(+) (limited to '.github/scripts/requirements.txt') diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt index 4b4988cc2f..a1c2a3c672 100644 --- a/.github/scripts/requirements.txt +++ b/.github/scripts/requirements.txt @@ -9,4 +9,5 @@ ## edk2-pytool-library==0.* +GitPython==3.* requests==2.* -- cgit From d3e9e1077059e8f565daae31811fe3f0d245fb17 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 31 Jul 2024 18:42:44 -0400 Subject: .github/request-reviews.yml: Switch to PyGithub Uses PyGithub for GitHub interactions instead of the GitHub REST API directly. This simplifies the code, improves error handling and robustness, and lets the PyGithub project abstract GitHub REST API changes that may occur over time. Signed-off-by: Michael Kubacki --- .github/scripts/requirements.txt | 1 + 1 file changed, 1 insertion(+) (limited to '.github/scripts/requirements.txt') diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt index a1c2a3c672..44f0bdd335 100644 --- a/.github/scripts/requirements.txt +++ b/.github/scripts/requirements.txt @@ -10,4 +10,5 @@ edk2-pytool-library==0.* GitPython==3.* +PyGithub==2.* requests==2.* -- cgit From eaf2b82eda199260022504a1a0f7966b0dd56944 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Wed, 31 Jul 2024 18:44:04 -0400 Subject: .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 --- .github/scripts/requirements.txt | 1 - 1 file changed, 1 deletion(-) (limited to '.github/scripts/requirements.txt') 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.* -- cgit