Commit 3b48c44f authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Update links so they point to the correct location (#160)

The V3 API is deprecated and the static V3 docs are no longer hosted at the primary docs location.
parent e5ee2348
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// BranchesService handles communication with the branch related methods // BranchesService handles communication with the branch related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md
type BranchesService struct { type BranchesService struct {
client *Client client *Client
} }
// Branch represents a GitLab branch. // Branch represents a GitLab branch.
// //
// GitLab API docs: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md
type Branch struct { type Branch struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Name string `json:"name"` Name string `json:"name"`
......
...@@ -33,14 +33,16 @@ type ListBuildsOptions struct { ...@@ -33,14 +33,16 @@ type ListBuildsOptions struct {
// BuildsService handles communication with the ci builds related methods // BuildsService handles communication with the ci builds related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/builds.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md
type BuildsService struct { type BuildsService struct {
client *Client client *Client
} }
// Build represents a ci build. // Build represents a ci build.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/builds.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md
type Build struct { type Build struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
CreatedAt *time.Time `json:"created_at"` CreatedAt *time.Time `json:"created_at"`
...@@ -72,7 +74,7 @@ type Build struct { ...@@ -72,7 +74,7 @@ type Build struct {
// failed, success, canceled; showing all builds if none provided. // failed, success, canceled; showing all builds if none provided.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#list-project-builds // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#list-project-builds
func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) { func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -98,7 +100,7 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio ...@@ -98,7 +100,7 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio
// project. If the commit SHA is not found, it will respond with 404. // project. If the commit SHA is not found, it will respond with 404.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#list-commit-builds // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#list-commit-builds
func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) { func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -123,7 +125,7 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List ...@@ -123,7 +125,7 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List
// GetBuild gets a single build of a project. // GetBuild gets a single build of a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-a-single-build // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#get-a-single-build
func (s *BuildsService) GetBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) GetBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -148,7 +150,7 @@ func (s *BuildsService) GetBuild(pid interface{}, buildID int, options ...Option ...@@ -148,7 +150,7 @@ func (s *BuildsService) GetBuild(pid interface{}, buildID int, options ...Option
// GetBuildArtifacts get builds artifacts of a project // GetBuildArtifacts get builds artifacts of a project
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-build-artifacts // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#get-build-artifacts
func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) { func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -174,7 +176,7 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int, options ...@@ -174,7 +176,7 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int, options
// reference name and job provided the build finished successfully. // reference name and job provided the build finished successfully.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#download-the-artifacts-file
func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string, options ...OptionFunc) (io.Reader, *Response, error) { func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -199,7 +201,7 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j ...@@ -199,7 +201,7 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j
// GetTraceFile gets a trace of a specific build of a project // GetTraceFile gets a trace of a specific build of a project
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-a-trace-file // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#get-a-trace-file
func (s *BuildsService) GetTraceFile(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) { func (s *BuildsService) GetTraceFile(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -224,7 +226,7 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int, options ...Op ...@@ -224,7 +226,7 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int, options ...Op
// CancelBuild cancels a single build of a project. // CancelBuild cancels a single build of a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#cancel-a-build // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#cancel-a-build
func (s *BuildsService) CancelBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) CancelBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -249,7 +251,7 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int, options ...Opt ...@@ -249,7 +251,7 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int, options ...Opt
// RetryBuild retries a single build of a project // RetryBuild retries a single build of a project
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#retry-a-build // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#retry-a-build
func (s *BuildsService) RetryBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) RetryBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -275,7 +277,7 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int, options ...Opti ...@@ -275,7 +277,7 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int, options ...Opti
// artifacts and a build trace. // artifacts and a build trace.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#erase-a-build // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#erase-a-build
func (s *BuildsService) EraseBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) EraseBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -301,7 +303,7 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int, options ...Opti ...@@ -301,7 +303,7 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int, options ...Opti
// expiration is set. // expiration is set.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#keep-artifacts // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#keep-artifacts
func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -326,7 +328,7 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int, options ...O ...@@ -326,7 +328,7 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int, options ...O
// PlayBuild triggers a nanual action to start a build. // PlayBuild triggers a nanual action to start a build.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#play-a-build // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/builds.md#play-a-build
func (s *BuildsService) PlayBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) { func (s *BuildsService) PlayBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
This diff is collapsed.
...@@ -25,7 +25,8 @@ import ( ...@@ -25,7 +25,8 @@ import (
// DeployKeysService handles communication with the keys related methods // DeployKeysService handles communication with the keys related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md
type DeployKeysService struct { type DeployKeysService struct {
client *Client client *Client
} }
...@@ -46,7 +47,7 @@ func (k DeployKey) String() string { ...@@ -46,7 +47,7 @@ func (k DeployKey) String() string {
// ListDeployKeys gets a list of a project's deploy keys // ListDeployKeys gets a list of a project's deploy keys
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#list-deploy-keys
func (s *DeployKeysService) ListDeployKeys(pid interface{}, options ...OptionFunc) ([]*DeployKey, *Response, error) { func (s *DeployKeysService) ListDeployKeys(pid interface{}, options ...OptionFunc) ([]*DeployKey, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -71,7 +72,7 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}, options ...OptionFun ...@@ -71,7 +72,7 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}, options ...OptionFun
// GetDeployKey gets a single deploy key. // GetDeployKey gets a single deploy key.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#single-deploy-key // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#single-deploy-key
func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*DeployKey, *Response, error) { func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*DeployKey, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -96,7 +97,7 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...@@ -96,7 +97,7 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options
// AddDeployKeyOptions represents the available ADDDeployKey() options. // AddDeployKeyOptions represents the available ADDDeployKey() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#add-deploy-key
type AddDeployKeyOptions struct { type AddDeployKeyOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Key *string `url:"key,omitempty" json:"key,omitempty"` Key *string `url:"key,omitempty" json:"key,omitempty"`
...@@ -108,7 +109,7 @@ type AddDeployKeyOptions struct { ...@@ -108,7 +109,7 @@ type AddDeployKeyOptions struct {
// original one was is accessible by same user. // original one was is accessible by same user.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#add-deploy-key
func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptions, options ...OptionFunc) (*DeployKey, *Response, error) { func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptions, options ...OptionFunc) (*DeployKey, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -133,7 +134,7 @@ func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptio ...@@ -133,7 +134,7 @@ func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptio
// DeleteDeployKey deletes a deploy key from a project. // DeleteDeployKey deletes a deploy key from a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#delete-deploy-key
func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*Response, error) { func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -21,7 +21,7 @@ import "time" ...@@ -21,7 +21,7 @@ import "time"
// PushEvent represents a push event. // PushEvent represents a push event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#push-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#push-events
type PushEvent struct { type PushEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
Before string `json:"before"` Before string `json:"before"`
...@@ -57,7 +57,7 @@ type PushEvent struct { ...@@ -57,7 +57,7 @@ type PushEvent struct {
// TagEvent represents a tag event. // TagEvent represents a tag event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#tag-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#tag-events
type TagEvent struct { type TagEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
Before string `json:"before"` Before string `json:"before"`
...@@ -92,7 +92,7 @@ type TagEvent struct { ...@@ -92,7 +92,7 @@ type TagEvent struct {
// IssueEvent represents a issue event. // IssueEvent represents a issue event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#issues-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#issues-events
type IssueEvent struct { type IssueEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -140,7 +140,7 @@ type IssueEvent struct { ...@@ -140,7 +140,7 @@ type IssueEvent struct {
// CommitCommentEvent represents a comment on a commit event. // CommitCommentEvent represents a comment on a commit event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-commit // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-commit
type CommitCommentEvent struct { type CommitCommentEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -192,7 +192,7 @@ type CommitCommentEvent struct { ...@@ -192,7 +192,7 @@ type CommitCommentEvent struct {
// MergeCommentEvent represents a comment on a merge event. // MergeCommentEvent represents a comment on a merge event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-merge-request // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-merge-request
type MergeCommentEvent struct { type MergeCommentEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -236,7 +236,7 @@ type MergeCommentEvent struct { ...@@ -236,7 +236,7 @@ type MergeCommentEvent struct {
// IssueCommentEvent represents a comment on an issue event. // IssueCommentEvent represents a comment on an issue event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-issue
type IssueCommentEvent struct { type IssueCommentEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -280,7 +280,7 @@ type IssueCommentEvent struct { ...@@ -280,7 +280,7 @@ type IssueCommentEvent struct {
// SnippetCommentEvent represents a comment on a snippet event. // SnippetCommentEvent represents a comment on a snippet event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-code-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-code-snippet
type SnippetCommentEvent struct { type SnippetCommentEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -324,7 +324,7 @@ type SnippetCommentEvent struct { ...@@ -324,7 +324,7 @@ type SnippetCommentEvent struct {
// MergeEvent represents a merge event. // MergeEvent represents a merge event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#merge-request-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#merge-request-events
type MergeEvent struct { type MergeEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -407,7 +407,7 @@ type MergeEvent struct { ...@@ -407,7 +407,7 @@ type MergeEvent struct {
// WikiPageEvent represents a wiki page event. // WikiPageEvent represents a wiki page event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#wiki-page-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#wiki-page-events
type WikiPageEvent struct { type WikiPageEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
User *User `json:"user"` User *User `json:"user"`
...@@ -448,7 +448,7 @@ type WikiPageEvent struct { ...@@ -448,7 +448,7 @@ type WikiPageEvent struct {
// PipelineEvent represents a pipeline event. // PipelineEvent represents a pipeline event.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#pipeline-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#pipeline-events
type PipelineEvent struct { type PipelineEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
ObjectAttributes struct { ObjectAttributes struct {
...@@ -520,7 +520,7 @@ type PipelineEvent struct { ...@@ -520,7 +520,7 @@ type PipelineEvent struct {
//BuildEvent represents a build event //BuildEvent represents a build event
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#build-events // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#build-events
type BuildEvent struct { type BuildEvent struct {
ObjectKind string `json:"object_kind"` ObjectKind string `json:"object_kind"`
Ref string `json:"ref"` Ref string `json:"ref"`
......
...@@ -40,12 +40,14 @@ const ( ...@@ -40,12 +40,14 @@ const (
// tokenType represents a token type within GitLab. // tokenType represents a token type within GitLab.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/ // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/
type tokenType int type tokenType int
// List of available token type // List of available token type
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/ // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/
const ( const (
privateToken tokenType = iota privateToken tokenType = iota
oAuthToken oAuthToken
...@@ -53,12 +55,14 @@ const ( ...@@ -53,12 +55,14 @@ const (
// AccessLevelValue represents a permission level within GitLab. // AccessLevelValue represents a permission level within GitLab.
// //
// GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/permissions/permissions.md
type AccessLevelValue int type AccessLevelValue int
// List of available access levels // List of available access levels
// //
// GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/permissions/permissions.md
const ( const (
GuestPermissions AccessLevelValue = 10 GuestPermissions AccessLevelValue = 10
ReporterPermissions AccessLevelValue = 20 ReporterPermissions AccessLevelValue = 20
...@@ -129,12 +133,14 @@ var notificationLevelTypes = map[string]NotificationLevelValue{ ...@@ -129,12 +133,14 @@ var notificationLevelTypes = map[string]NotificationLevelValue{
// VisibilityLevelValue represents a visibility level within GitLab. // VisibilityLevelValue represents a visibility level within GitLab.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/ // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/
type VisibilityLevelValue int type VisibilityLevelValue int
// List of available visibility levels // List of available visibility levels
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/ // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/
const ( const (
PrivateVisibility VisibilityLevelValue = 0 PrivateVisibility VisibilityLevelValue = 0
InternalVisibility VisibilityLevelValue = 10 InternalVisibility VisibilityLevelValue = 10
...@@ -449,7 +455,7 @@ func parseID(id interface{}) (string, error) { ...@@ -449,7 +455,7 @@ func parseID(id interface{}) (string, error) {
// An ErrorResponse reports one or more errors caused by an API request. // An ErrorResponse reports one or more errors caused by an API request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/README.md#data-validation-and-error-reporting
type ErrorResponse struct { type ErrorResponse struct {
Response *http.Response Response *http.Response
Message string Message string
...@@ -528,7 +534,7 @@ func parseError(raw interface{}) string { ...@@ -528,7 +534,7 @@ func parseError(raw interface{}) string {
// OptionFunc can be passed to all API requests to make the API call as if you were // OptionFunc can be passed to all API requests to make the API call as if you were
// another user, provided your private token is from an administrator account. // another user, provided your private token is from an administrator account.
// //
// GitLab docs: https://docs.gitlab.com/ce/api/README.html#sudo // GitLab docs: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/README.md#sudo
type OptionFunc func(*http.Request) error type OptionFunc func(*http.Request) error
// WithSudo takes either a username or user ID and sets the SUDO request header // WithSudo takes either a username or user ID and sets the SUDO request header
......
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// GroupsService handles communication with the group related methods of // GroupsService handles communication with the group related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md
type GroupsService struct { type GroupsService struct {
client *Client client *Client
} }
// Group represents a GitLab group. // Group represents a GitLab group.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md
type Group struct { type Group struct {
ID int `json:"id"` ID int `json:"id"`
Name string `json:"name"` Name string `json:"name"`
...@@ -43,7 +45,8 @@ type Group struct { ...@@ -43,7 +45,8 @@ type Group struct {
// ListGroupsOptions represents the available ListGroups() options. // ListGroupsOptions represents the available ListGroups() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-project-groups // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-project-groups
type ListGroupsOptions struct { type ListGroupsOptions struct {
ListOptions ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"`
...@@ -53,7 +56,7 @@ type ListGroupsOptions struct { ...@@ -53,7 +56,7 @@ type ListGroupsOptions struct {
// ListGroups gets a list of groups. (As user: my groups, as admin: all groups) // ListGroups gets a list of groups. (As user: my groups, as admin: all groups)
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-project-groups // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-project-groups
func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...OptionFunc) ([]*Group, *Response, error) { func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...OptionFunc) ([]*Group, *Response, error) {
req, err := s.client.NewRequest("GET", "groups", opt, options) req, err := s.client.NewRequest("GET", "groups", opt, options)
if err != nil { if err != nil {
...@@ -71,7 +74,8 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...OptionFunc ...@@ -71,7 +74,8 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...OptionFunc
// GetGroup gets all details of a group. // GetGroup gets all details of a group.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#details-of-a-group // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#details-of-a-group
func (s *GroupsService) GetGroup(gid interface{}, options ...OptionFunc) (*Group, *Response, error) { func (s *GroupsService) GetGroup(gid interface{}, options ...OptionFunc) (*Group, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -95,7 +99,8 @@ func (s *GroupsService) GetGroup(gid interface{}, options ...OptionFunc) (*Group ...@@ -95,7 +99,8 @@ func (s *GroupsService) GetGroup(gid interface{}, options ...OptionFunc) (*Group
// CreateGroupOptions represents the available CreateGroup() options. // CreateGroupOptions represents the available CreateGroup() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#new-group
type CreateGroupOptions struct { type CreateGroupOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
...@@ -106,7 +111,8 @@ type CreateGroupOptions struct { ...@@ -106,7 +111,8 @@ type CreateGroupOptions struct {
// CreateGroup creates a new project group. Available only for users who can // CreateGroup creates a new project group. Available only for users who can
// create groups. // create groups.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#new-group
func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...OptionFunc) (*Group, *Response, error) { func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...OptionFunc) (*Group, *Response, error) {
req, err := s.client.NewRequest("POST", "groups", opt, options) req, err := s.client.NewRequest("POST", "groups", opt, options)
if err != nil { if err != nil {
...@@ -126,7 +132,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...OptionFu ...@@ -126,7 +132,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...OptionFu
// for admin. // for admin.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#transfer-project-to-group
func (s *GroupsService) TransferGroup(gid interface{}, project int, options ...OptionFunc) (*Group, *Response, error) { func (s *GroupsService) TransferGroup(gid interface{}, project int, options ...OptionFunc) (*Group, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -150,7 +156,8 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int, options ...O ...@@ -150,7 +156,8 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int, options ...O
// DeleteGroup removes group with all projects inside. // DeleteGroup removes group with all projects inside.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#remove-group // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#remove-group
func (s *GroupsService) DeleteGroup(gid interface{}, options ...OptionFunc) (*Response, error) { func (s *GroupsService) DeleteGroup(gid interface{}, options ...OptionFunc) (*Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -168,7 +175,8 @@ func (s *GroupsService) DeleteGroup(gid interface{}, options ...OptionFunc) (*Re ...@@ -168,7 +175,8 @@ func (s *GroupsService) DeleteGroup(gid interface{}, options ...OptionFunc) (*Re
// SearchGroup get all groups that match your string in their name or path. // SearchGroup get all groups that match your string in their name or path.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#search-for-group // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#search-for-group
func (s *GroupsService) SearchGroup(query string, options ...OptionFunc) ([]*Group, *Response, error) { func (s *GroupsService) SearchGroup(query string, options ...OptionFunc) ([]*Group, *Response, error) {
var q struct { var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"` Search string `url:"search,omitempty" json:"search,omitempty"`
...@@ -191,7 +199,8 @@ func (s *GroupsService) SearchGroup(query string, options ...OptionFunc) ([]*Gro ...@@ -191,7 +199,8 @@ func (s *GroupsService) SearchGroup(query string, options ...OptionFunc) ([]*Gro
// GroupMember represents a GitLab group member. // GroupMember represents a GitLab group member.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md
type GroupMember struct { type GroupMember struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -206,7 +215,7 @@ type GroupMember struct { ...@@ -206,7 +215,7 @@ type GroupMember struct {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-group-members
type ListGroupMembersOptions struct { type ListGroupMembersOptions struct {
ListOptions ListOptions
} }
...@@ -215,7 +224,7 @@ type ListGroupMembersOptions struct { ...@@ -215,7 +224,7 @@ type ListGroupMembersOptions struct {
// user. // user.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-group-members
func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...OptionFunc) ([]*GroupMember, *Response, error) { func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...OptionFunc) ([]*GroupMember, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -241,7 +250,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO ...@@ -241,7 +250,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-a-group-s-projects
type ListGroupProjectsOptions struct { type ListGroupProjectsOptions struct {
ListOptions ListOptions
} }
...@@ -249,7 +258,7 @@ type ListGroupProjectsOptions struct { ...@@ -249,7 +258,7 @@ type ListGroupProjectsOptions struct {
// ListGroupProjects get a list of group projects // ListGroupProjects get a list of group projects
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-a-group-s-projects
func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) { func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -273,7 +282,8 @@ func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProject ...@@ -273,7 +282,8 @@ func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProject
// AddGroupMemberOptions represents the available AddGroupMember() options. // AddGroupMemberOptions represents the available AddGroupMember() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#add-group-member // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#add-group-member
type AddGroupMemberOptions struct { type AddGroupMemberOptions struct {
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"` UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
...@@ -282,7 +292,7 @@ type AddGroupMemberOptions struct { ...@@ -282,7 +292,7 @@ type AddGroupMemberOptions struct {
// AddGroupMember adds a user to the list of group members. // AddGroupMember adds a user to the list of group members.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-group-members
func (s *GroupsService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) { func (s *GroupsService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -308,7 +318,7 @@ func (s *GroupsService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptio ...@@ -308,7 +318,7 @@ func (s *GroupsService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptio
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#edit-group-team-member // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#edit-group-team-member
type UpdateGroupMemberOptions struct { type UpdateGroupMemberOptions struct {
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"` AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
} }
...@@ -316,7 +326,7 @@ type UpdateGroupMemberOptions struct { ...@@ -316,7 +326,7 @@ type UpdateGroupMemberOptions struct {
// UpdateGroupMember updates a group team member to a specified access level. // UpdateGroupMember updates a group team member to a specified access level.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#list-group-members
func (s *GroupsService) UpdateGroupMember(gid interface{}, user int, opt *UpdateGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) { func (s *GroupsService) UpdateGroupMember(gid interface{}, user int, opt *UpdateGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -341,7 +351,7 @@ func (s *GroupsService) UpdateGroupMember(gid interface{}, user int, opt *Update ...@@ -341,7 +351,7 @@ func (s *GroupsService) UpdateGroupMember(gid interface{}, user int, opt *Update
// RemoveGroupMember removes user from user team. // RemoveGroupMember removes user from user team.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#remove-user-from-user-team // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/groups.md#remove-user-from-user-team
func (s *GroupsService) RemoveGroupMember(gid interface{}, user int, options ...OptionFunc) (*Response, error) { func (s *GroupsService) RemoveGroupMember(gid interface{}, user int, options ...OptionFunc) (*Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
......
...@@ -27,14 +27,16 @@ import ( ...@@ -27,14 +27,16 @@ import (
// IssuesService handles communication with the issue related methods // IssuesService handles communication with the issue related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md
type IssuesService struct { type IssuesService struct {
client *Client client *Client
} }
// Issue represents a GitLab issue. // Issue represents a GitLab issue.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md
type Issue struct { type Issue struct {
ID int `json:"id"` ID int `json:"id"`
IID int `json:"iid"` IID int `json:"iid"`
...@@ -83,7 +85,8 @@ func (l *Labels) MarshalJSON() ([]byte, error) { ...@@ -83,7 +85,8 @@ func (l *Labels) MarshalJSON() ([]byte, error) {
// ListIssuesOptions represents the available ListIssues() options. // ListIssuesOptions represents the available ListIssues() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#list-issues
type ListIssuesOptions struct { type ListIssuesOptions struct {
ListOptions ListOptions
State *string `url:"state,omitempty" json:"state,omitempty"` State *string `url:"state,omitempty" json:"state,omitempty"`
...@@ -95,7 +98,8 @@ type ListIssuesOptions struct { ...@@ -95,7 +98,8 @@ type ListIssuesOptions struct {
// ListIssues gets all issues created by authenticated user. This function // ListIssues gets all issues created by authenticated user. This function
// takes pagination parameters page and per_page to restrict the list of issues. // takes pagination parameters page and per_page to restrict the list of issues.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#list-issues
func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) { func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
req, err := s.client.NewRequest("GET", "issues", opt, options) req, err := s.client.NewRequest("GET", "issues", opt, options)
if err != nil { if err != nil {
...@@ -113,7 +117,8 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...OptionFunc ...@@ -113,7 +117,8 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...OptionFunc
// ListProjectIssuesOptions represents the available ListProjectIssues() options. // ListProjectIssuesOptions represents the available ListProjectIssues() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#list-issues
type ListProjectIssuesOptions struct { type ListProjectIssuesOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -127,7 +132,8 @@ type ListProjectIssuesOptions struct { ...@@ -127,7 +132,8 @@ type ListProjectIssuesOptions struct {
// ListProjectIssues gets a list of project issues. This function accepts // ListProjectIssues gets a list of project issues. This function accepts
// pagination parameters page and per_page to return the list of project issues. // pagination parameters page and per_page to return the list of project issues.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#list-project-issues
func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) { func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -151,7 +157,8 @@ func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssue ...@@ -151,7 +157,8 @@ func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssue
// GetIssue gets a single project issue. // GetIssue gets a single project issue.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#single-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#single-issues
func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFunc) (*Issue, *Response, error) { func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -175,7 +182,8 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFu ...@@ -175,7 +182,8 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFu
// CreateIssueOptions represents the available CreateIssue() options. // CreateIssueOptions represents the available CreateIssue() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#new-issues
type CreateIssueOptions struct { type CreateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -186,7 +194,8 @@ type CreateIssueOptions struct { ...@@ -186,7 +194,8 @@ type CreateIssueOptions struct {
// CreateIssue creates a new project issue. // CreateIssue creates a new project issue.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#new-issues
func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) { func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -210,7 +219,8 @@ func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, op ...@@ -210,7 +219,8 @@ func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, op
// UpdateIssueOptions represents the available UpdateIssue() options. // UpdateIssueOptions represents the available UpdateIssue() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#edit-issues
type UpdateIssueOptions struct { type UpdateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -223,7 +233,8 @@ type UpdateIssueOptions struct { ...@@ -223,7 +233,8 @@ type UpdateIssueOptions struct {
// UpdateIssue updates an existing project issue. This function is also used // UpdateIssue updates an existing project issue. This function is also used
// to mark an issue as closed. // to mark an issue as closed.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#edit-issues
func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) { func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -247,7 +258,8 @@ func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssue ...@@ -247,7 +258,8 @@ func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssue
// DeleteIssue deletes a single project issue. // DeleteIssue deletes a single project issue.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#delete-an-issue
func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...OptionFunc) (*Response, error) { func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// LabelsService handles communication with the label related methods // LabelsService handles communication with the label related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md
type LabelsService struct { type LabelsService struct {
client *Client client *Client
} }
// Label represents a GitLab label. // Label represents a GitLab label.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md
type Label struct { type Label struct {
Name string `json:"name"` Name string `json:"name"`
Color string `json:"color"` Color string `json:"color"`
...@@ -47,7 +49,8 @@ func (l Label) String() string { ...@@ -47,7 +49,8 @@ func (l Label) String() string {
// ListLabels gets all labels for given project. // ListLabels gets all labels for given project.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#list-labels
func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*Label, *Response, error) { func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*Label, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -71,7 +74,8 @@ func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*L ...@@ -71,7 +74,8 @@ func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*L
// CreateLabelOptions represents the available CreateLabel() options. // CreateLabelOptions represents the available CreateLabel() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#create-a-new-label
type CreateLabelOptions struct { type CreateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Color *string `url:"color,omitempty" json:"color,omitempty"` Color *string `url:"color,omitempty" json:"color,omitempty"`
...@@ -81,7 +85,8 @@ type CreateLabelOptions struct { ...@@ -81,7 +85,8 @@ type CreateLabelOptions struct {
// CreateLabel creates a new label for given repository with given name and // CreateLabel creates a new label for given repository with given name and
// color. // color.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#create-a-new-label
func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, options ...OptionFunc) (*Label, *Response, error) { func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, options ...OptionFunc) (*Label, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -105,14 +110,16 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op ...@@ -105,14 +110,16 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op
// DeleteLabelOptions represents the available DeleteLabel() options. // DeleteLabelOptions represents the available DeleteLabel() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#delete-a-label
type DeleteLabelOptions struct { type DeleteLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
} }
// DeleteLabel deletes a label given by its name. // DeleteLabel deletes a label given by its name.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#delete-a-label
func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, options ...OptionFunc) (*Response, error) { func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -130,7 +137,8 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, op ...@@ -130,7 +137,8 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, op
// UpdateLabelOptions represents the available UpdateLabel() options. // UpdateLabelOptions represents the available UpdateLabel() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#delete-a-label
type UpdateLabelOptions struct { type UpdateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"` NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"`
...@@ -141,7 +149,8 @@ type UpdateLabelOptions struct { ...@@ -141,7 +149,8 @@ type UpdateLabelOptions struct {
// UpdateLabel updates an existing label with new name or now color. At least // UpdateLabel updates an existing label with new name or now color. At least
// one parameter is required, to update the label. // one parameter is required, to update the label.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/labels.md#edit-an-existing-label
func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, options ...OptionFunc) (*Label, *Response, error) { func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, options ...OptionFunc) (*Label, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// MergeRequestsService handles communication with the merge requests related // MergeRequestsService handles communication with the merge requests related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md
type MergeRequestsService struct { type MergeRequestsService struct {
client *Client client *Client
} }
// MergeRequest represents a GitLab merge request. // MergeRequest represents a GitLab merge request.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md
type MergeRequest struct { type MergeRequest struct {
ID int `json:"id"` ID int `json:"id"`
IID int `json:"iid"` IID int `json:"iid"`
...@@ -102,7 +104,7 @@ func (m MergeRequest) String() string { ...@@ -102,7 +104,7 @@ func (m MergeRequest) String() string {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#list-merge-requests
type ListMergeRequestsOptions struct { type ListMergeRequestsOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -117,7 +119,7 @@ type ListMergeRequestsOptions struct { ...@@ -117,7 +119,7 @@ type ListMergeRequestsOptions struct {
// per_page can be used to restrict the list of merge requests. // per_page can be used to restrict the list of merge requests.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#list-merge-requests
func (s *MergeRequestsService) ListMergeRequests(pid interface{}, opt *ListMergeRequestsOptions, options ...OptionFunc) ([]*MergeRequest, *Response, error) { func (s *MergeRequestsService) ListMergeRequests(pid interface{}, opt *ListMergeRequestsOptions, options ...OptionFunc) ([]*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -142,7 +144,7 @@ func (s *MergeRequestsService) ListMergeRequests(pid interface{}, opt *ListMerge ...@@ -142,7 +144,7 @@ func (s *MergeRequestsService) ListMergeRequests(pid interface{}, opt *ListMerge
// GetMergeRequest shows information about a single merge request. // GetMergeRequest shows information about a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#get-single-mr
func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) { func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -167,7 +169,7 @@ func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int ...@@ -167,7 +169,7 @@ func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int
// GetMergeRequestCommits gets a list of merge request commits. // GetMergeRequestCommits gets a list of merge request commits.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#get-single-mr-commits
func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Commit, *Response, error) { func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Commit, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -193,7 +195,7 @@ func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequ ...@@ -193,7 +195,7 @@ func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequ
// its files and changes. // its files and changes.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#get-single-mr-changes
func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) { func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -219,7 +221,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ ...@@ -219,7 +221,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#create-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#create-mr
type CreateMergeRequestOptions struct { type CreateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -232,7 +234,7 @@ type CreateMergeRequestOptions struct { ...@@ -232,7 +234,7 @@ type CreateMergeRequestOptions struct {
// CreateMergeRequest creates a new merge request. // CreateMergeRequest creates a new merge request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#create-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#create-mr
func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) { func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -258,7 +260,7 @@ func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMe ...@@ -258,7 +260,7 @@ func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMe
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#update-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#update-mr
type UpdateMergeRequestOptions struct { type UpdateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -270,7 +272,7 @@ type UpdateMergeRequestOptions struct { ...@@ -270,7 +272,7 @@ type UpdateMergeRequestOptions struct {
// UpdateMergeRequest updates an existing project milestone. // UpdateMergeRequest updates an existing project milestone.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#update-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#update-mr
func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest int, opt *UpdateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) { func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest int, opt *UpdateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -296,7 +298,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest ...@@ -296,7 +298,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#accept-mr
type AcceptMergeRequestOptions struct { type AcceptMergeRequestOptions struct {
MergeCommitMessage *string `url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"` MergeCommitMessage *string `url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"`
ShouldRemoveSourceBranch *bool `url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"` ShouldRemoveSourceBranch *bool `url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"`
...@@ -310,7 +312,7 @@ type AcceptMergeRequestOptions struct { ...@@ -310,7 +312,7 @@ type AcceptMergeRequestOptions struct {
// already merged or closed - you get 405 and error message 'Method Not Allowed' // already merged or closed - you get 405 and error message 'Method Not Allowed'
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/merge_requests.md#accept-mr
func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest int, opt *AcceptMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) { func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest int, opt *AcceptMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// MilestonesService handles communication with the milestone related methods // MilestonesService handles communication with the milestone related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md
type MilestonesService struct { type MilestonesService struct {
client *Client client *Client
} }
// Milestone represents a GitLab milestone. // Milestone represents a GitLab milestone.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md
type Milestone struct { type Milestone struct {
ID int `json:"id"` ID int `json:"id"`
Iid int `json:"iid"` Iid int `json:"iid"`
...@@ -53,7 +55,7 @@ func (m Milestone) String() string { ...@@ -53,7 +55,7 @@ func (m Milestone) String() string {
// ListMilestonesOptions represents the available ListMilestones() options. // ListMilestonesOptions represents the available ListMilestones() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#list-project-milestones
type ListMilestonesOptions struct { type ListMilestonesOptions struct {
ListOptions ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"` IID *int `url:"iid,omitempty" json:"iid,omitempty"`
...@@ -62,7 +64,7 @@ type ListMilestonesOptions struct { ...@@ -62,7 +64,7 @@ type ListMilestonesOptions struct {
// ListMilestones returns a list of project milestones. // ListMilestones returns a list of project milestones.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#list-project-milestones
func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesOptions, options ...OptionFunc) ([]*Milestone, *Response, error) { func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesOptions, options ...OptionFunc) ([]*Milestone, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -87,7 +89,7 @@ func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesO ...@@ -87,7 +89,7 @@ func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesO
// GetMilestone gets a single project milestone. // GetMilestone gets a single project milestone.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#get-single-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#get-single-milestone
func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options ...OptionFunc) (*Milestone, *Response, error) { func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -112,7 +114,7 @@ func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options ...@@ -112,7 +114,7 @@ func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options
// CreateMilestoneOptions represents the available CreateMilestone() options. // CreateMilestoneOptions represents the available CreateMilestone() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#create-new-milestone
type CreateMilestoneOptions struct { type CreateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -123,7 +125,7 @@ type CreateMilestoneOptions struct { ...@@ -123,7 +125,7 @@ type CreateMilestoneOptions struct {
// CreateMilestone creates a new project milestone. // CreateMilestone creates a new project milestone.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#create-new-milestone
func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) { func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -148,7 +150,7 @@ func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMileston ...@@ -148,7 +150,7 @@ func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMileston
// UpdateMilestoneOptions represents the available UpdateMilestone() options. // UpdateMilestoneOptions represents the available UpdateMilestone() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#edit-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#edit-milestone
type UpdateMilestoneOptions struct { type UpdateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
...@@ -160,7 +162,7 @@ type UpdateMilestoneOptions struct { ...@@ -160,7 +162,7 @@ type UpdateMilestoneOptions struct {
// UpdateMilestone updates an existing project milestone. // UpdateMilestone updates an existing project milestone.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#edit-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#edit-milestone
func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt *UpdateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) { func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt *UpdateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -185,7 +187,7 @@ func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt ...@@ -185,7 +187,7 @@ func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt
// GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options. // GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#get-all-issues-assigned-to-a-single-milestone
type GetMilestoneIssuesOptions struct { type GetMilestoneIssuesOptions struct {
ListOptions ListOptions
} }
...@@ -193,7 +195,7 @@ type GetMilestoneIssuesOptions struct { ...@@ -193,7 +195,7 @@ type GetMilestoneIssuesOptions struct {
// GetMilestoneIssues gets all issues assigned to a single project milestone. // GetMilestoneIssues gets all issues assigned to a single project milestone.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/milestones.md#get-all-issues-assigned-to-a-single-milestone
func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, opt *GetMilestoneIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) { func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, opt *GetMilestoneIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -19,14 +19,16 @@ package gitlab ...@@ -19,14 +19,16 @@ package gitlab
// NamespacesService handles communication with the namespace related methods // NamespacesService handles communication with the namespace related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/namespaces.md
type NamespacesService struct { type NamespacesService struct {
client *Client client *Client
} }
// Namespace represents a GitLab namespace. // Namespace represents a GitLab namespace.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/namespaces.md
type Namespace struct { type Namespace struct {
ID int `json:"id"` ID int `json:"id"`
Path string `json:"path"` Path string `json:"path"`
...@@ -39,7 +41,8 @@ func (n Namespace) String() string { ...@@ -39,7 +41,8 @@ func (n Namespace) String() string {
// ListNamespacesOptions represents the available ListNamespaces() options. // ListNamespacesOptions represents the available ListNamespaces() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/namespaces.md#list-namespaces
type ListNamespacesOptions struct { type ListNamespacesOptions struct {
ListOptions ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"`
...@@ -47,7 +50,8 @@ type ListNamespacesOptions struct { ...@@ -47,7 +50,8 @@ type ListNamespacesOptions struct {
// ListNamespaces gets a list of projects accessible by the authenticated user. // ListNamespaces gets a list of projects accessible by the authenticated user.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/namespaces.md#list-namespaces
func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options ...OptionFunc) ([]*Namespace, *Response, error) { func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options ...OptionFunc) ([]*Namespace, *Response, error) {
req, err := s.client.NewRequest("GET", "namespaces", opt, options) req, err := s.client.NewRequest("GET", "namespaces", opt, options)
if err != nil { if err != nil {
...@@ -67,7 +71,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options . ...@@ -67,7 +71,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options .
// or path. // or path.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/namespaces.html#search-for-namespace // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/namespaces.md#search-for-namespace
func (s *NamespacesService) SearchNamespace(query string, options ...OptionFunc) ([]*Namespace, *Response, error) { func (s *NamespacesService) SearchNamespace(query string, options ...OptionFunc) ([]*Namespace, *Response, error) {
var q struct { var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"` Search string `url:"search,omitempty" json:"search,omitempty"`
......
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// NotesService handles communication with the notes related methods // NotesService handles communication with the notes related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/notes.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md
type NotesService struct { type NotesService struct {
client *Client client *Client
} }
// Note represents a GitLab note. // Note represents a GitLab note.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/notes.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md
type Note struct { type Note struct {
ID int `json:"id"` ID int `json:"id"`
Body string `json:"body"` Body string `json:"body"`
...@@ -59,7 +61,7 @@ func (n Note) String() string { ...@@ -59,7 +61,7 @@ func (n Note) String() string {
// ListIssueNotesOptions represents the available ListIssueNotes() options. // ListIssueNotesOptions represents the available ListIssueNotes() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#list-project-issue-notes
type ListIssueNotesOptions struct { type ListIssueNotesOptions struct {
ListOptions ListOptions
} }
...@@ -67,7 +69,7 @@ type ListIssueNotesOptions struct { ...@@ -67,7 +69,7 @@ type ListIssueNotesOptions struct {
// ListIssueNotes gets a list of all notes for a single issue. // ListIssueNotes gets a list of all notes for a single issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#list-project-issue-notes
func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssueNotesOptions, options ...OptionFunc) ([]*Note, *Response, error) { func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssueNotesOptions, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -92,7 +94,7 @@ func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssue ...@@ -92,7 +94,7 @@ func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssue
// GetIssueNote returns a single note for a specific project issue. // GetIssueNote returns a single note for a specific project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-issue-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#get-single-issue-note
func (s *NotesService) GetIssueNote(pid interface{}, issue int, note int, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) GetIssueNote(pid interface{}, issue int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -118,7 +120,7 @@ func (s *NotesService) GetIssueNote(pid interface{}, issue int, note int, option ...@@ -118,7 +120,7 @@ func (s *NotesService) GetIssueNote(pid interface{}, issue int, note int, option
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-issue-note
type CreateIssueNoteOptions struct { type CreateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -126,7 +128,7 @@ type CreateIssueNoteOptions struct { ...@@ -126,7 +128,7 @@ type CreateIssueNoteOptions struct {
// CreateIssueNote creates a new note to a single project issue. // CreateIssueNote creates a new note to a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-issue-note
func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -152,14 +154,14 @@ func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIs ...@@ -152,14 +154,14 @@ func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIs
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-issue-note
type UpdateIssueNoteOptions struct { type UpdateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateIssueNote modifies existing note of an issue. // UpdateIssueNote modifies existing note of an issue.
// //
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-issue-note
func (s *NotesService) UpdateIssueNote(pid interface{}, issue int, note int, opt *UpdateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) UpdateIssueNote(pid interface{}, issue int, note int, opt *UpdateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -185,7 +187,7 @@ func (s *NotesService) UpdateIssueNote(pid interface{}, issue int, note int, opt ...@@ -185,7 +187,7 @@ func (s *NotesService) UpdateIssueNote(pid interface{}, issue int, note int, opt
// notes are comments users can post to a snippet. // notes are comments users can post to a snippet.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#list-all-snippet-notes
func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, options ...OptionFunc) ([]*Note, *Response, error) { func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -210,7 +212,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, options .. ...@@ -210,7 +212,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, options ..
// GetSnippetNote returns a single note for a given snippet. // GetSnippetNote returns a single note for a given snippet.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-snippet-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#get-single-snippet-note
func (s *NotesService) GetSnippetNote(pid interface{}, snippet int, note int, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) GetSnippetNote(pid interface{}, snippet int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -236,7 +238,7 @@ func (s *NotesService) GetSnippetNote(pid interface{}, snippet int, note int, op ...@@ -236,7 +238,7 @@ func (s *NotesService) GetSnippetNote(pid interface{}, snippet int, note int, op
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-snippet-note
type CreateSnippetNoteOptions struct { type CreateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -245,7 +247,7 @@ type CreateSnippetNoteOptions struct { ...@@ -245,7 +247,7 @@ type CreateSnippetNoteOptions struct {
// comments users can post to a snippet. // comments users can post to a snippet.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-snippet-note
func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *CreateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *CreateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -271,14 +273,14 @@ func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *Crea ...@@ -271,14 +273,14 @@ func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *Crea
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-snippet-note
type UpdateSnippetNoteOptions struct { type UpdateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateSnippetNote modifies existing note of a snippet. // UpdateSnippetNote modifies existing note of a snippet.
// //
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-snippet-note
func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet int, note int, opt *UpdateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet int, note int, opt *UpdateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -303,7 +305,7 @@ func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet int, note int, ...@@ -303,7 +305,7 @@ func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet int, note int,
// ListMergeRequestNotes gets a list of all notes for a single merge request. // ListMergeRequestNotes gets a list of all notes for a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#list-all-merge-request-notes
func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Note, *Response, error) { func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -328,7 +330,7 @@ func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int, ...@@ -328,7 +330,7 @@ func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int,
// GetMergeRequestNote returns a single note for a given merge request. // GetMergeRequestNote returns a single note for a given merge request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-merge-request-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#get-single-merge-request-note
func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest int, note int, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -354,7 +356,7 @@ func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest int, no ...@@ -354,7 +356,7 @@ func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest int, no
// CreateMergeRequestNote() options. // CreateMergeRequestNote() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-merge-request-note
type CreateMergeRequestNoteOptions struct { type CreateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
...@@ -362,7 +364,7 @@ type CreateMergeRequestNoteOptions struct { ...@@ -362,7 +364,7 @@ type CreateMergeRequestNoteOptions struct {
// CreateMergeRequestNote creates a new note for a single merge request. // CreateMergeRequestNote creates a new note for a single merge request.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#create-new-merge-request-note
func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -388,14 +390,14 @@ func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, ...@@ -388,14 +390,14 @@ func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int,
// UpdateMergeRequestNote() options. // UpdateMergeRequestNote() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-merge-request-note
type UpdateMergeRequestNoteOptions struct { type UpdateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"` Body *string `url:"body,omitempty" json:"body,omitempty"`
} }
// UpdateMergeRequestNote modifies existing note of a merge request. // UpdateMergeRequestNote modifies existing note of a merge request.
// //
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notes.md#modify-existing-merge-request-note
func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest int, note int, opt *UpdateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) { func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest int, note int, opt *UpdateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -9,7 +9,8 @@ import ( ...@@ -9,7 +9,8 @@ import (
// NotificationSettingsService handles communication with the notification settings // NotificationSettingsService handles communication with the notification settings
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md
type NotificationSettingsService struct { type NotificationSettingsService struct {
client *Client client *Client
} }
...@@ -17,7 +18,7 @@ type NotificationSettingsService struct { ...@@ -17,7 +18,7 @@ type NotificationSettingsService struct {
// NotificationSettings represents the Gitlab notification setting. // NotificationSettings represents the Gitlab notification setting.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#notification-settings
type NotificationSettings struct { type NotificationSettings struct {
Level NotificationLevelValue `json:"level"` Level NotificationLevelValue `json:"level"`
NotificationEmail string `json:"notification_email"` NotificationEmail string `json:"notification_email"`
...@@ -27,7 +28,7 @@ type NotificationSettings struct { ...@@ -27,7 +28,7 @@ type NotificationSettings struct {
// NotificationEvents represents the avialable notification setting events. // NotificationEvents represents the avialable notification setting events.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#notification-settings
type NotificationEvents struct { type NotificationEvents struct {
CloseIssue bool `json:"close_issue"` CloseIssue bool `json:"close_issue"`
CloseMergeRequest bool `json:"close_merge_request"` CloseMergeRequest bool `json:"close_merge_request"`
...@@ -50,7 +51,7 @@ func (ns NotificationSettings) String() string { ...@@ -50,7 +51,7 @@ func (ns NotificationSettings) String() string {
// GetGlobalSettings returns current notification settings and email address. // GetGlobalSettings returns current notification settings and email address.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#global-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#global-notification-settings
func (s *NotificationSettingsService) GetGlobalSettings(options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) GetGlobalSettings(options ...OptionFunc) (*NotificationSettings, *Response, error) {
u := "notification_settings" u := "notification_settings"
...@@ -90,7 +91,7 @@ type NotificationSettingsOptions struct { ...@@ -90,7 +91,7 @@ type NotificationSettingsOptions struct {
// UpdateGlobalSettings updates current notification settings and email address. // UpdateGlobalSettings updates current notification settings and email address.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#update-global-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#update-global-notification-settings
func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
if opt.Level != nil && *opt.Level == GlobalNotificationLevel { if opt.Level != nil && *opt.Level == GlobalNotificationLevel {
return nil, nil, errors.New( return nil, nil, errors.New(
...@@ -116,7 +117,7 @@ func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSett ...@@ -116,7 +117,7 @@ func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSett
// GetSettingsForGroup returns current group notification settings. // GetSettingsForGroup returns current group notification settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#group-project-level-notification-settings
func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -141,7 +142,7 @@ func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, optio ...@@ -141,7 +142,7 @@ func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, optio
// GetSettingsForProject returns current project notification settings. // GetSettingsForProject returns current project notification settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#group-project-level-notification-settings
func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -166,7 +167,7 @@ func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, opt ...@@ -166,7 +167,7 @@ func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, opt
// UpdateSettingsForGroup updates current group notification settings. // UpdateSettingsForGroup updates current group notification settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#update-group-project-level-notification-settings
func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
group, err := parseID(gid) group, err := parseID(gid)
if err != nil { if err != nil {
...@@ -191,7 +192,7 @@ func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, op ...@@ -191,7 +192,7 @@ func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, op
// UpdateSettingsForProject updates current project notification settings. // UpdateSettingsForProject updates current project notification settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/notification_settings.md#update-group-project-level-notification-settings
func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) { func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// PipelinesService handles communication with the repositories related // PipelinesService handles communication with the repositories related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md
type PipelinesService struct { type PipelinesService struct {
client *Client client *Client
} }
// Pipeline represents a GitLab pipeline. // Pipeline represents a GitLab pipeline.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md
type Pipeline struct { type Pipeline struct {
ID int `json:"id"` ID int `json:"id"`
Status string `json:"status"` Status string `json:"status"`
...@@ -64,7 +66,8 @@ func (i Pipeline) String() string { ...@@ -64,7 +66,8 @@ func (i Pipeline) String() string {
// ListProjectPipelines gets a list of project piplines. // ListProjectPipelines gets a list of project piplines.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#list-project-pipelines
func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...OptionFunc) ([]*Pipeline, *Response, error) { func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...OptionFunc) ([]*Pipeline, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -87,7 +90,8 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...Opti ...@@ -87,7 +90,8 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...Opti
// GetPipeline gets a single project pipeline. // GetPipeline gets a single project pipeline.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#get-a-single-pipeline // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#get-a-single-pipeline
func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ...OptionFunc) (*Pipeline, *Response, error) { func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -111,14 +115,16 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options .. ...@@ -111,14 +115,16 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ..
// CreatePipelineOptions represents the available CreatePipeline() options. // CreatePipelineOptions represents the available CreatePipeline() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#create-a-new-pipeline
type CreatePipelineOptions struct { type CreatePipelineOptions struct {
Ref *string `url:"ref,omitempty" json:"ref"` Ref *string `url:"ref,omitempty" json:"ref"`
} }
// CreatePipeline creates a new project pipeline. // CreatePipeline creates a new project pipeline.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#create-a-new-pipeline
func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOptions, options ...OptionFunc) (*Pipeline, *Response, error) { func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOptions, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -143,7 +149,7 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp ...@@ -143,7 +149,7 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp
// RetryPipelineBuild retries failed builds in a pipeline // RetryPipelineBuild retries failed builds in a pipeline
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/pipelines.html#retry-failed-builds-in-a-pipeline // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#retry-failed-builds-in-a-pipeline
func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) { func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -168,7 +174,7 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int, o ...@@ -168,7 +174,7 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int, o
// CancelPipelineBuild cancels a pipeline builds // CancelPipelineBuild cancels a pipeline builds
// //
// GitLab API docs: // GitLab API docs:
//https://docs.gitlab.com/ce/api/pipelines.html#cancel-a-pipelines-builds //https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/pipelines.md#cancel-a-pipelines-builds
func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) { func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -26,14 +26,16 @@ import ( ...@@ -26,14 +26,16 @@ import (
// ProjectSnippetsService handles communication with the project snippets // ProjectSnippetsService handles communication with the project snippets
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md
type ProjectSnippetsService struct { type ProjectSnippetsService struct {
client *Client client *Client
} }
// Snippet represents a GitLab project snippet. // Snippet represents a GitLab project snippet.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md
type Snippet struct { type Snippet struct {
ID int `json:"id"` ID int `json:"id"`
Title string `json:"title"` Title string `json:"title"`
...@@ -57,14 +59,16 @@ func (s Snippet) String() string { ...@@ -57,14 +59,16 @@ func (s Snippet) String() string {
// ListSnippetsOptions represents the available ListSnippets() options. // ListSnippetsOptions represents the available ListSnippets() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#list-snippets
type ListSnippetsOptions struct { type ListSnippetsOptions struct {
ListOptions ListOptions
} }
// ListSnippets gets a list of project snippets. // ListSnippets gets a list of project snippets.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#list-snippets
func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) { func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -89,7 +93,7 @@ func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListSnippets ...@@ -89,7 +93,7 @@ func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListSnippets
// GetSnippet gets a single project snippet // GetSnippet gets a single project snippet
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#single-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#single-snippet
func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Snippet, *Response, error) { func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -114,7 +118,7 @@ func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, option ...@@ -114,7 +118,7 @@ func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, option
// CreateSnippetOptions represents the available CreateSnippet() options. // CreateSnippetOptions represents the available CreateSnippet() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#create-new-snippet
type CreateSnippetOptions struct { type CreateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"` FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
...@@ -126,7 +130,7 @@ type CreateSnippetOptions struct { ...@@ -126,7 +130,7 @@ type CreateSnippetOptions struct {
// to create new snippets. // to create new snippets.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#create-new-snippet
func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) { func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -151,7 +155,7 @@ func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateSnipp ...@@ -151,7 +155,7 @@ func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateSnipp
// UpdateSnippetOptions represents the available UpdateSnippet() options. // UpdateSnippetOptions represents the available UpdateSnippet() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#update-snippet
type UpdateSnippetOptions struct { type UpdateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"` FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
...@@ -163,7 +167,7 @@ type UpdateSnippetOptions struct { ...@@ -163,7 +167,7 @@ type UpdateSnippetOptions struct {
// permission to change an existing snippet. // permission to change an existing snippet.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#update-snippet
func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt *UpdateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) { func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt *UpdateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -190,7 +194,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt ...@@ -190,7 +194,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt
// code. // code.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#delete-snippet // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#delete-snippet
func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Response, error) { func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -209,7 +213,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, opt ...@@ -209,7 +213,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, opt
// SnippetContent returns the raw project snippet as plain text. // SnippetContent returns the raw project snippet as plain text.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#snippet-content // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/project_snippets.md#snippet-content
func (s *ProjectSnippetsService) SnippetContent(pid interface{}, snippet int, options ...OptionFunc) ([]byte, *Response, error) { func (s *ProjectSnippetsService) SnippetContent(pid interface{}, snippet int, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
This diff is collapsed.
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// RepositoriesService handles communication with the repositories related // RepositoriesService handles communication with the repositories related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
type RepositoriesService struct { type RepositoriesService struct {
client *Client client *Client
} }
// TreeNode represents a GitLab repository file or directory. // TreeNode represents a GitLab repository file or directory.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md
type TreeNode struct { type TreeNode struct {
ID string `json:"id"` ID string `json:"id"`
Name string `json:"name"` Name string `json:"name"`
...@@ -47,7 +49,7 @@ func (t TreeNode) String() string { ...@@ -47,7 +49,7 @@ func (t TreeNode) String() string {
// ListTreeOptions represents the available ListTree() options. // ListTreeOptions represents the available ListTree() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#list-repository-tree
type ListTreeOptions struct { type ListTreeOptions struct {
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
RefName *string `url:"ref_name,omitempty" json:"ref_name,omitempty"` RefName *string `url:"ref_name,omitempty" json:"ref_name,omitempty"`
...@@ -56,7 +58,7 @@ type ListTreeOptions struct { ...@@ -56,7 +58,7 @@ type ListTreeOptions struct {
// ListTree gets a list of repository files and directories in a project. // ListTree gets a list of repository files and directories in a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#list-repository-tree
func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, options ...OptionFunc) ([]*TreeNode, *Response, error) { func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, options ...OptionFunc) ([]*TreeNode, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -81,7 +83,7 @@ func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, op ...@@ -81,7 +83,7 @@ func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, op
// RawFileContentOptions represents the available RawFileContent() options. // RawFileContentOptions represents the available RawFileContent() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#raw-file-content // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#raw-file-content
type RawFileContentOptions struct { type RawFileContentOptions struct {
FilePath *string `url:"filepath,omitempty" json:"filepath,omitempty"` FilePath *string `url:"filepath,omitempty" json:"filepath,omitempty"`
} }
...@@ -89,7 +91,7 @@ type RawFileContentOptions struct { ...@@ -89,7 +91,7 @@ type RawFileContentOptions struct {
// RawFileContent gets the raw file contents for a file by commit SHA and path // RawFileContent gets the raw file contents for a file by commit SHA and path
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#raw-file-content // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#raw-file-content
func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *RawFileContentOptions, options ...OptionFunc) ([]byte, *Response, error) { func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *RawFileContentOptions, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -114,7 +116,7 @@ func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *R ...@@ -114,7 +116,7 @@ func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *R
// RawBlobContent gets the raw file contents for a blob by blob SHA. // RawBlobContent gets the raw file contents for a blob by blob SHA.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#raw-blob-content // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#raw-blob-content
func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, options ...OptionFunc) ([]byte, *Response, error) { func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -139,7 +141,7 @@ func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, option ...@@ -139,7 +141,7 @@ func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, option
// ArchiveOptions represents the available Archive() options. // ArchiveOptions represents the available Archive() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#get-file-archive // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#get-file-archive
type ArchiveOptions struct { type ArchiveOptions struct {
SHA *string `url:"sha,omitempty" json:"sha,omitempty"` SHA *string `url:"sha,omitempty" json:"sha,omitempty"`
} }
...@@ -147,7 +149,7 @@ type ArchiveOptions struct { ...@@ -147,7 +149,7 @@ type ArchiveOptions struct {
// Archive gets an archive of the repository. // Archive gets an archive of the repository.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#get-file-archive // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#get-file-archive
func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, options ...OptionFunc) ([]byte, *Response, error) { func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -172,7 +174,7 @@ func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, opti ...@@ -172,7 +174,7 @@ func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, opti
// Compare represents the result of a comparison of branches, tags or commits. // Compare represents the result of a comparison of branches, tags or commits.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#compare-branches-tags-or-commits
type Compare struct { type Compare struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Commits []*Commit `json:"commits"` Commits []*Commit `json:"commits"`
...@@ -188,7 +190,7 @@ func (c Compare) String() string { ...@@ -188,7 +190,7 @@ func (c Compare) String() string {
// CompareOptions represents the available Compare() options. // CompareOptions represents the available Compare() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#compare-branches-tags-or-commits
type CompareOptions struct { type CompareOptions struct {
From *string `url:"from,omitempty" json:"from,omitempty"` From *string `url:"from,omitempty" json:"from,omitempty"`
To *string `url:"to,omitempty" json:"to,omitempty"` To *string `url:"to,omitempty" json:"to,omitempty"`
...@@ -197,7 +199,7 @@ type CompareOptions struct { ...@@ -197,7 +199,7 @@ type CompareOptions struct {
// Compare compares branches, tags or commits. // Compare compares branches, tags or commits.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#compare-branches-tags-or-commits
func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, options ...OptionFunc) (*Compare, *Response, error) { func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, options ...OptionFunc) (*Compare, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -221,7 +223,8 @@ func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, opti ...@@ -221,7 +223,8 @@ func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, opti
// Contributor represents a GitLap contributor. // Contributor represents a GitLap contributor.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#contributer
type Contributor struct { type Contributor struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
...@@ -236,7 +239,8 @@ func (c Contributor) String() string { ...@@ -236,7 +239,8 @@ func (c Contributor) String() string {
// Contributors gets the repository contributors list. // Contributors gets the repository contributors list.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repositories.md#contributer
func (s *RepositoriesService) Contributors(pid interface{}, options ...OptionFunc) ([]*Contributor, *Response, error) { func (s *RepositoriesService) Contributors(pid interface{}, options ...OptionFunc) ([]*Contributor, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// RepositoryFilesService handles communication with the repository files // RepositoryFilesService handles communication with the repository files
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md
type RepositoryFilesService struct { type RepositoryFilesService struct {
client *Client client *Client
} }
// File represents a GitLab repository file. // File represents a GitLab repository file.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md
type File struct { type File struct {
FileName string `json:"file_name"` FileName string `json:"file_name"`
FilePath string `json:"file_path"` FilePath string `json:"file_path"`
...@@ -50,7 +52,7 @@ func (r File) String() string { ...@@ -50,7 +52,7 @@ func (r File) String() string {
// GetFileOptions represents the available GetFile() options. // GetFileOptions represents the available GetFile() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#get-file-from-respository
type GetFileOptions struct { type GetFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
...@@ -60,7 +62,7 @@ type GetFileOptions struct { ...@@ -60,7 +62,7 @@ type GetFileOptions struct {
// name, size, content. Note that file content is Base64 encoded. // name, size, content. Note that file content is Base64 encoded.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#get-file-from-respository
func (s *RepositoryFilesService) GetFile(pid interface{}, opt *GetFileOptions, options ...OptionFunc) (*File, *Response, error) { func (s *RepositoryFilesService) GetFile(pid interface{}, opt *GetFileOptions, options ...OptionFunc) (*File, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -84,7 +86,8 @@ func (s *RepositoryFilesService) GetFile(pid interface{}, opt *GetFileOptions, o ...@@ -84,7 +86,8 @@ func (s *RepositoryFilesService) GetFile(pid interface{}, opt *GetFileOptions, o
// FileInfo represents file details of a GitLab repository file. // FileInfo represents file details of a GitLab repository file.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md
type FileInfo struct { type FileInfo struct {
FilePath string `json:"file_path"` FilePath string `json:"file_path"`
BranchName string `json:"branch_name"` BranchName string `json:"branch_name"`
...@@ -97,7 +100,7 @@ func (r FileInfo) String() string { ...@@ -97,7 +100,7 @@ func (r FileInfo) String() string {
// CreateFileOptions represents the available CreateFile() options. // CreateFileOptions represents the available CreateFile() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#create-new-file-in-repository
type CreateFileOptions struct { type CreateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -111,7 +114,7 @@ type CreateFileOptions struct { ...@@ -111,7 +114,7 @@ type CreateFileOptions struct {
// CreateFile creates a new file in a repository. // CreateFile creates a new file in a repository.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#create-new-file-in-repository
func (s *RepositoryFilesService) CreateFile(pid interface{}, opt *CreateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) { func (s *RepositoryFilesService) CreateFile(pid interface{}, opt *CreateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -136,7 +139,7 @@ func (s *RepositoryFilesService) CreateFile(pid interface{}, opt *CreateFileOpti ...@@ -136,7 +139,7 @@ func (s *RepositoryFilesService) CreateFile(pid interface{}, opt *CreateFileOpti
// UpdateFileOptions represents the available UpdateFile() options. // UpdateFileOptions represents the available UpdateFile() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#update-existing-file-in-repository
type UpdateFileOptions struct { type UpdateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -150,7 +153,7 @@ type UpdateFileOptions struct { ...@@ -150,7 +153,7 @@ type UpdateFileOptions struct {
// UpdateFile updates an existing file in a repository // UpdateFile updates an existing file in a repository
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#update-existing-file-in-repository
func (s *RepositoryFilesService) UpdateFile(pid interface{}, opt *UpdateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) { func (s *RepositoryFilesService) UpdateFile(pid interface{}, opt *UpdateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -175,7 +178,7 @@ func (s *RepositoryFilesService) UpdateFile(pid interface{}, opt *UpdateFileOpti ...@@ -175,7 +178,7 @@ func (s *RepositoryFilesService) UpdateFile(pid interface{}, opt *UpdateFileOpti
// DeleteFileOptions represents the available DeleteFile() options. // DeleteFileOptions represents the available DeleteFile() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#delete-existing-file-in-repository
type DeleteFileOptions struct { type DeleteFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"` FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"` BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
...@@ -187,7 +190,7 @@ type DeleteFileOptions struct { ...@@ -187,7 +190,7 @@ type DeleteFileOptions struct {
// DeleteFile deletes an existing file in a repository // DeleteFile deletes an existing file in a repository
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/repository_files.md#delete-existing-file-in-repository
func (s *RepositoryFilesService) DeleteFile(pid interface{}, opt *DeleteFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) { func (s *RepositoryFilesService) DeleteFile(pid interface{}, opt *DeleteFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -25,14 +25,16 @@ import ( ...@@ -25,14 +25,16 @@ import (
// ServicesService handles communication with the services related methods of // ServicesService handles communication with the services related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/services.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md
type ServicesService struct { type ServicesService struct {
client *Client client *Client
} }
// Service represents a GitLab service. // Service represents a GitLab service.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/services.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md
type Service struct { type Service struct {
ID *int `json:"id"` ID *int `json:"id"`
Title *string `json:"title"` Title *string `json:"title"`
...@@ -50,7 +52,7 @@ type Service struct { ...@@ -50,7 +52,7 @@ type Service struct {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-gitlab-ci-service
type SetGitLabCIServiceOptions struct { type SetGitLabCIServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty"` Token *string `url:"token,omitempty" json:"token,omitempty"`
ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"` ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"`
...@@ -59,7 +61,7 @@ type SetGitLabCIServiceOptions struct { ...@@ -59,7 +61,7 @@ type SetGitLabCIServiceOptions struct {
// SetGitLabCIService sets GitLab CI service for a project. // SetGitLabCIService sets GitLab CI service for a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-gitlab-ci-service
func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCIServiceOptions, options ...OptionFunc) (*Response, error) { func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCIServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -78,7 +80,7 @@ func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCISe ...@@ -78,7 +80,7 @@ func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCISe
// DeleteGitLabCIService deletes GitLab CI service settings for a project. // DeleteGitLabCIService deletes GitLab CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-gitlab-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#delete-gitlab-ci-service
func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...OptionFunc) (*Response, error) { func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -98,7 +100,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...Opti ...@@ -98,7 +100,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...Opti
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-hipchat-service
type SetHipChatServiceOptions struct { type SetHipChatServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty" ` Token *string `url:"token,omitempty" json:"token,omitempty" `
Room *string `url:"room,omitempty" json:"room,omitempty"` Room *string `url:"room,omitempty" json:"room,omitempty"`
...@@ -107,7 +109,7 @@ type SetHipChatServiceOptions struct { ...@@ -107,7 +109,7 @@ type SetHipChatServiceOptions struct {
// SetHipChatService sets HipChat service for a project // SetHipChatService sets HipChat service for a project
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-hipchat-service
func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServiceOptions, options ...OptionFunc) (*Response, error) { func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -126,7 +128,7 @@ func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServ ...@@ -126,7 +128,7 @@ func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServ
// DeleteHipChatService deletes HipChat service for project. // DeleteHipChatService deletes HipChat service for project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-hipchat-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#delete-hipchat-service
func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...OptionFunc) (*Response, error) { func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -146,7 +148,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...Optio ...@@ -146,7 +148,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...Optio
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#createedit-drone-ci-service
type SetDroneCIServiceOptions struct { type SetDroneCIServiceOptions struct {
Token *string `url:"token" json:"token" ` Token *string `url:"token" json:"token" `
DroneURL *string `url:"drone_url" json:"drone_url"` DroneURL *string `url:"drone_url" json:"drone_url"`
...@@ -156,7 +158,7 @@ type SetDroneCIServiceOptions struct { ...@@ -156,7 +158,7 @@ type SetDroneCIServiceOptions struct {
// SetDroneCIService sets Drone CI service for a project. // SetDroneCIService sets Drone CI service for a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#createedit-drone-ci-service
func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServiceOptions, options ...OptionFunc) (*Response, error) { func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -175,7 +177,7 @@ func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServ ...@@ -175,7 +177,7 @@ func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServ
// DeleteDroneCIService deletes Drone CI service settings for a project. // DeleteDroneCIService deletes Drone CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-drone-ci-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#delete-drone-ci-service
func (s *ServicesService) DeleteDroneCIService(pid interface{}, options ...OptionFunc) (*Response, error) { func (s *ServicesService) DeleteDroneCIService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -207,7 +209,7 @@ type DroneCIService struct { ...@@ -207,7 +209,7 @@ type DroneCIService struct {
// GetDroneCIService gets Drone CI service settings for a project. // GetDroneCIService gets Drone CI service settings for a project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#get-drone-ci-service-settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#get-drone-ci-service-settings
func (s *ServicesService) GetDroneCIService(pid interface{}, options ...OptionFunc) (*DroneCIService, *Response, error) { func (s *ServicesService) GetDroneCIService(pid interface{}, options ...OptionFunc) (*DroneCIService, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -233,7 +235,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}, options ...OptionFu ...@@ -233,7 +235,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}, options ...OptionFu
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-slack-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-slack-service
type SetSlackServiceOptions struct { type SetSlackServiceOptions struct {
WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" ` WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" `
Username *string `url:"username,omitempty" json:"username,omitempty" ` Username *string `url:"username,omitempty" json:"username,omitempty" `
...@@ -243,7 +245,7 @@ type SetSlackServiceOptions struct { ...@@ -243,7 +245,7 @@ type SetSlackServiceOptions struct {
// SetSlackService sets Slack service for a project // SetSlackService sets Slack service for a project
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-slack-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#edit-slack-service
func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceOptions, options ...OptionFunc) (*Response, error) { func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -262,7 +264,7 @@ func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceO ...@@ -262,7 +264,7 @@ func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceO
// DeleteSlackService deletes Slack service for project. // DeleteSlackService deletes Slack service for project.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-slack-service // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/services.md#delete-slack-service
func (s *ServicesService) DeleteSlackService(pid interface{}, options ...OptionFunc) (*Response, error) { func (s *ServicesService) DeleteSlackService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -21,14 +21,16 @@ import "time" ...@@ -21,14 +21,16 @@ import "time"
// SessionService handles communication with the session related methods of // SessionService handles communication with the session related methods of
// the GitLab API. // the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/session.md
type SessionService struct { type SessionService struct {
client *Client client *Client
} }
// Session represents a GitLab session. // Session represents a GitLab session.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/session.md#session
type Session struct { type Session struct {
ID int `json:"id"` ID int `json:"id"`
Username string `json:"username"` Username string `json:"username"`
...@@ -52,7 +54,8 @@ type Session struct { ...@@ -52,7 +54,8 @@ type Session struct {
// GetSessionOptions represents the available Session() options. // GetSessionOptions represents the available Session() options.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/session.md#session
type GetSessionOptions struct { type GetSessionOptions struct {
Login *string `url:"login,omitempty" json:"login,omitempty"` Login *string `url:"login,omitempty" json:"login,omitempty"`
Email *string `url:"email,omitempty" json:"email,omitempty"` Email *string `url:"email,omitempty" json:"email,omitempty"`
...@@ -61,7 +64,8 @@ type GetSessionOptions struct { ...@@ -61,7 +64,8 @@ type GetSessionOptions struct {
// GetSession logs in to get private token. // GetSession logs in to get private token.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/session.md#session
func (s *SessionService) GetSession(opt *GetSessionOptions, options ...OptionFunc) (*Session, *Response, error) { func (s *SessionService) GetSession(opt *GetSessionOptions, options ...OptionFunc) (*Session, *Response, error) {
req, err := s.client.NewRequest("POST", "session", opt, options) req, err := s.client.NewRequest("POST", "session", opt, options)
if err != nil { if err != nil {
......
...@@ -21,14 +21,16 @@ import "time" ...@@ -21,14 +21,16 @@ import "time"
// SettingsService handles communication with the application SettingsService // SettingsService handles communication with the application SettingsService
// related methods of the GitLab API. // related methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/settings.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/settings.md
type SettingsService struct { type SettingsService struct {
client *Client client *Client
} }
// Settings represents the GitLab application settings. // Settings represents the GitLab application settings.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/settings.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/settings.md
type Settings struct { type Settings struct {
ID int `json:"id"` ID int `json:"id"`
DefaultProjectsLimit int `json:"default_projects_limit"` DefaultProjectsLimit int `json:"default_projects_limit"`
...@@ -58,7 +60,7 @@ func (s Settings) String() string { ...@@ -58,7 +60,7 @@ func (s Settings) String() string {
// GetSettings gets the current application settings. // GetSettings gets the current application settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/settings.html#get-current-application.settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/settings.md#get-current-application.settings
func (s *SettingsService) GetSettings(options ...OptionFunc) (*Settings, *Response, error) { func (s *SettingsService) GetSettings(options ...OptionFunc) (*Settings, *Response, error) {
req, err := s.client.NewRequest("GET", "application/settings", nil, options) req, err := s.client.NewRequest("GET", "application/settings", nil, options)
if err != nil { if err != nil {
...@@ -77,7 +79,7 @@ func (s *SettingsService) GetSettings(options ...OptionFunc) (*Settings, *Respon ...@@ -77,7 +79,7 @@ func (s *SettingsService) GetSettings(options ...OptionFunc) (*Settings, *Respon
// UpdateSettingsOptions represents the available UpdateSettings() options. // UpdateSettingsOptions represents the available UpdateSettings() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/settings.html#change-application.settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/settings.md#change-application.settings
type UpdateSettingsOptions struct { type UpdateSettingsOptions struct {
DefaultProjectsLimit *int `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"` DefaultProjectsLimit *int `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"`
SignupEnabled *bool `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"` SignupEnabled *bool `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"`
...@@ -100,7 +102,7 @@ type UpdateSettingsOptions struct { ...@@ -100,7 +102,7 @@ type UpdateSettingsOptions struct {
// UpdateSettings updates the application settings. // UpdateSettings updates the application settings.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/settings.html#change-application.settings // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/settings.md#change-application.settings
func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions, options ...OptionFunc) (*Settings, *Response, error) { func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions, options ...OptionFunc) (*Settings, *Response, error) {
req, err := s.client.NewRequest("PUT", "application/settings", opt, options) req, err := s.client.NewRequest("PUT", "application/settings", opt, options)
if err != nil { if err != nil {
......
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// SystemHooksService handles communication with the system hooks related // SystemHooksService handles communication with the system hooks related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md
type SystemHooksService struct { type SystemHooksService struct {
client *Client client *Client
} }
// Hook represents a GitLap system hook. // Hook represents a GitLap system hook.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md
type Hook struct { type Hook struct {
ID int `json:"id"` ID int `json:"id"`
URL string `json:"url"` URL string `json:"url"`
...@@ -45,7 +47,7 @@ func (h Hook) String() string { ...@@ -45,7 +47,7 @@ func (h Hook) String() string {
// ListHooks gets a list of system hooks. // ListHooks gets a list of system hooks.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#list-system-hooks
func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Response, error) { func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Response, error) {
req, err := s.client.NewRequest("GET", "hooks", nil, options) req, err := s.client.NewRequest("GET", "hooks", nil, options)
if err != nil { if err != nil {
...@@ -64,7 +66,7 @@ func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Respons ...@@ -64,7 +66,7 @@ func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Respons
// AddHookOptions represents the available AddHook() options. // AddHookOptions represents the available AddHook() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#add-new-system-hook-hook
type AddHookOptions struct { type AddHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
} }
...@@ -72,7 +74,7 @@ type AddHookOptions struct { ...@@ -72,7 +74,7 @@ type AddHookOptions struct {
// AddHook adds a new system hook hook. // AddHook adds a new system hook hook.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#add-new-system-hook-hook
func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) (*Hook, *Response, error) { func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) (*Hook, *Response, error) {
req, err := s.client.NewRequest("POST", "hooks", opt, options) req, err := s.client.NewRequest("POST", "hooks", opt, options)
if err != nil { if err != nil {
...@@ -90,7 +92,8 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) ...@@ -90,7 +92,8 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc)
// HookEvent represents an event triggert by a GitLab system hook. // HookEvent represents an event triggert by a GitLab system hook.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md
type HookEvent struct { type HookEvent struct {
EventName string `json:"event_name"` EventName string `json:"event_name"`
Name string `json:"name"` Name string `json:"name"`
...@@ -107,7 +110,7 @@ func (h HookEvent) String() string { ...@@ -107,7 +110,7 @@ func (h HookEvent) String() string {
// TestHook tests a system hook. // TestHook tests a system hook.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#test-system-hook
func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEvent, *Response, error) { func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEvent, *Response, error) {
u := fmt.Sprintf("hooks/%d", hook) u := fmt.Sprintf("hooks/%d", hook)
...@@ -130,7 +133,7 @@ func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEve ...@@ -130,7 +133,7 @@ func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEve
// is also returned as JSON. // is also returned as JSON.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/system_hooks.md#delete-system-hook
func (s *SystemHooksService) DeleteHook(hook int, options ...OptionFunc) (*Response, error) { func (s *SystemHooksService) DeleteHook(hook int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("hooks/%d", hook) u := fmt.Sprintf("hooks/%d", hook)
......
...@@ -24,14 +24,16 @@ import ( ...@@ -24,14 +24,16 @@ import (
// TagsService handles communication with the tags related methods // TagsService handles communication with the tags related methods
// of the GitLab API. // of the GitLab API.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/tags.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md
type TagsService struct { type TagsService struct {
client *Client client *Client
} }
// Tag represents a GitLab tag. // Tag represents a GitLab tag.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/tags.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md
type Tag struct { type Tag struct {
Commit *Commit `json:"commit"` Commit *Commit `json:"commit"`
Name string `json:"name"` Name string `json:"name"`
...@@ -46,7 +48,7 @@ func (r Tag) String() string { ...@@ -46,7 +48,7 @@ func (r Tag) String() string {
// alphabetical order. // alphabetical order.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#list-project-repository-tags // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md#list-project-repository-tags
func (s *TagsService) ListTags(pid interface{}, options ...OptionFunc) ([]*Tag, *Response, error) { func (s *TagsService) ListTags(pid interface{}, options ...OptionFunc) ([]*Tag, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -72,7 +74,7 @@ func (s *TagsService) ListTags(pid interface{}, options ...OptionFunc) ([]*Tag, ...@@ -72,7 +74,7 @@ func (s *TagsService) ListTags(pid interface{}, options ...OptionFunc) ([]*Tag,
// with the tag information if the tag exists. It returns 404 if the tag does not exist. // with the tag information if the tag exists. It returns 404 if the tag does not exist.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#get-a-single-repository-tag // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md#get-a-single-repository-tag
func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc) (*Tag, *Response, error) { func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc) (*Tag, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -97,7 +99,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc) ...@@ -97,7 +99,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc)
// CreateTagOptions represents the available CreateTag() options. // CreateTagOptions represents the available CreateTag() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md#create-a-new-tag
type CreateTagOptions struct { type CreateTagOptions struct {
TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"` TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"` Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
...@@ -107,7 +109,7 @@ type CreateTagOptions struct { ...@@ -107,7 +109,7 @@ type CreateTagOptions struct {
// CreateTag creates a new tag in the repository that points to the supplied ref. // CreateTag creates a new tag in the repository that points to the supplied ref.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md#create-a-new-tag
func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options ...OptionFunc) (*Tag, *Response, error) { func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options ...OptionFunc) (*Tag, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -132,7 +134,7 @@ func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options ...@@ -132,7 +134,7 @@ func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options
// DeleteTag deletes a tag of a repository with given name. // DeleteTag deletes a tag of a repository with given name.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#delete-a-tag // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/tags.md#delete-a-tag
func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...OptionFunc) (*Response, error) { func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
...@@ -8,15 +8,17 @@ import ( ...@@ -8,15 +8,17 @@ import (
// TimeStatsService handles communication with the time tracking related // TimeStatsService handles communication with the time tracking related
// methods of the GitLab API. // methods of the GitLab API.
// //
// GitLab docs: https://docs.gitlab.com/ce/workflow/time_tracking.html // GitLab docs: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/workflow/time_tracking.md
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md
type TimeStatsService struct { type TimeStatsService struct {
client *Client client *Client
} }
// TimeStats represents the time estimates and time spent for an issue. // TimeStats represents the time estimates and time spent for an issue.
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md
type TimeStats struct { type TimeStats struct {
HumanTimeEstimate string `json:"human_time_estimate"` HumanTimeEstimate string `json:"human_time_estimate"`
HumanTotalTimeSpent string `json:"human_total_time_spent"` HumanTotalTimeSpent string `json:"human_total_time_spent"`
...@@ -32,7 +34,7 @@ func (t TimeStats) String() string { ...@@ -32,7 +34,7 @@ func (t TimeStats) String() string {
// options. // options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#set-a-time-estimate-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#set-a-time-estimate-for-an-issue
type SetTimeEstimateOptions struct { type SetTimeEstimateOptions struct {
Duration *string `url:"duration,omitempty" json:"duration,omitempty"` Duration *string `url:"duration,omitempty" json:"duration,omitempty"`
} }
...@@ -40,7 +42,7 @@ type SetTimeEstimateOptions struct { ...@@ -40,7 +42,7 @@ type SetTimeEstimateOptions struct {
// SetTimeEstimate sets the time estimate for a single project issue. // SetTimeEstimate sets the time estimate for a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#set-a-time-estimate-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#set-a-time-estimate-for-an-issue
func (s *TimeStatsService) SetTimeEstimate(pid interface{}, issue int, opt *SetTimeEstimateOptions, options ...OptionFunc) (*TimeStats, *Response, error) { func (s *TimeStatsService) SetTimeEstimate(pid interface{}, issue int, opt *SetTimeEstimateOptions, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -65,7 +67,7 @@ func (s *TimeStatsService) SetTimeEstimate(pid interface{}, issue int, opt *SetT ...@@ -65,7 +67,7 @@ func (s *TimeStatsService) SetTimeEstimate(pid interface{}, issue int, opt *SetT
// ResetTimeEstimate resets the time estimate for a single project issue. // ResetTimeEstimate resets the time estimate for a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#reset-the-time-estimate-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#reset-the-time-estimate-for-an-issue
func (s *TimeStatsService) ResetTimeEstimate(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) { func (s *TimeStatsService) ResetTimeEstimate(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -90,7 +92,7 @@ func (s *TimeStatsService) ResetTimeEstimate(pid interface{}, issue int, options ...@@ -90,7 +92,7 @@ func (s *TimeStatsService) ResetTimeEstimate(pid interface{}, issue int, options
// AddSpentTimeOptions represents the available AddSpentTime() options. // AddSpentTimeOptions represents the available AddSpentTime() options.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#add-spent-time-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#add-spent-time-for-an-issue
type AddSpentTimeOptions struct { type AddSpentTimeOptions struct {
Duration *string `url:"duration,omitempty" json:"duration,omitempty"` Duration *string `url:"duration,omitempty" json:"duration,omitempty"`
} }
...@@ -98,7 +100,7 @@ type AddSpentTimeOptions struct { ...@@ -98,7 +100,7 @@ type AddSpentTimeOptions struct {
// AddSpentTime adds spent time for a single project issue. // AddSpentTime adds spent time for a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#add-spent-time-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#add-spent-time-for-an-issue
func (s *TimeStatsService) AddSpentTime(pid interface{}, issue int, opt *AddSpentTimeOptions, options ...OptionFunc) (*TimeStats, *Response, error) { func (s *TimeStatsService) AddSpentTime(pid interface{}, issue int, opt *AddSpentTimeOptions, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -123,7 +125,7 @@ func (s *TimeStatsService) AddSpentTime(pid interface{}, issue int, opt *AddSpen ...@@ -123,7 +125,7 @@ func (s *TimeStatsService) AddSpentTime(pid interface{}, issue int, opt *AddSpen
// ResetSpentTime resets the spent time for a single project issue. // ResetSpentTime resets the spent time for a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#reset-spent-time-for-an-issue // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#reset-spent-time-for-an-issue
func (s *TimeStatsService) ResetSpentTime(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) { func (s *TimeStatsService) ResetSpentTime(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
...@@ -148,7 +150,7 @@ func (s *TimeStatsService) ResetSpentTime(pid interface{}, issue int, options .. ...@@ -148,7 +150,7 @@ func (s *TimeStatsService) ResetSpentTime(pid interface{}, issue int, options ..
// GetTimeSpent gets the spent time for a single project issue. // GetTimeSpent gets the spent time for a single project issue.
// //
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#get-time-tracking-stats // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/issues.md#get-time-tracking-stats
func (s *TimeStatsService) GetTimeSpent(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) { func (s *TimeStatsService) GetTimeSpent(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment