File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,14 @@ cd $CI_PROJECT_DIR
11
11
12
12
github_group_repo=" ComputationalRadiationPhysics/gitlab-ci-testproject"
13
13
14
+ echo " $GITHUB_TOKEN " > tmp.txt
15
+ cat tmp.txt
16
+
14
17
pr_id=$( echo " $CI_BUILD_REF_NAME " | cut -d" /" -f1 | cut -d" -" -f2)
15
18
# curl -X GET https://api.github.com/repos/${github_group_repo}/pulls/${pr_id}
16
- target_branch=$( curl -X GET https://api.github.com/repos/${github_group_repo} /pulls/${pr_id} 2> /dev/null| python3 -c ' import json,sys;obj=json.loads(sys.stdin.read());print(obj["base"]["ref"])' )
19
+ curl_data=$( curl -u psychocoderHPC:$GITHUB_TOKEN -X GET https://api.github.com/repos/${github_group_repo} /pulls/${pr_id} 2> /dev/null)
20
+ echo -e " $curl_data "
21
+ target_branch=$( echo -e " $curl_data " | python3 -c ' import json,sys;obj=json.loads(sys.stdin.read());print(obj["base"]["ref"])' )
17
22
echo " target_branch=${target_branch} "
18
23
19
24
mainline_exists=$( git remote -v | cut -f1 | grep mainline -q && echo 0 || echo 1)
You can’t perform that action at this time.
0 commit comments