aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/projects.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/projects.go')
-rw-r--r--vendor/github.com/google/go-github/github/projects.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/vendor/github.com/google/go-github/github/projects.go b/vendor/github.com/google/go-github/github/projects.go
index 58b638e..a9b143d 100644
--- a/vendor/github.com/google/go-github/github/projects.go
+++ b/vendor/github.com/google/go-github/github/projects.go
@@ -65,6 +65,12 @@ type ProjectOptions struct {
Name string `json:"name,omitempty"`
// The body of the project. (Optional.)
Body string `json:"body,omitempty"`
+
+ // The following field(s) are only applicable for update.
+ // They should be left with zero values for creation.
+
+ // State of the project. Either "open" or "closed". (Optional.)
+ State string `json:"state,omitempty"`
}
// UpdateProject updates a repository project.
@@ -259,14 +265,19 @@ func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int, o
// ProjectCard represents a card in a column of a GitHub Project.
//
-// GitHub API docs: https://developer.github.com/v3/repos/projects/
+// GitHub API docs: https://developer.github.com/v3/projects/cards/#get-a-project-card
type ProjectCard struct {
+ URL *string `json:"url,omitempty"`
ColumnURL *string `json:"column_url,omitempty"`
ContentURL *string `json:"content_url,omitempty"`
ID *int `json:"id,omitempty"`
Note *string `json:"note,omitempty"`
+ Creator *User `json:"creator,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
+
+ // The following fields are only populated by Webhook events.
+ ColumnID *int `json:"column_id,omitempty"`
}
// ListProjectCards lists the cards in a column of a GitHub Project.
@@ -324,10 +335,10 @@ func (s *ProjectsService) GetProjectCard(ctx context.Context, columnID int) (*Pr
type ProjectCardOptions struct {
// The note of the card. Note and ContentID are mutually exclusive.
Note string `json:"note,omitempty"`
- // The ID (not Number) of the Issue or Pull Request to associate with this card.
+ // The ID (not Number) of the Issue to associate with this card.
// Note and ContentID are mutually exclusive.
ContentID int `json:"content_id,omitempty"`
- // The type of content to associate with this card. Possible values are: "Issue", "PullRequest".
+ // The type of content to associate with this card. Possible values are: "Issue".
ContentType string `json:"content_type,omitempty"`
}