67b8bf2ed2
* Add ProjectV2 status update tools (list, get, create) Closes https://github.com/github/github-mcp-server/issues/1963 Add three new individual tools and wire them into the consolidated project tools for managing GitHub ProjectV2 status updates: - list_project_status_updates / projects_list: List status updates for a project with pagination, ordered by creation date descending - get_project_status_update / projects_get: Fetch a single status update by node ID - create_project_status_update / projects_write: Create a status update with optional body, status, start_date, and target_date New GraphQL types and queries (statusUpdateNode, statusUpdatesUserQuery, statusUpdatesOrgQuery, statusUpdateNodeQuery) support both user-owned and org-owned projects. The CreateProjectV2StatusUpdateInput type is defined locally since the shurcooL/githubv4 library does not include it. Also includes quality improvements discovered during implementation: - Extract resolveProjectNodeID helper to deduplicate ~70 lines of project ID resolution logic shared between addProjectItem and createProjectStatusUpdate - Add client-side YYYY-MM-DD date format validation for start_date and target_date fields before sending to the API - Fix brittle node type check in getProjectStatusUpdate that relied on stringifying a githubv4.ID and comparing to "<nil>" - Refactor createProjectStatusUpdate to accept typed parameters instead of raw args map - Add deprecated tool aliases for all three new individual tools - Add ProjectResolveIDFailedError constant for consistent error reporting Test coverage includes 21 subtests covering both user and org paths, pagination, error handling, input validation, field verification, and consolidated tool dispatch. * Fix projects_get required params and harden status update tools Loosen projects_get schema to only require "method", since get_project_status_update only needs status_update_id and never uses owner or project_number. Also use pointer types for optional statusUpdateNode fields, add owner_type validation for list/create status updates, clamp negative per_page values, and fix resolveProjectNodeID to return "" instead of nil on error. * Resolve conflicts * Update doc * Update aliases * Dont update tool renaming docs --------- Co-authored-by: e-straight <elijahstr@users.noreply.github.com> Co-authored-by: JoannaaKL <joannaakl@github.com>
99 lines
3.5 KiB
Plaintext
99 lines
3.5 KiB
Plaintext
{
|
|
"annotations": {
|
|
"destructiveHint": true,
|
|
"title": "Modify GitHub Project items"
|
|
},
|
|
"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"
|
|
},
|
|
"item_id": {
|
|
"description": "The project item ID. Required for 'update_project_item' and 'delete_project_item' methods.",
|
|
"type": "number"
|
|
},
|
|
"item_owner": {
|
|
"description": "The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method.",
|
|
"type": "string"
|
|
},
|
|
"item_repo": {
|
|
"description": "The name of the repository containing the issue or pull request. Required for 'add_project_item' method.",
|
|
"type": "string"
|
|
},
|
|
"item_type": {
|
|
"description": "The item's type, either issue or pull_request. Required for 'add_project_item' method.",
|
|
"enum": [
|
|
"issue",
|
|
"pull_request"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"method": {
|
|
"description": "The method to execute",
|
|
"enum": [
|
|
"add_project_item",
|
|
"update_project_item",
|
|
"delete_project_item",
|
|
"create_project_status_update"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"description": "The project owner (user or organization login). The name is not case sensitive.",
|
|
"type": "string"
|
|
},
|
|
"owner_type": {
|
|
"description": "Owner type (user or org). If not provided, will be automatically detected.",
|
|
"enum": [
|
|
"user",
|
|
"org"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"project_number": {
|
|
"description": "The project's number.",
|
|
"type": "number"
|
|
},
|
|
"pull_request_number": {
|
|
"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"
|
|
}
|
|
},
|
|
"required": [
|
|
"method",
|
|
"owner",
|
|
"project_number"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"name": "projects_write"
|
|
} |