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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ The following sets of tools are available:
- `owner`: The owner (user or organization login). The name is not case sensitive. (string, required)
- `owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
- `project_number`: The project's number. (number, required)
- `status_update_id`: The node ID of the project status update. Required for 'get_project_status_update' method. (string, optional)

- **projects_list** - List GitHub Projects resources
- **Required OAuth Scopes**: `read:project`
Expand All @@ -997,11 +998,12 @@ The following sets of tools are available:
- `owner`: The owner (user or organization login). The name is not case sensitive. (string, required)
- `owner_type`: Owner type (user or org). If not provided, will automatically try both. (string, optional)
- `per_page`: Results per page (max 50) (number, optional)
- `project_number`: The project's number. Required for 'list_project_fields' and 'list_project_items' methods. (number, optional)
- `project_number`: The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods. (number, optional)
- `query`: Filter/query string. For list_projects: filter by title text and state (e.g. "roadmap is:open"). For list_project_items: advanced filtering using GitHub's project filtering syntax. (string, optional)

- **projects_write** - Modify GitHub Project items
- **Required OAuth Scopes**: `project`
- `body`: The body of the status update (markdown). Used for 'create_project_status_update' method. (string, optional)
- `issue_number`: The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
- `item_id`: The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. (number, optional)
- `item_owner`: The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)
Expand All @@ -1012,6 +1014,9 @@ The following sets of tools are available:
- `owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
- `project_number`: The project's number. (number, required)
- `pull_request_number`: The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
- `start_date`: The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
- `status`: The status of the project. Used for 'create_project_status_update' method. (string, optional)
- `target_date`: The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
- `updated_field`: 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"}. Required for 'update_project_item' method. (object, optional)

