Unverified Commit ed88abbf authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Merge pull request #557 from csquire/groups-custom-attributes

Add custom attributes to groups, users and projects apis
parents cd1e3f03 a944b54e
...@@ -47,6 +47,7 @@ type Group struct { ...@@ -47,6 +47,7 @@ type Group struct {
ParentID int `json:"parent_id"` ParentID int `json:"parent_id"`
Projects []*Project `json:"projects"` Projects []*Project `json:"projects"`
Statistics *StorageStatistics `json:"statistics"` Statistics *StorageStatistics `json:"statistics"`
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
} }
// ListGroupsOptions represents the available ListGroups() options. // ListGroupsOptions represents the available ListGroups() options.
...@@ -62,6 +63,7 @@ type ListGroupsOptions struct { ...@@ -62,6 +63,7 @@ type ListGroupsOptions struct {
SkipGroups []int `url:"skip_groups,omitempty" json:"skip_groups,omitempty"` SkipGroups []int `url:"skip_groups,omitempty" json:"skip_groups,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"` Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"` Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"`
WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
} }
// ListGroups gets a list of groups (as user: my groups, as admin: all groups). // ListGroups gets a list of groups (as user: my groups, as admin: all groups).
......
...@@ -89,6 +89,7 @@ type Project struct { ...@@ -89,6 +89,7 @@ type Project struct {
Statistics *ProjectStatistics `json:"statistics"` Statistics *ProjectStatistics `json:"statistics"`
Links *Links `json:"_links,omitempty"` Links *Links `json:"_links,omitempty"`
CIConfigPath *string `json:"ci_config_path"` CIConfigPath *string `json:"ci_config_path"`
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
} }
// Repository represents a repository. // Repository represents a repository.
...@@ -195,6 +196,7 @@ type ListProjectsOptions struct { ...@@ -195,6 +196,7 @@ type ListProjectsOptions struct {
WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"` WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"`
WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"` WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"`
MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"` MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"`
WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
} }
// ListProjects gets a list of projects accessible by the authenticated user. // ListProjects gets a list of projects accessible by the authenticated user.
......
...@@ -66,6 +66,7 @@ type User struct { ...@@ -66,6 +66,7 @@ type User struct {
External bool `json:"external"` External bool `json:"external"`
PrivateProfile bool `json:"private_profile"` PrivateProfile bool `json:"private_profile"`
SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"` SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"`
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
} }
// UserIdentity represents a user identity. // UserIdentity represents a user identity.
...@@ -91,6 +92,7 @@ type ListUsersOptions struct { ...@@ -91,6 +92,7 @@ type ListUsersOptions struct {
CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"` CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"` Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
} }
// ListUsers gets a list of users. // ListUsers gets a list of users.
......
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