aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/xanzy/go-gitlab/branches.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/branches.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/branches.go32
1 files changed, 15 insertions, 17 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/branches.go b/vendor/github.com/xanzy/go-gitlab/branches.go
index 838245e..a792e3f 100644
--- a/vendor/github.com/xanzy/go-gitlab/branches.go
+++ b/vendor/github.com/xanzy/go-gitlab/branches.go
@@ -1,5 +1,5 @@
//
-// Copyright 2015, Sander van Harmelen
+// Copyright 2017, Sander van Harmelen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -24,16 +24,14 @@ import (
// BranchesService handles communication with the branch related methods
// 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://docs.gitlab.com/ce/api/branches.html
type BranchesService struct {
client *Client
}
// 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://docs.gitlab.com/ce/api/branches.html
type Branch struct {
Commit *Commit `json:"commit"`
Name string `json:"name"`
@@ -50,7 +48,7 @@ func (b Branch) String() string {
// ListBranchesOptions represents the available ListBranches() options.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#list-repository-branches
+// https://docs.gitlab.com/ce/api/branches.html#list-repository-branches
type ListBranchesOptions struct {
ListOptions
}
@@ -59,7 +57,7 @@ type ListBranchesOptions struct {
// name alphabetically.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#list-repository-branches
+// https://docs.gitlab.com/ce/api/branches.html#list-repository-branches
func (s *BranchesService) ListBranches(pid interface{}, opts *ListBranchesOptions, options ...OptionFunc) ([]*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -84,7 +82,7 @@ func (s *BranchesService) ListBranches(pid interface{}, opts *ListBranchesOption
// GetBranch gets a single project repository branch.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#get-single-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#get-single-repository-branch
func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -109,7 +107,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...O
// ProtectBranchOptions represents the available ProtectBranch() options.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#protect-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch
type ProtectBranchOptions struct {
DevelopersCanPush *bool `url:"developers_can_push,omitempty" json:"developers_can_push,omitempty"`
DevelopersCanMerge *bool `url:"developers_can_merge,omitempty" json:"developers_can_merge,omitempty"`
@@ -120,7 +118,7 @@ type ProtectBranchOptions struct {
// still returns a 200 OK status code.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#protect-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch
func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *ProtectBranchOptions, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -147,7 +145,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *Pr
// still returns a 200 OK status code.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#unprotect-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#unprotect-repository-branch
func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -172,16 +170,16 @@ func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, option
// CreateBranchOptions represents the available CreateBranch() options.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#create-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
type CreateBranchOptions struct {
- BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
- Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
+ Branch *string `url:"branch,omitempty" json:"branch,omitempty"`
+ Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
}
// CreateBranch creates branch from commit SHA or existing branch.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#create-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -206,7 +204,7 @@ func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions
// DeleteBranch deletes an existing branch.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#delete-repository-branch
+// https://docs.gitlab.com/ce/api/branches.html#delete-repository-branch
func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
@@ -225,7 +223,7 @@ func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options .
// DeleteMergedBranches deletes all branches that are merged into the project's default branch.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/branches.md#delete-merged-branches
+// https://docs.gitlab.com/ce/api/branches.html#delete-merged-branches
func (s *BranchesService) DeleteMergedBranches(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {