ci(merge rep): prevent interpolation in commit msg (#1637)

This commit is contained in:
Côme 2023-11-16 16:56:16 +01:00 committed by GitHub
parent 2d5cb206e5
commit d0cba61b16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,7 @@ with open(f'{sys.argv[1]}/{filename}', 'w+') as f:
yaml.dump(pipeline, f)
try:
quoted_title = "'" + title.replace("'", "'\"'\"'") + "'"
print(subprocess.check_output(f'''
rm -r .gitlab-ci/dashboard_tmp || echo "nothing to do"
git clone {dashboard_url} .gitlab-ci/dashboard_tmp
@ -129,7 +130,7 @@ cd .gitlab-ci/dashboard_tmp
git config user.email {git_email}
git config user.name {git_name}
git add pipelines_{workflow_repo}/{filename}
git commit -m "{workflow_repo}: {title.replace('"',"'")}" || echo "commit fail"
git commit -m '{workflow_repo}: '{quoted_title} || echo "commit fail"
git push
cd -
''', shell=True))