Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
ef66f24d
Commit
ef66f24d
authored
Dec 22, 2018
by
James Ramsay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently use `SHA`
parent
d3666a4c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
24 deletions
+24
-24
deployments.go
deployments.go
+2
-2
event_parsing_test.go
event_parsing_test.go
+2
-2
event_types.go
event_types.go
+13
-13
merge_requests.go
merge_requests.go
+1
-1
pipeline_schedules.go
pipeline_schedules.go
+1
-1
pipelines.go
pipelines.go
+3
-3
todos.go
todos.go
+2
-2
No files found.
deployments.go
View file @
ef66f24d
...
@@ -34,7 +34,7 @@ type Deployment struct {
...
@@ -34,7 +34,7 @@ type Deployment struct {
ID
int
`json:"id"`
ID
int
`json:"id"`
IID
int
`json:"iid"`
IID
int
`json:"iid"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
CreatedAt
*
time
.
Time
`json:"created_at"`
CreatedAt
*
time
.
Time
`json:"created_at"`
User
*
ProjectUser
`json:"user"`
User
*
ProjectUser
`json:"user"`
Environment
*
Environment
`json:"environment"`
Environment
*
Environment
`json:"environment"`
...
@@ -54,7 +54,7 @@ type Deployment struct {
...
@@ -54,7 +54,7 @@ type Deployment struct {
Commit
*
Commit
`json:"commit"`
Commit
*
Commit
`json:"commit"`
Pipeline
struct
{
Pipeline
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
Status
string
`json:"status"`
Status
string
`json:"status"`
}
`json:"pipeline"`
}
`json:"pipeline"`
...
...
event_parsing_test.go
View file @
ef66f24d
...
@@ -1236,7 +1236,7 @@ func TestParseBuildHook(t *testing.T) {
...
@@ -1236,7 +1236,7 @@ func TestParseBuildHook(t *testing.T) {
t
.
Errorf
(
"BuildAllowFailure is %v, want %v"
,
event
.
BuildAllowFailure
,
false
)
t
.
Errorf
(
"BuildAllowFailure is %v, want %v"
,
event
.
BuildAllowFailure
,
false
)
}
}
if
event
.
Commit
.
S
ha
!=
"2293ada6b400935a1378653304eaf6221e0fdb8f"
{
if
event
.
Commit
.
S
HA
!=
"2293ada6b400935a1378653304eaf6221e0fdb8f"
{
t
.
Errorf
(
"Commit SHA is %v, want %v"
,
event
.
Commit
.
S
ha
,
"2293ada6b400935a1378653304eaf6221e0fdb8f"
)
t
.
Errorf
(
"Commit SHA is %v, want %v"
,
event
.
Commit
.
S
HA
,
"2293ada6b400935a1378653304eaf6221e0fdb8f"
)
}
}
}
}
event_types.go
View file @
ef66f24d
...
@@ -29,7 +29,7 @@ type PushEvent struct {
...
@@ -29,7 +29,7 @@ type PushEvent struct {
Before
string
`json:"before"`
Before
string
`json:"before"`
After
string
`json:"after"`
After
string
`json:"after"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
CheckoutS
ha
string
`json:"checkout_sha"`
CheckoutS
HA
string
`json:"checkout_sha"`
UserID
int
`json:"user_id"`
UserID
int
`json:"user_id"`
UserName
string
`json:"user_name"`
UserName
string
`json:"user_name"`
UserEmail
string
`json:"user_email"`
UserEmail
string
`json:"user_email"`
...
@@ -77,7 +77,7 @@ type TagEvent struct {
...
@@ -77,7 +77,7 @@ type TagEvent struct {
Before
string
`json:"before"`
Before
string
`json:"before"`
After
string
`json:"after"`
After
string
`json:"after"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
CheckoutS
ha
string
`json:"checkout_sha"`
CheckoutS
HA
string
`json:"checkout_sha"`
UserID
int
`json:"user_id"`
UserID
int
`json:"user_id"`
UserName
string
`json:"user_name"`
UserName
string
`json:"user_name"`
UserAvatar
string
`json:"user_avatar"`
UserAvatar
string
`json:"user_avatar"`
...
@@ -290,12 +290,12 @@ type MergeCommentEvent struct {
...
@@ -290,12 +290,12 @@ type MergeCommentEvent struct {
}
`json:"merge_params"`
}
`json:"merge_params"`
MergeWhenPipelineSucceeds
bool
`json:"merge_when_pipeline_succeeds"`
MergeWhenPipelineSucceeds
bool
`json:"merge_when_pipeline_succeeds"`
MergeUserID
int
`json:"merge_user_id"`
MergeUserID
int
`json:"merge_user_id"`
MergeCommitS
ha
string
`json:"merge_commit_sha"`
MergeCommitS
HA
string
`json:"merge_commit_sha"`
DeletedAt
string
`json:"deleted_at"`
DeletedAt
string
`json:"deleted_at"`
InProgressMergeCommitS
ha
string
`json:"in_progress_merge_commit_sha"`
InProgressMergeCommitS
HA
string
`json:"in_progress_merge_commit_sha"`
LockVersion
int
`json:"lock_version"`
LockVersion
int
`json:"lock_version"`
ApprovalsBeforeMerge
string
`json:"approvals_before_merge"`
ApprovalsBeforeMerge
string
`json:"approvals_before_merge"`
RebaseCommitS
ha
string
`json:"rebase_commit_sha"`
RebaseCommitS
HA
string
`json:"rebase_commit_sha"`
TimeEstimate
int
`json:"time_estimate"`
TimeEstimate
int
`json:"time_estimate"`
Squash
bool
`json:"squash"`
Squash
bool
`json:"squash"`
LastEditedAt
string
`json:"last_edited_at"`
LastEditedAt
string
`json:"last_edited_at"`
...
@@ -456,11 +456,11 @@ type MergeEvent struct {
...
@@ -456,11 +456,11 @@ type MergeEvent struct {
}
`json:"merge_params"`
}
`json:"merge_params"`
MergeWhenBuildSucceeds
bool
`json:"merge_when_build_succeeds"`
MergeWhenBuildSucceeds
bool
`json:"merge_when_build_succeeds"`
MergeUserID
int
`json:"merge_user_id"`
MergeUserID
int
`json:"merge_user_id"`
MergeCommitS
ha
string
`json:"merge_commit_sha"`
MergeCommitS
HA
string
`json:"merge_commit_sha"`
DeletedAt
string
`json:"deleted_at"`
DeletedAt
string
`json:"deleted_at"`
ApprovalsBeforeMerge
string
`json:"approvals_before_merge"`
ApprovalsBeforeMerge
string
`json:"approvals_before_merge"`
RebaseCommitS
ha
string
`json:"rebase_commit_sha"`
RebaseCommitS
HA
string
`json:"rebase_commit_sha"`
InProgressMergeCommitS
ha
string
`json:"in_progress_merge_commit_sha"`
InProgressMergeCommitS
HA
string
`json:"in_progress_merge_commit_sha"`
LockVersion
int
`json:"lock_version"`
LockVersion
int
`json:"lock_version"`
TimeEstimate
int
`json:"time_estimate"`
TimeEstimate
int
`json:"time_estimate"`
Source
*
Repository
`json:"source"`
Source
*
Repository
`json:"source"`
...
@@ -562,8 +562,8 @@ type PipelineEvent struct {
...
@@ -562,8 +562,8 @@ type PipelineEvent struct {
ID
int
`json:"id"`
ID
int
`json:"id"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
Tag
bool
`json:"tag"`
Tag
bool
`json:"tag"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
BeforeS
ha
string
`json:"before_sha"`
BeforeS
HA
string
`json:"before_sha"`
Status
string
`json:"status"`
Status
string
`json:"status"`
Stages
[]
string
`json:"stages"`
Stages
[]
string
`json:"stages"`
CreatedAt
string
`json:"created_at"`
CreatedAt
string
`json:"created_at"`
...
@@ -638,8 +638,8 @@ type BuildEvent struct {
...
@@ -638,8 +638,8 @@ type BuildEvent struct {
ObjectKind
string
`json:"object_kind"`
ObjectKind
string
`json:"object_kind"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
Tag
bool
`json:"tag"`
Tag
bool
`json:"tag"`
BeforeS
ha
string
`json:"before_sha"`
BeforeS
HA
string
`json:"before_sha"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
BuildID
int
`json:"build_id"`
BuildID
int
`json:"build_id"`
BuildName
string
`json:"build_name"`
BuildName
string
`json:"build_name"`
BuildStage
string
`json:"build_stage"`
BuildStage
string
`json:"build_stage"`
...
@@ -657,7 +657,7 @@ type BuildEvent struct {
...
@@ -657,7 +657,7 @@ type BuildEvent struct {
}
`json:"user"`
}
`json:"user"`
Commit
struct
{
Commit
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
Message
string
`json:"message"`
Message
string
`json:"message"`
AuthorName
string
`json:"author_name"`
AuthorName
string
`json:"author_name"`
AuthorEmail
string
`json:"author_email"`
AuthorEmail
string
`json:"author_email"`
...
...
merge_requests.go
View file @
ef66f24d
...
@@ -571,7 +571,7 @@ type AcceptMergeRequestOptions struct {
...
@@ -571,7 +571,7 @@ type AcceptMergeRequestOptions struct {
MergeCommitMessage
*
string
`url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"`
MergeCommitMessage
*
string
`url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"`
ShouldRemoveSourceBranch
*
bool
`url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"`
ShouldRemoveSourceBranch
*
bool
`url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"`
MergeWhenPipelineSucceeds
*
bool
`url:"merge_when_pipeline_succeeds,omitempty" json:"merge_when_pipeline_succeeds,omitempty"`
MergeWhenPipelineSucceeds
*
bool
`url:"merge_when_pipeline_succeeds,omitempty" json:"merge_when_pipeline_succeeds,omitempty"`
S
ha
*
string
`url:"sha,omitempty" json:"sha,omitempty"`
S
HA
*
string
`url:"sha,omitempty" json:"sha,omitempty"`
}
}
// AcceptMergeRequest merges changes submitted with MR using this API. If merge
// AcceptMergeRequest merges changes submitted with MR using this API. If merge
...
...
pipeline_schedules.go
View file @
ef66f24d
...
@@ -47,7 +47,7 @@ type PipelineSchedule struct {
...
@@ -47,7 +47,7 @@ type PipelineSchedule struct {
Owner
*
User
`json:"owner"`
Owner
*
User
`json:"owner"`
LastPipeline
struct
{
LastPipeline
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
Status
string
`json:"status"`
Status
string
`json:"status"`
}
`json:"last_pipeline"`
}
`json:"last_pipeline"`
...
...
pipelines.go
View file @
ef66f24d
...
@@ -45,8 +45,8 @@ type Pipeline struct {
...
@@ -45,8 +45,8 @@ type Pipeline struct {
ID
int
`json:"id"`
ID
int
`json:"id"`
Status
string
`json:"status"`
Status
string
`json:"status"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
BeforeS
ha
string
`json:"before_sha"`
BeforeS
HA
string
`json:"before_sha"`
Tag
bool
`json:"tag"`
Tag
bool
`json:"tag"`
YamlErrors
string
`json:"yaml_errors"`
YamlErrors
string
`json:"yaml_errors"`
User
struct
{
User
struct
{
...
@@ -77,7 +77,7 @@ type PipelineList []struct {
...
@@ -77,7 +77,7 @@ type PipelineList []struct {
ID
int
`json:"id"`
ID
int
`json:"id"`
Status
string
`json:"status"`
Status
string
`json:"status"`
Ref
string
`json:"ref"`
Ref
string
`json:"ref"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
}
}
func
(
i
PipelineList
)
String
()
string
{
func
(
i
PipelineList
)
String
()
string
{
...
...
todos.go
View file @
ef66f24d
...
@@ -69,10 +69,10 @@ type TodoTarget struct {
...
@@ -69,10 +69,10 @@ type TodoTarget struct {
// Only available for type MergeRequest
// Only available for type MergeRequest
ApprovalsBeforeMerge
bool
`json:"approvals_before_merge"`
ApprovalsBeforeMerge
bool
`json:"approvals_before_merge"`
ForceRemoveSourceBranch
bool
`json:"force_remove_source_branch"`
ForceRemoveSourceBranch
bool
`json:"force_remove_source_branch"`
MergeCommitS
ha
string
`json:"merge_commit_sha"`
MergeCommitS
HA
string
`json:"merge_commit_sha"`
MergeWhenPipelineSucceeds
bool
`json:"merge_when_pipeline_succeeds"`
MergeWhenPipelineSucceeds
bool
`json:"merge_when_pipeline_succeeds"`
MergeStatus
string
`json:"merge_status"`
MergeStatus
string
`json:"merge_status"`
S
ha
string
`json:"sha"`
S
HA
string
`json:"sha"`
ShouldRemoveSourceBranch
bool
`json:"should_remove_source_branch"`
ShouldRemoveSourceBranch
bool
`json:"should_remove_source_branch"`
SourceBranch
string
`json:"source_branch"`
SourceBranch
string
`json:"source_branch"`
SourceProjectID
int
`json:"source_project_id"`
SourceProjectID
int
`json:"source_project_id"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment