Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,44 +1148,6 @@ type FieldValue struct {
To json.RawMessage `json:"to,omitempty"`
}

// ProjectV2ItemFieldValue represents a field value of a project item.
type ProjectV2ItemFieldValue struct {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also moved to colocate with associated ProjectsV2 types. As I understand it, this is not used in events.

ID *int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
DataType string `json:"data_type,omitempty"`
// Value set for the field. The type depends on the field type:
// - text: string
// - number: float64
// - date: string (ISO 8601 date format, e.g. "2023-06-23") or null
// - single_select: object with "id", "name", "color", "description" fields or null
// - iteration: object with "id", "title", "start_date", "duration" fields or null
// - title: object with "text" field (read-only, reflects the item's title) or null
// - assignees: array of user objects with "login", "id", etc. or null
// - labels: array of label objects with "id", "name", "color", etc. or null
// - linked_pull_requests: array of pull request objects or null
// - milestone: milestone object with "id", "title", "description", etc. or null
// - repository: repository object with "id", "name", "full_name", etc. or null
// - reviewers: array of user objects or null
// - status: object with "id", "name", "color", "description" fields (same structure as single_select) or null
Value any `json:"value,omitempty"`
}

// ProjectV2Item represents an item belonging to a project.
type ProjectV2Item struct {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved and consolidated with the newer expanded type in projects.go

ID *int64 `json:"id,omitempty"`
NodeID *string `json:"node_id,omitempty"`
ProjectNodeID *string `json:"project_node_id,omitempty"`
ContentNodeID *string `json:"content_node_id,omitempty"`
ProjectURL *string `json:"project_url,omitempty"`
ContentType *string `json:"content_type,omitempty"`
Creator *User `json:"creator,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
ArchivedAt *Timestamp `json:"archived_at,omitempty"`
ItemURL *string `json:"item_url,omitempty"`
Fields []*ProjectV2ItemFieldValue `json:"fields,omitempty"`
}

// PublicEvent is triggered when a private repository is open sourced.
// According to GitHub: "Without a doubt: the best GitHub event."
// The Webhook event name is "public".
Expand Down
2 changes: 1 addition & 1 deletion github/event_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15866,7 +15866,7 @@ func TestProjectV2ItemEvent_Marshal(t *testing.T) {
NodeID: Ptr("nid"),
ProjectNodeID: Ptr("pnid"),
ContentNodeID: Ptr("cnid"),
ContentType: Ptr("ct"),
ContentType: Ptr(ProjectV2ItemContentType("ct")),
Creator: &User{
Login: Ptr("l"),
ID: Ptr(int64(1)),
Expand Down
226 changes: 221 additions & 5 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading