Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Build Triggers to PipelinTriggers. #152

Merged
merged 3 commits into from
Mar 23, 2017
Merged

Change Build Triggers to PipelinTriggers. #152

merged 3 commits into from
Mar 23, 2017

Conversation

johanbrandhorst
Copy link
Contributor

@johanbrandhorst johanbrandhorst commented Mar 23, 2017

This is in line with the updated v4 API. See https://docs.gitlab.com/ce/api/pipeline_triggers.html and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9713 for more information.

Also add StatusNoContent as successful status and update hardcoded status codes to http.Status* codes.

Johan Brandhorst added 2 commits March 23, 2017 15:02
See documentation for expected return statuses: https://docs.gitlab.com/ce/api/README.html#status-codes

Also change the codes to http library codes.
@johanbrandhorst
Copy link
Contributor Author

All changed functions tested against a v4 GitLab API.

@johanbrandhorst johanbrandhorst mentioned this pull request Mar 23, 2017
39 tasks
@svanharmelen
Copy link
Member

@johanbrandhorst the code looks fine, but I would suggest creating a dedicated service for the PipelineTriggers (PipelineTriggerService) and put the code in it's own file pipeline_triggers.go. I know the name is a bit long, but it's consistent with the rest of the code.

FYI I try to follow (more or less) the segmentation Gitlab uses to describe different parts of the API: https://docs.gitlab.com/ce/api/README.html#resources

@johanbrandhorst
Copy link
Contributor Author

OK I will update it. I thought since it was under /projects/ it would go under the ProjectService. No problem!

@svanharmelen
Copy link
Member

That also makes sense, I just choose to follow the docs and by that also limit the file sizes a bit.

Thanks!

Creates the new service PipelineTriggersService for handling requests to the Pipeline Triggers part of the GitLab API.
@svanharmelen
Copy link
Member

Looks great! Thanks 👍

@svanharmelen svanharmelen merged commit 1e61c56 into xanzy:f-api-v4 Mar 23, 2017
@johanbrandhorst johanbrandhorst deleted the build-triggers-v4-api branch March 23, 2017 19:58
svanharmelen pushed a commit that referenced this pull request Aug 25, 2017
* Add StatusNoContent as successful status.

See documentation for expected return statuses: https://docs.gitlab.com/ce/api/README.html#status-codes

Also change the codes to http library codes.

* Change Build Triggers to PipelinTriggers.

This is in line with the updated v4 API. See https://docs.gitlab.com/ce/api/pipeline_triggers.html and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9713 for more information.

* Move Pipeline Triggers to a separate file.

Creates the new service PipelineTriggersService for handling requests to the Pipeline Triggers part of the GitLab API.
svanharmelen pushed a commit that referenced this pull request Aug 25, 2017
* Add StatusNoContent as successful status.

See documentation for expected return statuses: https://docs.gitlab.com/ce/api/README.html#status-codes

Also change the codes to http library codes.

* Change Build Triggers to PipelinTriggers.

This is in line with the updated v4 API. See https://docs.gitlab.com/ce/api/pipeline_triggers.html and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9713 for more information.

* Move Pipeline Triggers to a separate file.

Creates the new service PipelineTriggersService for handling requests to the Pipeline Triggers part of the GitLab API.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants