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

Commit

Permalink
Merge pull request #12 from mremi/gitlab-api
Browse files Browse the repository at this point in the history
fix(version): upgrade refs to gitlab api from v3 to v4
  • Loading branch information
rande authored Jun 29, 2018
2 parents b121ece + c57de18 commit a0debe5
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

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

### hipchat:message

Expand Down Expand Up @@ -135,7 +135,7 @@

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

### project:builds:artifacts

Expand All @@ -159,7 +159,7 @@

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

### project:list

Expand All @@ -175,7 +175,7 @@

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

### s3:archive

Expand Down Expand Up @@ -203,7 +203,7 @@

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

### s3:extract

Expand All @@ -228,7 +228,7 @@

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

### version

Expand Down
2 changes: 1 addition & 1 deletion commands/project_build_artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`

return strings.TrimSpace(helpText)
Expand Down
10 changes: 5 additions & 5 deletions commands/project_build_artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,39 @@ func Test_Project_Builds_Artifacts(t *testing.T) {

reqs := []*helper.FakeRequest{
{
Path: "/api/v3/projects/3",
Path: "/api/v4/projects/3",
Method: "GET",
Response: &http.Response{
Body: fpProject,
Header: headers,
},
},
{
Path: "/api/v3/projects",
Path: "/api/v4/projects",
Method: "GET",
Response: &http.Response{
Body: fpProjects,
Header: headers,
},
},
{
Path: "/api/v3/projects/3/builds",
Path: "/api/v4/projects/3/builds",
Method: "GET",
Response: &http.Response{
Body: fpBuilds,
Header: headers,
},
},
{
Path: "/api/v3/projects/3/repository/commits/889935cf4d3e7558ae6c0d4dd62e20ea600f5a57/builds",
Path: "/api/v4/projects/3/repository/commits/889935cf4d3e7558ae6c0d4dd62e20ea600f5a57/builds",
Method: "GET",
Response: &http.Response{
Body: fpCommits,
Header: headers,
},
},
{
Path: "/api/v3/projects/3/builds/69/artifacts",
Path: "/api/v4/projects/3/builds/69/artifacts",
Method: "GET",
Response: &http.Response{
Body: fpArchive,
Expand Down
2 changes: 1 addition & 1 deletion commands/project_builds_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`
return strings.TrimSpace(helpText)
Expand Down
4 changes: 2 additions & 2 deletions commands/project_builds_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ func Test_Project_BuildsList_From_Args(t *testing.T) {

reqs := []*helper.FakeRequest{
{
Path: "/api/v3/projects/3",
Path: "/api/v4/projects/3",
Method: "GET",
Response: &http.Response{
Body: fpProject,
},
},
{
Path: "/api/v3/projects/3/builds",
Path: "/api/v4/projects/3/builds",
Method: "GET",
Response: &http.Response{
Body: fpBuild,
Expand Down
2 changes: 1 addition & 1 deletion commands/project_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`
return strings.TrimSpace(helpText)
Expand Down
2 changes: 1 addition & 1 deletion commands/project_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Test_Project_List(t *testing.T) {

reqs := []*helper.FakeRequest{
{
Path: "/api/v3/projects",
Path: "/api/v4/projects",
Method: "GET",
Response: &http.Response{
Body: fp,
Expand Down
2 changes: 1 addition & 1 deletion commands/s3_archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`
return strings.TrimSpace(helpText)
Expand Down
2 changes: 1 addition & 1 deletion commands/s3_extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`
return strings.TrimSpace(helpText)
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewConfig() *Config {
}

if gitlab.ApiPath == "" {
gitlab.ApiPath = "/api/v3"
gitlab.ApiPath = "/api/v4"
}

return &Config{
Expand Down
2 changes: 1 addition & 1 deletion integrations/flowdock/ci_flowdock_ci_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Gitlab's credentials are retrieved from environment:
GITLAB_HOST The gitlab host
GITLAB_TOKEN The user's token
GITLAB_API_PATH (optional) the api path, default to: "/api/v3"
GITLAB_API_PATH (optional) the api path, default to: "/api/v4"
`, flowdockConfiguration)

Expand Down

0 comments on commit a0debe5

Please sign in to comment.