File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ POLL_TIMEOUT=${POLL_TIMEOUT:-$DEFAULT_POLL_TIMEOUT}
7
7
8
8
git checkout " ${GITHUB_REF: 11} "
9
9
10
- branch=${GITHUB_REPOSITORY} /$( git symbolic-ref --short HEAD)
10
+ branch=" $( git symbolic-ref --short HEAD) "
11
+ branch_uri=" $( urlencode ${branch} ) "
11
12
12
13
sh -c " git config --global credential.username $GITLAB_USERNAME "
13
14
sh -c " git config --global core.askPass /cred-helper.sh"
@@ -18,10 +19,7 @@ sh -c "git push mirror $branch"
18
19
19
20
sleep $POLL_TIMEOUT
20
21
21
- # convert slashes in a HTML-compatible way
22
- branch=${branch// \/ /% 2F}
23
-
24
- pipeline_id=$( curl --header " PRIVATE-TOKEN: $GITLAB_PASSWORD " --silent " https://${GITLAB_HOSTNAME} /api/v4/projects/${GITLAB_PROJECT_ID} /repository/commits/${branch} " | jq ' .last_pipeline.id' )
22
+ pipeline_id=$( curl --header " PRIVATE-TOKEN: $GITLAB_PASSWORD " --silent " https://${GITLAB_HOSTNAME} /api/v4/projects/${GITLAB_PROJECT_ID} /repository/commits/${branch_uri} " | jq ' .last_pipeline.id' )
25
23
26
24
echo " Triggered CI for branch ${branch} "
27
25
echo " Working with pipeline id #${pipeline_id} "
You can’t perform that action at this time.
0 commit comments