Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion pkg/github/__toolsnaps__/get_project_item.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"inputSchema": {
"properties": {
"fields": {
"description": "Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included.",
"description": "Specific list of field IDs to include in the response (e.g. [102589, 985201, 169875]). If not provided, only the title field is included.",
"items": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/__toolsnaps__/list_project_items.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"inputSchema": {
"properties": {
"fields": {
"description": "Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included.",
"description": "Specific list of field IDs to include in the response (e.g. [102589, 985201, 169875]). If not provided, only the title field is included.",
"items": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/__toolsnaps__/update_project_item.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"type": "number"
},
"updated_field": {
"description": "Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set \"value\" to null. Example: {\"id\": 123456, \"value\": \"New Value\"}",
"description": "Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {id: 123456, value: New Value}",
"properties": {},
"type": "object"
}
Expand Down
40 changes: 0 additions & 40 deletions pkg/github/minimal_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,6 @@ type MinimalProject struct {
DeletedBy *MinimalUser `json:"deleted_by,omitempty"`
}

type MinimalProjectItem struct {
ID *int64 `json:"id,omitempty"`
NodeID *string `json:"node_id,omitempty"`
Title *string `json:"title,omitempty"`
Description *string `json:"description,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 *MinimalUser `json:"creator,omitempty"`
CreatedAt *github.Timestamp `json:"created_at,omitempty"`
UpdatedAt *github.Timestamp `json:"updated_at,omitempty"`
ArchivedAt *github.Timestamp `json:"archived_at,omitempty"`
ItemURL *string `json:"item_url,omitempty"`
Fields []*projectV2ItemFieldValue `json:"fields,omitempty"`
}

// Helper functions

func convertToMinimalProject(fullProject *github.ProjectV2) *MinimalProject {
Expand Down Expand Up @@ -186,29 +169,6 @@ func convertToMinimalUser(user *github.User) *MinimalUser {
}
}

func convertToMinimalProjectItem(item *projectV2Item) *MinimalProjectItem {
if item == nil {
return nil
}

return &MinimalProjectItem{
ID: item.ID,
NodeID: item.NodeID,
Title: item.Title,
Description: item.Description,
ProjectNodeID: item.ProjectNodeID,
ContentNodeID: item.ContentNodeID,
ProjectURL: item.ProjectURL,
ContentType: item.ContentType,
Creator: convertToMinimalUser(item.Creator),
CreatedAt: item.CreatedAt,
UpdatedAt: item.UpdatedAt,
ArchivedAt: item.ArchivedAt,
ItemURL: item.ItemURL,
Fields: item.Fields,
}
}

// convertToMinimalCommit converts a GitHub API RepositoryCommit to MinimalCommit
func convertToMinimalCommit(commit *github.RepositoryCommit, includeDiffs bool) MinimalCommit {
minimalCommit := MinimalCommit{
Expand Down
Loading
Loading