</details>
Expand Down
3 changes: 3 additions & 0 deletions docs/tool-renaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ Will get `issue_read` and `get_file_contents` tools registered, with no errors.
|----------|----------|
| `add_project_item` | `projects_write` |
| `cancel_workflow_run` | `actions_run_trigger` |
| `create_project_status_update` | `projects_write` |
| `delete_project_item` | `projects_write` |
| `delete_workflow_run_logs` | `actions_run_trigger` |
| `download_workflow_run_artifact` | `actions_get` |
| `get_project` | `projects_get` |
| `get_project_field` | `projects_get` |
| `get_project_item` | `projects_get` |
| `get_project_status_update` | `projects_get` |
| `get_workflow` | `actions_get` |
| `get_workflow_job` | `actions_get` |
| `get_workflow_job_logs` | `actions_get` |
Expand All @@ -62,6 +64,7 @@ Will get `issue_read` and `get_file_contents` tools registered, with no errors.
| `get_workflow_run_usage` | `actions_get` |
| `list_project_fields` | `projects_list` |
| `list_project_items` | `projects_list` |
| `list_project_status_updates` | `projects_list` |
| `list_projects` | `projects_list` |
| `list_workflow_jobs` | `actions_list` |
| `list_workflow_run_artifacts` | `actions_list` |
Expand Down
56 changes: 56 additions & 0 deletions pkg/github/__toolsnaps__/create_project_status_update.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"annotations": {
"title": "Create project status update"
},
"description": "Create a status update for a GitHub project",
"inputSchema": {
"properties": {
"body": {
"description": "The body of the status update (markdown).",
"type": "string"
},
"owner": {
"description": "The owner (user or organization login). The name is not case sensitive.",
"type": "string"
},
"owner_type": {
"description": "Owner type",
"enum": [
"user",
"org"
],
"type": "string"
},
"project_number": {
"description": "The project's number.",
"type": "number"
},
"start_date": {
"description": "The start date of the status update in YYYY-MM-DD format.",
"type": "string"
},
"status": {
"description": "The status of the project.",
"enum": [
"INACTIVE",
"ON_TRACK",
"AT_RISK",
"OFF_TRACK",
"COMPLETE"
],
"type": "string"
},
"target_date": {
"description": "The target date of the status update in YYYY-MM-DD format.",
"type": "string"
}
},
"required": [
"owner",
"owner_type",
"project_number"
],
"type": "object"
},
"name": "create_project_status_update"
}
20 changes: 20 additions & 0 deletions pkg/github/__toolsnaps__/get_project_status_update.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"annotations": {
"readOnlyHint": true,
"title": "Get project status update"
},
"description": "Get a single project status update by ID",
"inputSchema": {
"properties": {
"status_update_id": {
"description": "The node ID of the project status update.",
"type": "string"
}
},
"required": [
"status_update_id"
],
"type": "object"
},
"name": "get_project_status_update"
}
42 changes: 42 additions & 0 deletions pkg/github/__toolsnaps__/list_project_status_updates.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"annotations": {
"readOnlyHint": true,
"title": "List project status updates"
},
"description": "List status updates for a GitHub project",
"inputSchema": {
"properties": {
"after": {
"description": "Forward pagination cursor from previous pageInfo.nextCursor.",
"type": "string"
},
"owner": {
"description": "The owner (user or organization login). The name is not case sensitive.",
"type": "string"
},
"owner_type": {
"description": "Owner type",
"enum": [
"user",
"org"
],
"type": "string"
},
"per_page": {
"description": "Results per page (max 50)",
"type": "number"
},
"project_number": {
"description": "The project's number.",
"type": "number"
}
},
"required": [
"owner",
"owner_type",
"project_number"
],
"type": "object"
},
"name": "list_project_status_updates"
}
7 changes: 6 additions & 1 deletion pkg/github/__toolsnaps__/projects_get.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"enum": [
"get_project",
"get_project_field",
"get_project_item"
"get_project_item",
"get_project_status_update"
],
"type": "string"
},
Expand All @@ -45,6 +46,10 @@
"project_number": {
"description": "The project's number.",
"type": "number"
},
"status_update_id": {
"description": "The node ID of the project status update. Required for 'get_project_status_update' method.",
"type": "string"
}
},
"required": [
Expand Down
5 changes: 3 additions & 2 deletions pkg/github/__toolsnaps__/projects_list.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"enum": [
"list_projects",
"list_project_fields",
"list_project_items"
"list_project_items",
"list_project_status_updates"
],
"type": "string"
},
Expand All @@ -47,7 +48,7 @@
"type": "number"
},
"project_number": {
"description": "The project's number. Required for 'list_project_fields' and 'list_project_items' methods.",
"description": "The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods.",
"type": "number"
},
"query": {
Expand Down
28 changes: 26 additions & 2 deletions pkg/github/__toolsnaps__/projects_write.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"destructiveHint": true,
"title": "Modify GitHub Project items"
},
"description": "Add, update, or delete project items in a GitHub Project.",
"description": "Add, update, or delete project items, or create status updates in a GitHub Project.",
"inputSchema": {
"properties": {
"body": {
"description": "The body of the status update (markdown). Used for 'create_project_status_update' method.",
"type": "string"
},
"issue_number": {
"description": "The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
"type": "number"
Expand Down Expand Up @@ -35,7 +39,8 @@
"enum": [
"add_project_item",
"update_project_item",
"delete_project_item"
"delete_project_item",
"create_project_status_update"
],
"type": "string"
},
Expand All @@ -59,6 +64,25 @@
"description": "The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
"type": "number"
},
"start_date": {
"description": "The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method.",
"type": "string"
},
"status": {
"description": "The status of the project. Used for 'create_project_status_update' method.",
"enum": [
"INACTIVE",
"ON_TRACK",
"AT_RISK",
"OFF_TRACK",
"COMPLETE"
],
"type": "string"
},
"target_date": {
"description": "The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method.",
"type": "string"
},
"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\"}. Required for 'update_project_item' method.",
"type": "object"
Expand Down
21 changes: 12 additions & 9 deletions pkg/github/deprecated_tool_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ var DeprecatedToolAliases = map[string]string{
"delete_workflow_run_logs": "actions_run_trigger",

// Projects tools consolidated
"list_projects": "projects_list",
"list_project_fields": "projects_list",
"list_project_items": "projects_list",
"get_project": "projects_get",
"get_project_field": "projects_get",
"get_project_item": "projects_get",
"add_project_item": "projects_write",
"update_project_item": "projects_write",
"delete_project_item": "projects_write",
"list_projects": "projects_list",
"list_project_fields": "projects_list",
"list_project_items": "projects_list",
"get_project": "projects_get",
"get_project_field": "projects_get",
"get_project_item": "projects_get",
"add_project_item": "projects_write",
"update_project_item": "projects_write",
"delete_project_item": "projects_write",
"list_project_status_updates": "projects_list",
"get_project_status_update": "projects_get",
"create_project_status_update": "projects_write",
}
10 changes: 10 additions & 0 deletions pkg/github/minimal_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ type MinimalProject struct {
OwnerType string `json:"owner_type,omitempty"`
}

type MinimalProjectStatusUpdate struct {
ID string `json:"id"`
Body string `json:"body,omitempty"`
Status string `json:"status,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
StartDate string `json:"start_date,omitempty"`
TargetDate string `json:"target_date,omitempty"`
Creator *MinimalUser `json:"creator,omitempty"`
}

// Helper functions

func convertToMinimalProject(fullProject *github.ProjectV2) *MinimalProject {
Expand Down
Loading