File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 39
39
40
40
version_updated_at=0
41
41
if [ ! -z " ${version_sha} " ]; then
42
- version_updated_at=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v3 /projects/$( urlencode " ${project_path} " ) /repository/commits/${version_sha} " \
42
+ version_updated_at=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v4 /projects/$( urlencode " ${project_path} " ) /repository/commits/${version_sha} " \
43
43
| jq ' .committed_date|.[:19]|strptime("%Y-%m-%dT%H:%M:%S")|mktime' ) "
44
44
fi
45
45
46
- open_mrs=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v3 /projects/$( urlencode " ${project_path} " ) /merge_requests?state=opened&order_by=updated_at" ) "
46
+ open_mrs=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v4 /projects/$( urlencode " ${project_path} " ) /merge_requests?state=opened&order_by=updated_at" ) "
47
47
num_mrs=" $( echo " ${open_mrs} " | jq ' length' ) "
48
48
49
49
new_versions=' '
@@ -52,7 +52,7 @@ for i in $(seq 0 $((num_mrs - 1))); do
52
52
mr=" $( echo " ${open_mrs} " | jq -r ' .[' " $i " ' ]' ) "
53
53
mr_sha=" $( echo " ${mr} " | jq -r ' .sha' ) "
54
54
if [ " ${mr_sha} " != " null" ]; then
55
- mr_updated_at=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v3 /projects/$( urlencode " ${project_path} " ) /repository/commits/${mr_sha} " \
55
+ mr_updated_at=" $( curl -s -H " private-token: ${private_token} " " ${protocol} ://${gitlab_host} /api/v4 /projects/$( urlencode " ${project_path} " ) /repository/commits/${mr_sha} " \
56
56
| jq ' .committed_date|.[:19]|strptime("%Y-%m-%dT%H:%M:%S")|mktime' ) "
57
57
if [ " ${mr_updated_at} " -gt " ${version_updated_at} " ] || [ -z " ${version_sha} " ]; then
58
58
new_versions=" ${new_versions} ,{\" sha\" :\" ${mr_sha} \" }"
Original file line number Diff line number Diff line change 70
70
--header " PRIVATE-TOKEN: ${private_token} " \
71
71
--header ' Content-Type: application/json' \
72
72
--data " {\" state\" :\" ${new_status} \" ,\" name\" :\" ${build_label} \" ,\" target_url\" :\" ${target_url} \" }" \
73
- " ${protocol} ://${gitlab_host} /api/v3 /projects/$( urlencode " ${project_path} " ) /statuses/${commit_sha} "
73
+ " ${protocol} ://${gitlab_host} /api/v4 /projects/$( urlencode " ${project_path} " ) /statuses/${commit_sha} "
74
74
75
75
version=" {\" sha\" :\" ${commit_sha} \" }"
76
76
You can’t perform that action at this time.
0 commit comments