Commit b54cfff6 authored by Johan Brandhorst's avatar Johan Brandhorst Committed by Sander van Harmelen

Add `can_push` option to Deploy Keys (#146)

Fixes #145.

This adds the `can_push` option to the AddDeployKeyOption and DeployKey structs, in line with what is supported by GitLab.
parent a932a65a
...@@ -36,6 +36,7 @@ type DeployKey struct { ...@@ -36,6 +36,7 @@ type DeployKey struct {
Title string `json:"title"` Title string `json:"title"`
Key string `json:"key"` Key string `json:"key"`
CreatedAt *time.Time `json:"created_at"` CreatedAt *time.Time `json:"created_at"`
CanPush *bool `json:"can_push"`
} }
func (k DeployKey) String() string { func (k DeployKey) String() string {
...@@ -97,8 +98,9 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...@@ -97,8 +98,9 @@ func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options
// GitLab API docs: // GitLab API docs:
// https://docs.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 { type AddDeployKeyOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"`
Key *string `url:"key,omitempty" json:"key,omitempty"` Key *string `url:"key,omitempty" json:"key,omitempty"`
CanPush *bool `url:"can_push,omitempty" json:"can_push,omitempty"`
} }
// AddDeployKey creates a new deploy key for a project. If deploy key already // AddDeployKey creates a new deploy key for a project. If deploy key already
......
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