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
aa181b2a
Commit
aa181b2a
authored
Sep 28, 2016
by
Sander van Harmelen
Committed by
GitHub
Sep 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add all event types used by the webhooks (#73)
parent
b2fbddd2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
26 deletions
+34
-26
events.go
events.go
+0
-0
projects.go
projects.go
+34
-26
No files found.
events.go
0 → 100644
View file @
aa181b2a
This diff is collapsed.
Click to expand it.
projects.go
View file @
aa181b2a
...
...
@@ -68,6 +68,25 @@ type Project struct {
PublicBuilds
bool
`json:"public_builds"`
}
// Repository represents a repository.
type
Repository
struct
{
Name
string
`json:"name"`
Description
string
`json:"description"`
WebURL
string
`json:"web_url"`
AvatarURL
string
`json:"avatar_url"`
GitSSHURL
string
`json:"git_ssh_url"`
GitHTTPURL
string
`json:"git_http_url"`
Namespace
string
`json:"namespace"`
VisibilityLevel
int
`json:"visibility_level"`
PathWithNamespace
string
`json:"path_with_namespace"`
DefaultBranch
string
`json:"default_branch"`
Homepage
string
`json:"homepage"`
URL
string
`json:"url"`
SSHURL
string
`json:"ssh_url"`
HTTPURL
string
`json:"http_url"`
}
// ProjectNamespace represents a project namespace.
type
ProjectNamespace
struct
{
CreatedAt
*
time
.
Time
`json:"created_at"`
Description
string
`json:"description"`
...
...
@@ -78,16 +97,19 @@ type ProjectNamespace struct {
UpdatedAt
*
time
.
Time
`json:"updated_at"`
}
// Permissions represents premissions.
type
Permissions
struct
{
ProjectAccess
*
ProjectAccess
`json:"project_access"`
GroupAccess
*
GroupAccess
`json:"group_access"`
}
// ProjectAccess represents project access.
type
ProjectAccess
struct
{
AccessLevel
AccessLevelValue
`json:"access_level"`
NotificationLevel
NotificationLevelValue
`json:"notification_level"`
}
// GroupAccess represents group access.
type
GroupAccess
struct
{
AccessLevel
AccessLevelValue
`json:"access_level"`
NotificationLevel
NotificationLevelValue
`json:"notification_level"`
...
...
@@ -261,28 +283,14 @@ type ProjectEvent struct {
AuthorID
int
`json:"author_id"`
AuthorUsername
string
`json:"author_username"`
Data
struct
{
Before
string
`json:"before"`
After
string
`json:"after"`
Ref
string
`json:"ref"`
UserID
int
`json:"user_id"`
UserName
string
`json:"user_name"`
Repository
struct
{
Name
string
`json:"name"`
URL
string
`json:"url"`
Description
string
`json:"description"`
Homepage
string
`json:"homepage"`
}
`json:"repository"`
Commits
[]
struct
{
ID
string
`json:"id"`
Message
string
`json:"message"`
Timestamp
*
time
.
Time
`json:"timestamp"`
URL
string
`json:"url"`
Author
struct
{
Name
string
`json:"name"`
Email
string
`json:"email"`
}
`json:"author"`
}
`json:"commits"`
TotalCommitsCount
int
`json:"total_commits_count"`
Before
string
`json:"before"`
After
string
`json:"after"`
Ref
string
`json:"ref"`
UserID
int
`json:"user_id"`
UserName
string
`json:"user_name"`
Repository
*
Repository
`json:"repository"`
Commits
[]
*
Commit
`json:"commits"`
TotalCommitsCount
int
`json:"total_commits_count"`
}
`json:"data"`
TargetTitle
interface
{}
`json:"target_title"`
}
...
...
@@ -904,8 +912,8 @@ func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error)
return
s
.
client
.
Do
(
req
,
nil
)
}
// Archive
s the project if the user is either admin or the project owner
// of this project.
// Archive
Project archives the project if the user is either admin or the
//
project owner
of this project.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/projects.html#archive-a-project
...
...
@@ -930,8 +938,8 @@ func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response,
return
p
,
resp
,
err
}
// Unarchive
s the project if the user is either admin or the project owne
r
// of this project.
// Unarchive
Project unarchives the project if the user is either admin o
r
//
the project owner
of this project.
//
// GitLab API docs:
// http://docs.gitlab.com/ce/api/projects.html#unarchive-a-project
...
...
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