Commit 6177e9a8 authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Update all documentation links (#106)

parent 74bf061f
......@@ -24,14 +24,14 @@ import (
// BranchesService handles communication with the branch related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/branches.html
// GitLab API docs: https://docs.gitlab.com/ce/api/branches.html
type BranchesService struct {
client *Client
}
// Branch represents a GitLab branch.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/branches.html
// GitLab API docs: https://docs.gitlab.com/ce/api/branches.html
type Branch struct {
Commit *Commit `json:"commit"`
Name string `json:"name"`
......@@ -46,7 +46,7 @@ func (b Branch) String() string {
// name alphabetically.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#list-repository-branches
// https://docs.gitlab.com/ce/api/branches.html#list-repository-branches
func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -71,7 +71,7 @@ func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, e
// GetBranch gets a single project repository branch.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#get-single-repository-branch
// https://docs.gitlab.com/ce/api/branches.html#get-single-repository-branch
func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -98,7 +98,7 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *R
// still returns a 200 OK status code.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#protect-repository-branch
// https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch
func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -125,7 +125,7 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch
// still returns a 200 OK status code.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#unprotect-repository-branch
// https://docs.gitlab.com/ce/api/branches.html#unprotect-repository-branch
func (s *BranchesService) UnprotectBranch(
pid interface{},
branch string) (*Branch, *Response, error) {
......@@ -152,7 +152,7 @@ func (s *BranchesService) UnprotectBranch(
// CreateBranchOptions represents the available CreateBranch() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#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"`
......@@ -161,7 +161,7 @@ type CreateBranchOptions struct {
// CreateBranch creates branch from commit SHA or existing branch.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#create-repository-branch
// https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
func (s *BranchesService) CreateBranch(
pid interface{},
opt *CreateBranchOptions) (*Branch, *Response, error) {
......@@ -188,7 +188,7 @@ func (s *BranchesService) CreateBranch(
// DeleteBranch deletes an existing branch.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/branches.html#delete-repository-branch
// https://docs.gitlab.com/ce/api/branches.html#delete-repository-branch
func (s *BranchesService) DeleteBranch(pid interface{}, branch string) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -33,14 +33,14 @@ type ListBuildsOptions struct {
// BuildsService handles communication with the ci builds related methods
// of the GitLab API.
//
// GitLab API docs: http://docs.gitlab.com/ce/api/builds.html
// GitLab API docs: https://docs.gitlab.com/ce/api/builds.html
type BuildsService struct {
client *Client
}
// Build represents a ci build.
//
// GitLab API docs: http://docs.gitlab.com/ce/api/builds.html
// GitLab API docs: https://docs.gitlab.com/ce/api/builds.html
type Build struct {
Commit *Commit `json:"commit"`
CreatedAt *time.Time `json:"created_at"`
......@@ -72,7 +72,7 @@ type Build struct {
// failed, success, canceled; showing all builds if none provided.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#list-project-builds
// https://docs.gitlab.com/ce/api/builds.html#list-project-builds
func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions) ([]Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -98,7 +98,7 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio
// project. If the commit SHA is not found, it will respond with 404.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#list-commit-builds
// https://docs.gitlab.com/ce/api/builds.html#list-commit-builds
func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions) ([]Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -123,7 +123,7 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List
// GetSingleBuild gets a single build of a project.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-a-single-build
// https://docs.gitlab.com/ce/api/builds.html#get-a-single-build
func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -148,7 +148,7 @@ func (s *BuildsService) GetSingleBuild(pid interface{}, buildID int) (*Build, *R
// GetBuildArtifacts get builds artifacts of a project
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-build-artifacts
// https://docs.gitlab.com/ce/api/builds.html#get-build-artifacts
func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -174,7 +174,7 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Read
// reference name and job provided the build finished successfully.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file
// https://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file
func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -199,7 +199,7 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j
// GetTraceFile gets a trace of a specific build of a project
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#get-a-trace-file
// https://docs.gitlab.com/ce/api/builds.html#get-a-trace-file
func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -224,7 +224,7 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *
// CancelBuild cancels a single build of a project.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#cancel-a-build
// https://docs.gitlab.com/ce/api/builds.html#cancel-a-build
func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -249,7 +249,7 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Resp
// RetryBuild retries a single build of a project
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#retry-a-build
// https://docs.gitlab.com/ce/api/builds.html#retry-a-build
func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -275,7 +275,7 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Respo
// artifacts and a build trace.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#erase-a-build
// https://docs.gitlab.com/ce/api/builds.html#erase-a-build
func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -301,7 +301,7 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Respo
// expiration is set.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#keep-artifacts
// https://docs.gitlab.com/ce/api/builds.html#keep-artifacts
func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -326,7 +326,7 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Re
// PlayBuild triggers a nanual action to start a build.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/builds.html#play-a-build
// https://docs.gitlab.com/ce/api/builds.html#play-a-build
func (s *BuildsService) PlayBuild(pid interface{}, buildID int) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -25,14 +25,14 @@ import (
// CommitsService handles communication with the commit related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type CommitsService struct {
client *Client
}
// Commit represents a GitLab commit.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type Commit struct {
ID string `json:"id"`
ShortID string `json:"short_id"`
......@@ -62,7 +62,7 @@ type ListCommitsOptions struct {
// ListCommits gets a list of repository commits in a project.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#list-commits
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-commits
func (s *CommitsService) ListCommits(
pid interface{},
opt *ListCommitsOptions) ([]*Commit, *Response, error) {
......@@ -89,7 +89,7 @@ func (s *CommitsService) ListCommits(
// GetCommit gets a specific commit identified by the commit hash or name of a
// branch or tag.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-a-single-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-a-single-commit
func (s *CommitsService) GetCommit(
pid interface{},
sha string) (*Commit, *Response, error) {
......@@ -115,7 +115,7 @@ func (s *CommitsService) GetCommit(
// Diff represents a GitLab diff.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type Diff struct {
Diff string `json:"diff"`
NewPath string `json:"new_path"`
......@@ -134,7 +134,7 @@ func (d Diff) String() string {
// GetCommitDiff gets the diff of a commit in a project..
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit
// https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit
func (s *CommitsService) GetCommitDiff(
pid interface{},
sha string) ([]*Diff, *Response, error) {
......@@ -160,7 +160,7 @@ func (s *CommitsService) GetCommitDiff(
// CommitComment represents a GitLab commit comment.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html
type CommitComment struct {
Note string `json:"note"`
Path string `json:"path"`
......@@ -186,7 +186,7 @@ func (c CommitComment) String() string {
// GetCommitComments gets the comments of a commit in a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit
// https://docs.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit
func (s *CommitsService) GetCommitComments(
pid interface{},
sha string) ([]*CommitComment, *Response, error) {
......@@ -214,7 +214,7 @@ func (s *CommitsService) GetCommitComments(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-commit
// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit
type PostCommitCommentOptions struct {
Note *string `url:"note,omitempty" json:"note,omitempty"`
Path *string `url:"path" json:"path"`
......@@ -227,7 +227,7 @@ type PostCommitCommentOptions struct {
// line_old are required.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-commit
// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit
func (s *CommitsService) PostCommitComment(
pid interface{},
sha string,
......@@ -254,7 +254,7 @@ func (s *CommitsService) PostCommitComment(
// GetCommitStatusesOptions represents the available GetCommitStatuses() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
type GetCommitStatusesOptions struct {
Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
Stage *string `url:"stage,omitempty" json:"stage,omitempty"`
......@@ -264,7 +264,7 @@ type GetCommitStatusesOptions struct {
// CommitStatus represents a GitLab commit status.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
type CommitStatus struct {
ID int `json:"id"`
SHA string `json:"sha"`
......@@ -281,7 +281,7 @@ type CommitStatus struct {
// GetCommitStatuses gets the statuses of a commit in a project.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
func (s *CommitsService) GetCommitStatuses(
pid interface{},
sha string,
......@@ -308,7 +308,7 @@ func (s *CommitsService) GetCommitStatuses(
// SetCommitStatusOptions represents the available SetCommitStatus() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#post-the-status-to-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit
type SetCommitStatusOptions struct {
State BuildState `url:"state" json:"state"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
......@@ -330,7 +330,7 @@ const (
// SetCommitStatus sets the status of a commit in a project.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/commits.html#post-the-status-to-commit
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit
func (s *CommitsService) SetCommitStatus(
pid interface{},
sha string,
......
......@@ -25,7 +25,7 @@ import (
// DeployKeysService handles communication with the keys related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/deploy_keys.html
// GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html
type DeployKeysService struct {
client *Client
}
......@@ -45,7 +45,7 @@ func (k DeployKey) String() string {
// ListDeployKeys gets a list of a project's deploy keys
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys
// https://docs.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys
func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -70,7 +70,7 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Resp
// GetDeployKey gets a single deploy key.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#single-deploy-key
// https://docs.gitlab.com/ce/api/deploy_keys.html#single-deploy-key
func (s *DeployKeysService) GetDeployKey(
pid interface{},
deployKey int) (*DeployKey, *Response, error) {
......@@ -97,7 +97,7 @@ func (s *DeployKeysService) GetDeployKey(
// AddDeployKeyOptions represents the available ADDDeployKey() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
// https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
type AddDeployKeyOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Key *string `url:"key,omitempty" json:"key,omitempty"`
......@@ -108,7 +108,7 @@ type AddDeployKeyOptions struct {
// original one was is accessible by same user.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
// https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
func (s *DeployKeysService) AddDeployKey(
pid interface{},
opt *AddDeployKeyOptions) (*DeployKey, *Response, error) {
......@@ -135,7 +135,7 @@ func (s *DeployKeysService) AddDeployKey(
// DeleteDeployKey deletes a deploy key from a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key
// https://docs.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key
func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -38,12 +38,12 @@ const (
// tokenType represents a token type within GitLab.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
type tokenType int
// List of available token type
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
const (
privateToken tokenType = iota
oAuthToken
......@@ -51,12 +51,12 @@ const (
// AccessLevelValue represents a permission level within GitLab.
//
// GitLab API docs: http://doc.gitlab.com/ce/permissions/permissions.html
// GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html
type AccessLevelValue int
// List of available access levels
//
// GitLab API docs: http://doc.gitlab.com/ce/permissions/permissions.html
// GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html
const (
GuestPermissions AccessLevelValue = 10
ReporterPermissions AccessLevelValue = 20
......@@ -67,12 +67,12 @@ const (
// NotificationLevelValue represents a notification level within Gitlab.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
type NotificationLevelValue int
// List of available notification levels
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
const (
DisabledNotifications NotificationLevelValue = iota
ParticipatingNotifications
......@@ -83,12 +83,12 @@ const (
// VisibilityLevelValue represents a visibility level within GitLab.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
type VisibilityLevelValue int
// List of available visibility levels
//
// GitLab API docs: http://doc.gitlab.com/ce/api/
// GitLab API docs: https://docs.gitlab.com/ce/api/
const (
PrivateVisibility VisibilityLevelValue = 0
InternalVisibility VisibilityLevelValue = 10
......@@ -353,7 +353,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
if err != nil {
return nil, err
}
defer resp.Body.Close()
response := newResponse(resp)
......@@ -391,7 +390,7 @@ func parseID(id interface{}) (string, error) {
// An ErrorResponse reports one or more errors caused by an API request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error
Message string `json:"message"` // error message
......@@ -419,7 +418,7 @@ func (r *ErrorResponse) Error() string {
// another resource has the same valid as this field
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type Error struct {
Resource string `json:"resource"` // resource on which the error occurred
Field string `json:"field"` // field on which the error occurred
......
......@@ -24,14 +24,14 @@ import (
// GroupsService handles communication with the group related methods of
// the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type GroupsService struct {
client *Client
}
// Group represents a GitLab group.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type Group struct {
ID int `json:"id"`
Name string `json:"name"`
......@@ -42,7 +42,7 @@ type Group struct {
// ListGroupsOptions represents the available ListGroups() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#list-project-groups
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-project-groups
type ListGroupsOptions struct {
ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"`
......@@ -51,7 +51,7 @@ type ListGroupsOptions struct {
// ListGroups gets a list of groups. (As user: my groups, as admin: all groups)
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-project-groups
// https://docs.gitlab.com/ce/api/groups.html#list-project-groups
func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response, error) {
req, err := s.client.NewRequest("GET", "groups", opt)
if err != nil {
......@@ -69,7 +69,7 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response,
// GetGroup gets all details of a group.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#details-of-a-group
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#details-of-a-group
func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) {
group, err := parseID(gid)
if err != nil {
......@@ -93,7 +93,7 @@ func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) {
// CreateGroupOptions represents the available CreateGroup() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#new-group
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group
type CreateGroupOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"`
......@@ -104,7 +104,7 @@ type CreateGroupOptions struct {
// CreateGroup creates a new project group. Available only for users who can
// create groups.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#new-group
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group
func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response, error) {
req, err := s.client.NewRequest("POST", "groups", opt)
if err != nil {
......@@ -124,7 +124,7 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response,
// for admin.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#transfer-project-to-group
// https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group
func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Response, error) {
group, err := parseID(gid)
if err != nil {
......@@ -148,7 +148,7 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Re
// DeleteGroup removes group with all projects inside.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#remove-group
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#remove-group
func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
group, err := parseID(gid)
if err != nil {
......@@ -166,7 +166,7 @@ func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
// SearchGroup get all groups that match your string in their name or path.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#search-for-group
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#search-for-group
func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) {
var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"`
......@@ -189,7 +189,7 @@ func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) {
// GroupMember represents a GitLab group member.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html
type GroupMember struct {
ID int `json:"id"`
Username string `json:"username"`
......@@ -204,7 +204,7 @@ type GroupMember struct {
// user.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Response, error) {
group, err := parseID(gid)
if err != nil {
......@@ -228,7 +228,7 @@ func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Resp
// AddGroupMemberOptions represents the available AddGroupMember() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/groups.html#add-group-member
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#add-group-member
type AddGroupMemberOptions struct {
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
......@@ -237,7 +237,7 @@ type AddGroupMemberOptions struct {
// AddGroupMember adds a user to the list of group members.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) AddGroupMember(
gid interface{},
opt *AddGroupMemberOptions) (*GroupMember, *Response, error) {
......@@ -265,7 +265,7 @@ func (s *GroupsService) AddGroupMember(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#edit-group-team-member
// https://docs.gitlab.com/ce/api/groups.html#edit-group-team-member
type UpdateGroupMemberOptions struct {
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
}
......@@ -273,7 +273,7 @@ type UpdateGroupMemberOptions struct {
// UpdateGroupMember updates a group team member to a specified access level.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#list-group-members
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
func (s *GroupsService) UpdateGroupMember(
gid interface{},
user int,
......@@ -301,7 +301,7 @@ func (s *GroupsService) UpdateGroupMember(
// RemoveGroupMember removes user from user team.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/groups.html#remove-user-from-user-team
// https://docs.gitlab.com/ce/api/groups.html#remove-user-from-user-team
func (s *GroupsService) RemoveGroupMember(gid interface{}, user int) (*Response, error) {
group, err := parseID(gid)
if err != nil {
......
......@@ -27,14 +27,14 @@ import (
// IssuesService handles communication with the issue related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
type IssuesService struct {
client *Client
}
// Issue represents a GitLab issue.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
type Issue struct {
ID int `json:"id"`
IID int `json:"iid"`
......@@ -83,7 +83,7 @@ func (l *Labels) MarshalJSON() ([]byte, error) {
// ListIssuesOptions represents the available ListIssues() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
type ListIssuesOptions struct {
ListOptions
State *string `url:"state,omitempty" json:"state,omitempty"`
......@@ -95,7 +95,7 @@ type ListIssuesOptions struct {
// ListIssues gets all issues created by authenticated user. This function
// takes pagination parameters page and per_page to restrict the list of issues.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response, error) {
req, err := s.client.NewRequest("GET", "issues", opt)
if err != nil {
......@@ -113,7 +113,7 @@ func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response,
// ListProjectIssuesOptions represents the available ListProjectIssues() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
type ListProjectIssuesOptions struct {
ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"`
......@@ -127,7 +127,7 @@ type ListProjectIssuesOptions struct {
// ListProjectIssues gets a list of project issues. This function accepts
// pagination parameters page and per_page to return the list of project issues.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#list-project-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues
func (s *IssuesService) ListProjectIssues(
pid interface{},
opt *ListProjectIssuesOptions) ([]*Issue, *Response, error) {
......@@ -153,7 +153,7 @@ func (s *IssuesService) ListProjectIssues(
// GetIssue gets a single project issue.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#single-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#single-issues
func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -177,7 +177,7 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response,
// CreateIssueOptions represents the available CreateIssue() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#new-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
type CreateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -188,7 +188,7 @@ type CreateIssueOptions struct {
// CreateIssue creates a new project issue.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#new-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
func (s *IssuesService) CreateIssue(
pid interface{},
opt *CreateIssueOptions) (*Issue, *Response, error) {
......@@ -214,7 +214,7 @@ func (s *IssuesService) CreateIssue(
// UpdateIssueOptions represents the available UpdateIssue() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#edit-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues
type UpdateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -227,7 +227,7 @@ type UpdateIssueOptions struct {
// UpdateIssue updates an existing project issue. This function is also used
// to mark an issue as closed.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#edit-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues
func (s *IssuesService) UpdateIssue(
pid interface{},
issue int,
......@@ -254,7 +254,7 @@ func (s *IssuesService) UpdateIssue(
// DeleteIssue deletes a single project issue.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#delete-an-issue
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue
func (s *IssuesService) DeleteIssue(pid interface{}, issue int) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -24,14 +24,14 @@ import (
// LabelsService handles communication with the label related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html
type LabelsService struct {
client *Client
}
// Label represents a GitLab label.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html
type Label struct {
Name string `json:"name"`
Color string `json:"color"`
......@@ -47,7 +47,7 @@ func (l Label) String() string {
// ListLabels gets all labels for given project.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#list-labels
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels
func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -71,7 +71,7 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error)
// CreateLabelOptions represents the available CreateLabel() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#create-a-new-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label
type CreateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
Color *string `url:"color,omitempty" json:"color,omitempty"`
......@@ -81,7 +81,7 @@ type CreateLabelOptions struct {
// CreateLabel creates a new label for given repository with given name and
// color.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#create-a-new-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label
func (s *LabelsService) CreateLabel(
pid interface{},
opt *CreateLabelOptions) (*Label, *Response, error) {
......@@ -107,14 +107,14 @@ func (s *LabelsService) CreateLabel(
// DeleteLabelOptions represents the available DeleteLabel() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
type DeleteLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
}
// DeleteLabel deletes a label given by its name.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -132,7 +132,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*
// UpdateLabelOptions represents the available UpdateLabel() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
type UpdateLabelOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"`
......@@ -143,7 +143,7 @@ type UpdateLabelOptions struct {
// UpdateLabel updates an existing label with new name or now color. At least
// one parameter is required, to update the label.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#edit-an-existing-label
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label
func (s *LabelsService) UpdateLabel(
pid interface{},
opt *UpdateLabelOptions) (*Label, *Response, error) {
......
......@@ -25,14 +25,14 @@ import (
// MergeRequestsService handles communication with the merge requests related
// methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html
// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequestsService struct {
client *Client
}
// MergeRequest represents a GitLab merge request.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html
// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequest struct {
ID int `json:"id"`
IID int `json:"iid"`
......@@ -101,7 +101,7 @@ func (m MergeRequest) String() string {
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#list-merge-requests
// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests
type ListMergeRequestsOptions struct {
ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"`
......@@ -116,7 +116,7 @@ type ListMergeRequestsOptions struct {
// per_page can be used to restrict the list of merge requests.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#list-merge-requests
// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests
func (s *MergeRequestsService) ListMergeRequests(
pid interface{},
opt *ListMergeRequestsOptions) ([]*MergeRequest, *Response, error) {
......@@ -143,7 +143,7 @@ func (s *MergeRequestsService) ListMergeRequests(
// GetMergeRequest shows information about a single merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-single-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr
func (s *MergeRequestsService) GetMergeRequest(
pid interface{},
mergeRequest int) (*MergeRequest, *Response, error) {
......@@ -171,7 +171,7 @@ func (s *MergeRequestsService) GetMergeRequest(
// its files and changes.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes
func (s *MergeRequestsService) GetMergeRequestChanges(
pid interface{},
mergeRequest int) (*MergeRequest, *Response, error) {
......@@ -199,7 +199,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#create-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#create-mr
type CreateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -212,7 +212,7 @@ type CreateMergeRequestOptions struct {
// CreateMergeRequest creates a new merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#create-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#create-mr
func (s *MergeRequestsService) CreateMergeRequest(
pid interface{},
opt *CreateMergeRequestOptions) (*MergeRequest, *Response, error) {
......@@ -240,7 +240,7 @@ func (s *MergeRequestsService) CreateMergeRequest(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#update-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#update-mr
type UpdateMergeRequestOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -252,7 +252,7 @@ type UpdateMergeRequestOptions struct {
// UpdateMergeRequest updates an existing project milestone.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#update-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#update-mr
func (s *MergeRequestsService) UpdateMergeRequest(
pid interface{},
mergeRequest int,
......@@ -281,7 +281,7 @@ func (s *MergeRequestsService) UpdateMergeRequest(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#accept-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr
type AcceptMergeRequestOptions struct {
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"`
......@@ -295,7 +295,7 @@ type AcceptMergeRequestOptions struct {
// already merged or closed - you get 405 and error message 'Method Not Allowed'
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#accept-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr
func (s *MergeRequestsService) AcceptMergeRequest(
pid interface{},
mergeRequest int,
......@@ -322,7 +322,7 @@ func (s *MergeRequestsService) AcceptMergeRequest(
// MergeRequestComment represents a GitLab merge request comment.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/merge_requests.html
// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
type MergeRequestComment struct {
Note string `json:"note"`
Author struct {
......@@ -343,7 +343,7 @@ func (m MergeRequestComment) String() string {
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
type GetMergeRequestCommentsOptions struct {
ListOptions
}
......@@ -352,7 +352,7 @@ type GetMergeRequestCommentsOptions struct {
// request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
// https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
func (s *MergeRequestsService) GetMergeRequestComments(
pid interface{},
mergeRequest int,
......@@ -381,7 +381,7 @@ func (s *MergeRequestsService) GetMergeRequestComments(
// PostMergeRequestComment() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-mr
// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
type PostMergeRequestCommentOptions struct {
Note *string `url:"note,omitempty" json:"note,omitempty"`
}
......@@ -389,7 +389,7 @@ type PostMergeRequestCommentOptions struct {
// PostMergeRequestComment dds a comment to a merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/commits.html#post-comment-to-mr
// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
func (s *MergeRequestsService) PostMergeRequestComment(
pid interface{},
mergeRequest int,
......
......@@ -25,14 +25,14 @@ import (
// MilestonesService handles communication with the milestone related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/milestones.html
// GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html
type MilestonesService struct {
client *Client
}
// Milestone represents a GitLab milestone.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/milestones.html
// GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html
type Milestone struct {
ID int `json:"id"`
Iid int `json:"iid"`
......@@ -53,7 +53,7 @@ func (m Milestone) String() string {
// ListMilestonesOptions represents the available ListMilestones() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#list-project-milestones
// https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones
type ListMilestonesOptions struct {
ListOptions
IID *int `url:"iid,omitempty" json:"iid,omitempty"`
......@@ -62,7 +62,7 @@ type ListMilestonesOptions struct {
// ListMilestones returns a list of project milestones.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#list-project-milestones
// https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones
func (s *MilestonesService) ListMilestones(
pid interface{},
opt *ListMilestonesOptions) ([]*Milestone, *Response, error) {
......@@ -89,7 +89,7 @@ func (s *MilestonesService) ListMilestones(
// GetMilestone gets a single project milestone.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-single-milestone
// https://docs.gitlab.com/ce/api/milestones.html#get-single-milestone
func (s *MilestonesService) GetMilestone(
pid interface{},
milestone int) (*Milestone, *Response, error) {
......@@ -116,7 +116,7 @@ func (s *MilestonesService) GetMilestone(
// CreateMilestoneOptions represents the available CreateMilestone() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#create-new-milestone
// https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone
type CreateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -127,7 +127,7 @@ type CreateMilestoneOptions struct {
// CreateMilestone creates a new project milestone.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#create-new-milestone
// https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone
func (s *MilestonesService) CreateMilestone(
pid interface{},
opt *CreateMilestoneOptions) (*Milestone, *Response, error) {
......@@ -154,7 +154,7 @@ func (s *MilestonesService) CreateMilestone(
// UpdateMilestoneOptions represents the available UpdateMilestone() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#edit-milestone
// https://docs.gitlab.com/ce/api/milestones.html#edit-milestone
type UpdateMilestoneOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
......@@ -166,7 +166,7 @@ type UpdateMilestoneOptions struct {
// UpdateMilestone updates an existing project milestone.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#edit-milestone
// https://docs.gitlab.com/ce/api/milestones.html#edit-milestone
func (s *MilestonesService) UpdateMilestone(
pid interface{},
milestone int,
......@@ -194,7 +194,7 @@ func (s *MilestonesService) UpdateMilestone(
// GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
// https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
type GetMilestoneIssuesOptions struct {
ListOptions
}
......@@ -202,7 +202,7 @@ type GetMilestoneIssuesOptions struct {
// GetMilestoneIssues gets all issues assigned to a single project milestone.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
// https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
func (s *MilestonesService) GetMilestoneIssues(
pid interface{},
milestone int,
......
......@@ -19,14 +19,14 @@ package gitlab
// NamespacesService handles communication with the namespace related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html
type NamespacesService struct {
client *Client
}
// Namespace represents a GitLab namespace.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html
type Namespace struct {
ID int `json:"id"`
Path string `json:"path"`
......@@ -39,7 +39,7 @@ func (n Namespace) String() string {
// ListNamespacesOptions represents the available ListNamespaces() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces
type ListNamespacesOptions struct {
ListOptions
Search *string `url:"search,omitempty" json:"search,omitempty"`
......@@ -47,7 +47,7 @@ type ListNamespacesOptions struct {
// ListNamespaces gets a list of projects accessible by the authenticated user.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces
func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Namespace, *Response, error) {
req, err := s.client.NewRequest("GET", "namespaces", opt)
if err != nil {
......@@ -67,7 +67,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names
// or path.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/namespaces.html#search-for-namespace
// https://docs.gitlab.com/ce/api/namespaces.html#search-for-namespace
func (s *NamespacesService) SearchNamespace(query string) ([]*Namespace, *Response, error) {
var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"`
......
......@@ -25,14 +25,14 @@ import (
// NotesService handles communication with the notes related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/notes.html
// GitLab API docs: https://docs.gitlab.com/ce/api/notes.html
type NotesService struct {
client *Client
}
// Note represents a GitLab note.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/notes.html
// GitLab API docs: https://docs.gitlab.com/ce/api/notes.html
type Note struct {
ID int `json:"id"`
Body string `json:"body"`
......@@ -59,7 +59,7 @@ func (n Note) String() string {
// ListIssueNotesOptions represents the available ListIssueNotes() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-project-issue-notes
// https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes
type ListIssueNotesOptions struct {
ListOptions
}
......@@ -67,7 +67,7 @@ type ListIssueNotesOptions struct {
// ListIssueNotes gets a list of all notes for a single issue.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-project-issue-notes
// https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes
func (s *NotesService) ListIssueNotes(
pid interface{},
issue int,
......@@ -95,7 +95,7 @@ func (s *NotesService) ListIssueNotes(
// GetIssueNote returns a single note for a specific project issue.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-issue-note
// https://docs.gitlab.com/ce/api/notes.html#get-single-issue-note
func (s *NotesService) GetIssueNote(
pid interface{},
issue int,
......@@ -124,7 +124,7 @@ func (s *NotesService) GetIssueNote(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-issue-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note
type CreateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
......@@ -132,7 +132,7 @@ type CreateIssueNoteOptions struct {
// CreateIssueNote creates a new note to a single project issue.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-issue-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note
func (s *NotesService) CreateIssueNote(
pid interface{},
issue int,
......@@ -161,14 +161,14 @@ func (s *NotesService) CreateIssueNote(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-issue-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note
type UpdateIssueNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
// UpdateIssueNote modifies existing note of an issue.
//
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-issue-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note
func (s *NotesService) UpdateIssueNote(
pid interface{},
issue int,
......@@ -198,7 +198,7 @@ func (s *NotesService) UpdateIssueNote(
// notes are comments users can post to a snippet.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-all-snippet-notes
// https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes
func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -223,7 +223,7 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note,
// GetSnippetNote returns a single note for a given snippet.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-snippet-note
// https://docs.gitlab.com/ce/api/notes.html#get-single-snippet-note
func (s *NotesService) GetSnippetNote(
pid interface{},
snippet int,
......@@ -252,7 +252,7 @@ func (s *NotesService) GetSnippetNote(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-snippet-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note
type CreateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
......@@ -261,7 +261,7 @@ type CreateSnippetNoteOptions struct {
// comments users can post to a snippet.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-snippet-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note
func (s *NotesService) CreateSnippetNote(
pid interface{},
snippet int,
......@@ -290,14 +290,14 @@ func (s *NotesService) CreateSnippetNote(
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
type UpdateSnippetNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
// UpdateSnippetNote modifies existing note of a snippet.
//
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
func (s *NotesService) UpdateSnippetNote(
pid interface{},
snippet int,
......@@ -326,7 +326,7 @@ func (s *NotesService) UpdateSnippetNote(
// ListMergeRequestNotes gets a list of all notes for a single merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#list-all-merge-request-notes
// https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes
func (s *NotesService) ListMergeRequestNotes(
pid interface{},
mergeRequest int) ([]*Note, *Response, error) {
......@@ -353,7 +353,7 @@ func (s *NotesService) ListMergeRequestNotes(
// GetMergeRequestNote returns a single note for a given merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#get-single-merge-request-note
// https://docs.gitlab.com/ce/api/notes.html#get-single-merge-request-note
func (s *NotesService) GetMergeRequestNote(
pid interface{},
mergeRequest int,
......@@ -382,7 +382,7 @@ func (s *NotesService) GetMergeRequestNote(
// CreateMergeRequestNote() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-merge-request-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note
type CreateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
......@@ -390,7 +390,7 @@ type CreateMergeRequestNoteOptions struct {
// CreateMergeRequestNote creates a new note for a single merge request.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#create-new-merge-request-note
// https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note
func (s *NotesService) CreateMergeRequestNote(
pid interface{},
mergeRequest int,
......@@ -419,14 +419,14 @@ func (s *NotesService) CreateMergeRequestNote(
// UpdateMergeRequestNote() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
type UpdateMergeRequestNoteOptions struct {
Body *string `url:"body,omitempty" json:"body,omitempty"`
}
// UpdateMergeRequestNote modifies existing note of a merge request.
//
// http://doc.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
func (s *NotesService) UpdateMergeRequestNote(
pid interface{},
mergeRequest int,
......
......@@ -26,14 +26,14 @@ import (
// ProjectSnippetsService handles communication with the project snippets
// related methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html
type ProjectSnippetsService struct {
client *Client
}
// Snippet represents a GitLab project snippet.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html
type Snippet struct {
ID int `json:"id"`
Title string `json:"title"`
......@@ -57,14 +57,14 @@ func (s Snippet) String() string {
// ListSnippetsOptions represents the available ListSnippets() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html#list-snippets
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets
type ListSnippetsOptions struct {
ListOptions
}
// ListSnippets gets a list of project snippets.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/project_snippets.html#list-snippets
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets
func (s *ProjectSnippetsService) ListSnippets(
pid interface{},
opt *ListSnippetsOptions) ([]*Snippet, *Response, error) {
......@@ -91,7 +91,7 @@ func (s *ProjectSnippetsService) ListSnippets(
// GetSnippet gets a single project snippet
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#single-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#single-snippet
func (s *ProjectSnippetsService) GetSnippet(
pid interface{},
snippet int) (*Snippet, *Response, error) {
......@@ -118,7 +118,7 @@ func (s *ProjectSnippetsService) GetSnippet(
// CreateSnippetOptions represents the available CreateSnippet() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#create-new-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
type CreateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
......@@ -130,7 +130,7 @@ type CreateSnippetOptions struct {
// to create new snippets.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#create-new-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
func (s *ProjectSnippetsService) CreateSnippet(
pid interface{},
opt *CreateSnippetOptions) (*Snippet, *Response, error) {
......@@ -157,7 +157,7 @@ func (s *ProjectSnippetsService) CreateSnippet(
// UpdateSnippetOptions represents the available UpdateSnippet() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#update-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet
type UpdateSnippetOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
FileName *string `url:"file_name,omitempty" json:"file_name,omitempty"`
......@@ -169,7 +169,7 @@ type UpdateSnippetOptions struct {
// permission to change an existing snippet.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#update-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet
func (s *ProjectSnippetsService) UpdateSnippet(
pid interface{},
snippet int,
......@@ -199,7 +199,7 @@ func (s *ProjectSnippetsService) UpdateSnippet(
// code.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#delete-snippet
// https://docs.gitlab.com/ce/api/project_snippets.html#delete-snippet
func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -218,7 +218,7 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*R
// SnippetContent returns the raw project snippet as plain text.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/project_snippets.html#snippet-content
// https://docs.gitlab.com/ce/api/project_snippets.html#snippet-content
func (s *ProjectSnippetsService) SnippetContent(
pid interface{},
snippet int) ([]byte, *Response, error) {
......
This diff is collapsed.
......@@ -14,20 +14,19 @@ func TestListProjects(t *testing.T) {
mux.HandleFunc("/projects", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"ci_enabled_first": "true",
"simple": "true",
"visibility": "public",
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"simple": "true",
"visibility": "public",
})
fmt.Fprint(w, `[{"id":1},{"id":2}]`)
})
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")}
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListProjects(opt)
if err != nil {
......@@ -47,20 +46,19 @@ func TestListOwnedProjects(t *testing.T) {
mux.HandleFunc("/projects/owned", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"ci_enabled_first": "true",
"simple": "true",
"visibility": "public",
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"simple": "true",
"visibility": "public",
})
fmt.Fprint(w, `[{"id":1},{"id":2}]`)
})
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")}
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListOwnedProjects(opt)
if err != nil {
......@@ -80,20 +78,19 @@ func TestListStarredProjects(t *testing.T) {
mux.HandleFunc("/projects/starred", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"ci_enabled_first": "true",
"simple": "true",
"visibility": "public",
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"simple": "true",
"visibility": "public",
})
fmt.Fprint(w, `[{"id":1},{"id":2}]`)
})
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")}
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListStarredProjects(opt)
if err != nil {
......@@ -113,20 +110,19 @@ func TestListAllProjects(t *testing.T) {
mux.HandleFunc("/projects/all", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"ci_enabled_first": "true",
"simple": "true",
"visibility": "public",
"page": "2",
"per_page": "3",
"archived": "true",
"order_by": "name",
"sort": "asc",
"search": "query",
"simple": "true",
"visibility": "public",
})
fmt.Fprint(w, `[{"id":1},{"id":2}]`)
})
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), Bool(true), String("public")}
opt := &ListProjectsOptions{ListOptions{2, 3}, Bool(true), String("name"), String("asc"), String("query"), Bool(true), String("public")}
projects, _, err := client.Projects.ListAllProjects(opt)
if err != nil {
......
......@@ -25,14 +25,14 @@ import (
// RepositoriesService handles communication with the repositories related
// methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type RepositoriesService struct {
client *Client
}
// TreeNode represents a GitLab repository file or directory.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html
type TreeNode struct {
ID string `json:"id"`
Name string `json:"name"`
......@@ -47,7 +47,7 @@ func (t TreeNode) String() string {
// ListTreeOptions represents the available ListTree() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#list-repository-tree
// https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree
type ListTreeOptions struct {
Path *string `url:"path,omitempty" json:"path,omitempty"`
RefName *string `url:"ref_name,omitempty" json:"ref_name,omitempty"`
......@@ -56,7 +56,7 @@ type ListTreeOptions struct {
// ListTree gets a list of repository files and directories in a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#list-repository-tree
// https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree
func (s *RepositoriesService) ListTree(
pid interface{},
opt *ListTreeOptions) ([]*TreeNode, *Response, error) {
......@@ -83,7 +83,7 @@ func (s *RepositoriesService) ListTree(
// RawFileContentOptions represents the available RawFileContent() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-file-content
// https://docs.gitlab.com/ce/api/repositories.html#raw-file-content
type RawFileContentOptions struct {
FilePath *string `url:"filepath,omitempty" json:"filepath,omitempty"`
}
......@@ -91,7 +91,7 @@ type RawFileContentOptions struct {
// RawFileContent gets the raw file contents for a file by commit SHA and path
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-file-content
// https://docs.gitlab.com/ce/api/repositories.html#raw-file-content
func (s *RepositoriesService) RawFileContent(
pid interface{},
sha string,
......@@ -119,7 +119,7 @@ func (s *RepositoriesService) RawFileContent(
// RawBlobContent gets the raw file contents for a blob by blob SHA.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#raw-blob-content
// https://docs.gitlab.com/ce/api/repositories.html#raw-blob-content
func (s *RepositoriesService) RawBlobContent(
pid interface{},
sha string) ([]byte, *Response, error) {
......@@ -146,7 +146,7 @@ func (s *RepositoriesService) RawBlobContent(
// ArchiveOptions represents the available Archive() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#get-file-archive
// https://docs.gitlab.com/ce/api/repositories.html#get-file-archive
type ArchiveOptions struct {
SHA *string `url:"sha,omitempty" json:"sha,omitempty"`
}
......@@ -154,7 +154,7 @@ type ArchiveOptions struct {
// Archive gets an archive of the repository.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#get-file-archive
// https://docs.gitlab.com/ce/api/repositories.html#get-file-archive
func (s *RepositoriesService) Archive(
pid interface{},
opt *ArchiveOptions) ([]byte, *Response, error) {
......@@ -181,7 +181,7 @@ func (s *RepositoriesService) Archive(
// Compare represents the result of a comparison of branches, tags or commits.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
type Compare struct {
Commit *Commit `json:"commit"`
Commits []*Commit `json:"commits"`
......@@ -197,7 +197,7 @@ func (c Compare) String() string {
// CompareOptions represents the available Compare() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
type CompareOptions struct {
From *string `url:"from,omitempty" json:"from,omitempty"`
To *string `url:"to,omitempty" json:"to,omitempty"`
......@@ -206,7 +206,7 @@ type CompareOptions struct {
// Compare compares branches, tags or commits.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
func (s *RepositoriesService) Compare(
pid interface{},
opt *CompareOptions) (*Compare, *Response, error) {
......@@ -232,7 +232,7 @@ func (s *RepositoriesService) Compare(
// Contributor represents a GitLap contributor.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html#contributer
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
type Contributor struct {
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
......@@ -247,7 +247,7 @@ func (c Contributor) String() string {
// Contributors gets the repository contributors list.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repositories.html#contributer
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
func (s *RepositoriesService) Contributors(pid interface{}) ([]*Contributor, *Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -24,14 +24,14 @@ import (
// RepositoryFilesService handles communication with the repository files
// related methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type RepositoryFilesService struct {
client *Client
}
// File represents a GitLab repository file.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type File struct {
FileName string `json:"file_name"`
FilePath string `json:"file_path"`
......@@ -50,7 +50,7 @@ func (r File) String() string {
// GetFileOptions represents the available GetFile() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#get-file-from-respository
// https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository
type GetFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
......@@ -60,7 +60,7 @@ type GetFileOptions struct {
// name, size, content. Note that file content is Base64 encoded.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#get-file-from-respository
// https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository
func (s *RepositoryFilesService) GetFile(
pid interface{},
opt *GetFileOptions) (*File, *Response, error) {
......@@ -86,7 +86,7 @@ func (s *RepositoryFilesService) GetFile(
// FileInfo represents file details of a GitLab repository file.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/repository_files.html
// GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html
type FileInfo struct {
FilePath string `json:"file_path"`
BranchName string `json:"branch_name"`
......@@ -99,7 +99,7 @@ func (r FileInfo) String() string {
// CreateFileOptions represents the available CreateFile() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
type CreateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
......@@ -113,7 +113,7 @@ type CreateFileOptions struct {
// CreateFile creates a new file in a repository.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
func (s *RepositoryFilesService) CreateFile(
pid interface{},
opt *CreateFileOptions) (*FileInfo, *Response, error) {
......@@ -140,7 +140,7 @@ func (s *RepositoryFilesService) CreateFile(
// UpdateFileOptions represents the available UpdateFile() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
type UpdateFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
......@@ -154,7 +154,7 @@ type UpdateFileOptions struct {
// UpdateFile updates an existing file in a repository
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
func (s *RepositoryFilesService) UpdateFile(
pid interface{},
opt *UpdateFileOptions) (*FileInfo, *Response, error) {
......@@ -181,7 +181,7 @@ func (s *RepositoryFilesService) UpdateFile(
// DeleteFileOptions represents the available DeleteFile() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
type DeleteFileOptions struct {
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
BranchName *string `url:"branch_name,omitempty" json:"branch_name,omitempty"`
......@@ -193,7 +193,7 @@ type DeleteFileOptions struct {
// DeleteFile deletes an existing file in a repository
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
// https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
func (s *RepositoryFilesService) DeleteFile(
pid interface{},
opt *DeleteFileOptions) (*FileInfo, *Response, error) {
......
......@@ -25,7 +25,7 @@ import (
// ServicesService handles communication with the services related methods of
// the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/services.html
// GitLab API docs: https://docs.gitlab.com/ce/api/services.html
type ServicesService struct {
client *Client
}
......@@ -47,7 +47,7 @@ type Service struct {
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
// https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
type SetGitLabCIServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty"`
ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"`
......@@ -56,7 +56,7 @@ type SetGitLabCIServiceOptions struct {
// SetGitLabCIService sets GitLab CI service for a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
// https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
func (s *ServicesService) SetGitLabCIService(
pid interface{},
opt *SetGitLabCIServiceOptions) (*Response, error) {
......@@ -77,7 +77,7 @@ func (s *ServicesService) SetGitLabCIService(
// DeleteGitLabCIService deletes GitLab CI service settings for a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-gitlab-ci-service
// https://docs.gitlab.com/ce/api/services.html#delete-gitlab-ci-service
func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -97,7 +97,7 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, err
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service
// https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service
type SetHipChatServiceOptions struct {
Token *string `url:"token,omitempty" json:"token,omitempty" `
Room *string `url:"room,omitempty" json:"room,omitempty"`
......@@ -106,7 +106,7 @@ type SetHipChatServiceOptions struct {
// SetHipChatService sets HipChat service for a project
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service
// https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service
func (s *ServicesService) SetHipChatService(
pid interface{},
opt *SetHipChatServiceOptions) (*Response, error) {
......@@ -127,7 +127,7 @@ func (s *ServicesService) SetHipChatService(
// DeleteHipChatService deletes HipChat service for project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-hipchat-service
// https://docs.gitlab.com/ce/api/services.html#delete-hipchat-service
func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -147,7 +147,7 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, erro
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service
// https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service
type SetDroneCIServiceOptions struct {
Token *string `url:"token" json:"token" `
DroneURL *string `url:"drone_url" json:"drone_url"`
......@@ -157,7 +157,7 @@ type SetDroneCIServiceOptions struct {
// SetDroneCIService sets Drone CI service for a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service
// https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service
func (s *ServicesService) SetDroneCIService(
pid interface{},
opt *SetDroneCIServiceOptions) (*Response, error) {
......@@ -178,7 +178,7 @@ func (s *ServicesService) SetDroneCIService(
// DeleteDroneCIService deletes Drone CI service settings for a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-drone-ci-service
// https://docs.gitlab.com/ce/api/services.html#delete-drone-ci-service
func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -210,7 +210,7 @@ type DroneCIService struct {
// GetDroneCIService gets Drone CI service settings for a project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#get-drone-ci-service-settings
// https://docs.gitlab.com/ce/api/services.html#get-drone-ci-service-settings
func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *Response, error) {
project, err := parseID(pid)
if err != nil {
......@@ -236,7 +236,7 @@ func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *
// options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-slack-service
// https://docs.gitlab.com/ce/api/services.html#edit-slack-service
type SetSlackServiceOptions struct {
WebHook *string `url:"webhook,omitempty" json:"webhook,omitempty" `
Username *string `url:"username,omitempty" json:"username,omitempty" `
......@@ -246,7 +246,7 @@ type SetSlackServiceOptions struct {
// SetSlackService sets Slack service for a project
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-slack-service
// https://docs.gitlab.com/ce/api/services.html#edit-slack-service
func (s *ServicesService) SetSlackService(
pid interface{},
opt *SetSlackServiceOptions) (*Response, error) {
......@@ -267,7 +267,7 @@ func (s *ServicesService) SetSlackService(
// DeleteSlackService deletes Slack service for project.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#delete-slack-service
// https://docs.gitlab.com/ce/api/services.html#delete-slack-service
func (s *ServicesService) DeleteSlackService(pid interface{}) (*Response, error) {
project, err := parseID(pid)
if err != nil {
......
......@@ -21,14 +21,14 @@ import "time"
// SessionService handles communication with the session related methods of
// the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html
type SessionService struct {
client *Client
}
// Session represents a GitLab session.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
type Session struct {
ID int `json:"id"`
Username string `json:"username"`
......@@ -52,7 +52,7 @@ type Session struct {
// GetSessionOptions represents the available Session() options.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
type GetSessionOptions struct {
Login *string `url:"login,omitempty" json:"login,omitempty"`
Email *string `url:"email,omitempty" json:"email,omitempty"`
......@@ -61,7 +61,7 @@ type GetSessionOptions struct {
// GetSession logs in to get private token.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/session.html#session
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
func (s *SessionService) GetSession(opt *GetSessionOptions) (*Session, *Response, error) {
req, err := s.client.NewRequest("POST", "session", opt)
if err != nil {
......
......@@ -21,14 +21,14 @@ import "time"
// SettingsService handles communication with the application SettingsService
// related methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/settings.html
// GitLab API docs: https://docs.gitlab.com/ce/api/settings.html
type SettingsService struct {
client *Client
}
// Settings represents the GitLab application settings.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/settings.html
// GitLab API docs: https://docs.gitlab.com/ce/api/settings.html
type Settings struct {
ID int `json:"id"`
DefaultProjectsLimit int `json:"default_projects_limit"`
......@@ -58,7 +58,7 @@ func (s Settings) String() string {
// GetSettings gets the current application settings.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#get-current-application.settings
// https://docs.gitlab.com/ce/api/settings.html#get-current-application.settings
func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
req, err := s.client.NewRequest("GET", "application/settings", nil)
if err != nil {
......@@ -77,7 +77,7 @@ func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
// UpdateSettingsOptions represents the available UpdateSettings() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings
// https://docs.gitlab.com/ce/api/settings.html#change-application.settings
type UpdateSettingsOptions struct {
DefaultProjectsLimit *int `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"`
SignupEnabled *bool `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"`
......@@ -100,7 +100,7 @@ type UpdateSettingsOptions struct {
// UpdateSettings updates the application settings.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings
// https://docs.gitlab.com/ce/api/settings.html#change-application.settings
func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions) (*Settings, *Response, error) {
req, err := s.client.NewRequest("PUT", "application/settings", opt)
if err != nil {
......
......@@ -24,14 +24,14 @@ import (
// SystemHooksService handles communication with the system hooks related
// methods of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type SystemHooksService struct {
client *Client
}
// Hook represents a GitLap system hook.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type Hook struct {
ID int `json:"id"`
URL string `json:"url"`
......@@ -45,7 +45,7 @@ func (h Hook) String() string {
// ListHooks gets a list of system hooks.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#list-system-hooks
// https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks
func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) {
req, err := s.client.NewRequest("GET", "hooks", nil)
if err != nil {
......@@ -64,7 +64,7 @@ func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) {
// AddHookOptions represents the available AddHook() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
type AddHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"`
}
......@@ -72,7 +72,7 @@ type AddHookOptions struct {
// AddHook adds a new system hook hook.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, error) {
req, err := s.client.NewRequest("POST", "hooks", opt)
if err != nil {
......@@ -90,7 +90,7 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, err
// HookEvent represents an event triggert by a GitLab system hook.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/system_hooks.html
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type HookEvent struct {
EventName string `json:"event_name"`
Name string `json:"name"`
......@@ -107,7 +107,7 @@ func (h HookEvent) String() string {
// TestHook tests a system hook.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#test-system-hook
// https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook
func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
u := fmt.Sprintf("hooks/%d", hook)
......@@ -130,7 +130,7 @@ func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
// is also returned as JSON.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/system_hooks.html#delete-system-hook
// https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook
func (s *SystemHooksService) DeleteHook(hook int) (*Response, error) {
u := fmt.Sprintf("hooks/%d", hook)
......
......@@ -24,14 +24,14 @@ import (
// TagsService handles communication with the tags related methods
// of the GitLab API.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/tags.html
// GitLab API docs: https://docs.gitlab.com/ce/api/tags.html
type TagsService struct {
client *Client
}
// Tag represents a GitLab tag.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/tags.html
// GitLab API docs: https://docs.gitlab.com/ce/api/tags.html
type Tag struct {
Commit *Commit `json:"commit"`
Name string `json:"name"`
......@@ -97,7 +97,7 @@ func (s *TagsService) GetSingleTag(pid interface{}, tag string) (*Tag, *Response
// CreateTagOptions represents the available CreateTag() options.
//
// GitLab API docs:
// http://doc.gitlab.com/ce/api/tags.html#create-a-new-tag
// https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag
type CreateTagOptions struct {
TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"`
Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
......
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