[CI] Improve automated commit messages

This commit is contained in:
Bnyro 2023-04-26 19:16:52 +02:00 committed by GitHub
parent c271d8304a
commit e2044e7a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
.github/uploader.py vendored
View File

@ -1,6 +1,10 @@
from os import system as run, listdir, remove
import tgconfig
with open("../.github/commit.json") as f:
data = load(f)
message = f"Commit {data['sha'][0:7]}, signed off by: {data['commit']['author']['name']}"
files, signed_files, unsigned_files = listdir(), [], []
for file in files:
@ -15,7 +19,7 @@ if len(signed_files):
if tgconfig.GH_REPO.lower() == "libre-tube/libretube":
run("git add -f *")
run('git commit -m "WORKFLOW: ALPHA BUILDS"')
run(f"git commit -m \"{message}\"")
run("git push -u")
else:
print("Official Repo not Detected")