Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Commit c57de18

Browse files
committed
fix(version): upgrade refs to gitlab api from v3 to v4
1 parent b121ece commit c57de18

11 files changed

+21
-21
lines changed

commands.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
GITLAB_HOST The gitlab host
100100
GITLAB_TOKEN The user's token
101-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
101+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
102102

103103
### hipchat:message
104104

@@ -135,7 +135,7 @@
135135

136136
GITLAB_HOST The gitlab host
137137
GITLAB_TOKEN The user's token
138-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
138+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
139139

140140
### project:builds:artifacts
141141

@@ -159,7 +159,7 @@
159159

160160
GITLAB_HOST The gitlab host
161161
GITLAB_TOKEN The user's token
162-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
162+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
163163

164164
### project:list
165165

@@ -175,7 +175,7 @@
175175

176176
GITLAB_HOST The gitlab host
177177
GITLAB_TOKEN The user's token
178-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
178+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
179179

180180
### s3:archive
181181

@@ -203,7 +203,7 @@
203203

204204
GITLAB_HOST The gitlab host
205205
GITLAB_TOKEN The user's token
206-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
206+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
207207

208208
### s3:extract
209209

@@ -228,7 +228,7 @@
228228

229229
GITLAB_HOST The gitlab host
230230
GITLAB_TOKEN The user's token
231-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
231+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
232232

233233
### version
234234

commands/project_build_artifacts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Credentials are retrieved from environment:
186186
187187
GITLAB_HOST The gitlab host
188188
GITLAB_TOKEN The user's token
189-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
189+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
190190
`
191191

192192
return strings.TrimSpace(helpText)

commands/project_build_artifacts_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,39 @@ func Test_Project_Builds_Artifacts(t *testing.T) {
3838

3939
reqs := []*helper.FakeRequest{
4040
{
41-
Path: "/api/v3/projects/3",
41+
Path: "/api/v4/projects/3",
4242
Method: "GET",
4343
Response: &http.Response{
4444
Body: fpProject,
4545
Header: headers,
4646
},
4747
},
4848
{
49-
Path: "/api/v3/projects",
49+
Path: "/api/v4/projects",
5050
Method: "GET",
5151
Response: &http.Response{
5252
Body: fpProjects,
5353
Header: headers,
5454
},
5555
},
5656
{
57-
Path: "/api/v3/projects/3/builds",
57+
Path: "/api/v4/projects/3/builds",
5858
Method: "GET",
5959
Response: &http.Response{
6060
Body: fpBuilds,
6161
Header: headers,
6262
},
6363
},
6464
{
65-
Path: "/api/v3/projects/3/repository/commits/889935cf4d3e7558ae6c0d4dd62e20ea600f5a57/builds",
65+
Path: "/api/v4/projects/3/repository/commits/889935cf4d3e7558ae6c0d4dd62e20ea600f5a57/builds",
6666
Method: "GET",
6767
Response: &http.Response{
6868
Body: fpCommits,
6969
Header: headers,
7070
},
7171
},
7272
{
73-
Path: "/api/v3/projects/3/builds/69/artifacts",
73+
Path: "/api/v4/projects/3/builds/69/artifacts",
7474
Method: "GET",
7575
Response: &http.Response{
7676
Body: fpArchive,

commands/project_builds_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Credentials are retrieved from environment:
116116
117117
GITLAB_HOST The gitlab host
118118
GITLAB_TOKEN The user's token
119-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
119+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
120120
121121
`
122122
return strings.TrimSpace(helpText)

commands/project_builds_list_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ func Test_Project_BuildsList_From_Args(t *testing.T) {
2525

2626
reqs := []*helper.FakeRequest{
2727
{
28-
Path: "/api/v3/projects/3",
28+
Path: "/api/v4/projects/3",
2929
Method: "GET",
3030
Response: &http.Response{
3131
Body: fpProject,
3232
},
3333
},
3434
{
35-
Path: "/api/v3/projects/3/builds",
35+
Path: "/api/v4/projects/3/builds",
3636
Method: "GET",
3737
Response: &http.Response{
3838
Body: fpBuild,

commands/project_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Credentials are retrieved from environment:
7171
7272
GITLAB_HOST The gitlab host
7373
GITLAB_TOKEN The user's token
74-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
74+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
7575
7676
`
7777
return strings.TrimSpace(helpText)

commands/project_list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Test_Project_List(t *testing.T) {
2323

2424
reqs := []*helper.FakeRequest{
2525
{
26-
Path: "/api/v3/projects",
26+
Path: "/api/v4/projects",
2727
Method: "GET",
2828
Response: &http.Response{
2929
Body: fp,

commands/s3_archive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Credentials are retrieved from environment:
196196
197197
GITLAB_HOST The gitlab host
198198
GITLAB_TOKEN The user's token
199-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
199+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
200200
201201
`
202202
return strings.TrimSpace(helpText)

commands/s3_extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Credentials are retrieved from environment:
169169
170170
GITLAB_HOST The gitlab host
171171
GITLAB_TOKEN The user's token
172-
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
172+
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
173173
174174
`
175175
return strings.TrimSpace(helpText)

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func NewConfig() *Config {
3434
}
3535

3636
if gitlab.ApiPath == "" {
37-
gitlab.ApiPath = "/api/v3"
37+
gitlab.ApiPath = "/api/v4"
3838
}
3939

4040
return &Config{

0 commit comments

Comments
 (0)