summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2023-04-30 12:12:25 -0400
committerGitHub <noreply@github.com>2023-04-30 12:12:25 -0400
commitc2ac6f1e905b263adb32102c87150a0c607e4db0 (patch)
tree492b8e31d412685a2ca64671638a2edaaad0b39d
parent434d49f69a65adf75c86dd9629ffbb6d8300df67 (diff)
downloadpylint-git-c2ac6f1e905b263adb32102c87150a0c607e4db0.tar.gz
[primer] Fix commit string generation (#8639)
Follow-up to 87a4d672a8661aa61d5717fd902315d9563e33b6.
-rw-r--r--pylint/testutils/_primer/primer_prepare_command.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pylint/testutils/_primer/primer_prepare_command.py b/pylint/testutils/_primer/primer_prepare_command.py
index c8c562a84..27e216bd5 100644
--- a/pylint/testutils/_primer/primer_prepare_command.py
+++ b/pylint/testutils/_primer/primer_prepare_command.py
@@ -15,16 +15,17 @@ class PrepareCommand(PrimerCommand):
def run(self) -> None:
commit_string = ""
version_string = ".".join(str(x) for x in sys.version_info[:2])
+ # Shorten the SHA to avoid exceeding GitHub's 512 char ceiling
if self.config.clone:
for package, data in self.packages.items():
local_commit = data.lazy_clone()
print(f"Cloned '{package}' at commit '{local_commit}'.")
- commit_string += local_commit + "_"
+ commit_string += local_commit[:8] + "_"
elif self.config.check:
for package, data in self.packages.items():
local_commit = Repo(data.clone_directory).head.object.hexsha
print(f"Found '{package}' at commit '{local_commit}'.")
- commit_string += local_commit + "_"
+ commit_string += local_commit[:8] + "_"
elif self.config.make_commit_string:
for package, data in self.packages.items():
remote_sha1_commit = (