Skip to content
Snippets Groups Projects
Commit 20398d29 authored by Alan Nelson's avatar Alan Nelson
Browse files

Update branch name source

parent da83b355
No related branches found
No related tags found
1 merge request!95Update branch name source
......@@ -11,11 +11,15 @@ This is primarily intended to act as an approval step for outside developers
using our hosting stack and CI/CD processes.
'''
if os.environ.get('CI_PIPELINE_SOURCE ') == 'merge_request_event':
branch = os.environ.get('CI_MERGE_REQUEST_TARGET_BRANCH_NAME')
else:
branch = os.environ.get('CI_COMMIT_BRANCH')
response = requests.post('https://its-lampprod1-whm.unl.edu/merge_auth_check.php', data={
'repo': os.environ.get('CI_PROJECT_PATH'),
'sha': os.environ.get('CI_COMMIT_SHA'),
'branch': os.environ.get('CI_COMMIT_BRANCH'),
'branch': branch,
'user': os.environ.get('GITLAB_USER_LOGIN')
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment