Skip to content

Add ProjectV2 status update tools (list, get, create) - #1987

Merged
JoannaaKL merged 6 commits into
github:mainfrom
e-straight:add-project-status-updates
Feb 18, 2026
Merged

Add ProjectV2 status update tools (list, get, create)#1987
JoannaaKL merged 6 commits into
github:mainfrom
e-straight:add-project-status-updates

Conversation

@e-straight

@e-straighte-straight commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Add three new tools for managing GitHub ProjectV2 status updates (list, get, create), wired into both individual and consolidated project tools.

Why

Fixes#1963

What changed

  • Add list_project_status_updates tool (+ projects_list method): list status updates with pagination, ordered by creation date descending
  • Add get_project_status_update tool (+ projects_get method): fetch a single status update by node ID
  • Add create_project_status_update tool (+ projects_write method): create a status update with optional body, status, start_date, and target_date
  • Add GraphQL types/queries (statusUpdateNode, statusUpdatesUserQuery, statusUpdatesOrgQuery, statusUpdateNodeQuery) supporting both user-owned and org-owned projects
  • Add CreateProjectV2StatusUpdateInput locally (not in shurcooL/githubv4 library)
  • Add MinimalProjectStatusUpdate response type in minimal_types.go
  • Add deprecated tool aliases for all three new individual tools
  • 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
  • Fix brittle node type check in getProjectStatusUpdate (was stringifying githubv4.ID and comparing to "<nil>")
  • Refactor createProjectStatusUpdate to accept typed parameters instead of raw args map[string]any
  • Add ProjectResolveIDFailedError constant for consistent error reporting
  • Add toolset instructions for the new status update tools
  • 21 new test subtests covering user/org paths, pagination, error handling, input validation, field verification, and consolidated tool dispatch

MCP impact

  • New tool added — three new individual tools (list_project_status_updates, get_project_status_update, create_project_status_update) and three new methods on the consolidated tools (projects_list, projects_get, projects_write)

Prompts tested (tool changes only)

  • "List the recent status updates for project number 5 in octo-org"
  • "Get the status update with ID PVTSU_abc123"
  • "Create a status update for project 2 owned by octocat with status ON_TRACK and body 'Sprint 3 is going well'"
  • "Post an AT_RISK status update for the org project with start date 2026-01-01 and target date 2026-06-30"

Security / limits

  • Data exposure, filtering, or token/size limits considered — per_page is capped to MaxProjectsPerPage (50). Date inputs are validated client-side before hitting the API. Status values are validated against an allowlist.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Updated (README / docs / examples) — script/generate-docs run, README.md and docs/tool-renaming.md updated

@e-straight
e-straight requested a review from a team as a code ownerFebruary 10, 2026 02:59
CopilotAI review requested due to automatic review settings February 10, 2026 02:59

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds ProjectV2 status update support to the GitHub MCP Server by introducing dedicated tools and integrating them into the consolidated projects_* tools, enabling listing, fetching, and creating ProjectV2 status updates via GraphQL.

Changes:

  • Added three new tools: list_project_status_updates, get_project_status_update, and create_project_status_update, plus consolidated-tool dispatch support.
  • Introduced new minimal response type(s) and GraphQL query/mutation structs (including a locally-defined CreateProjectV2StatusUpdateInput).
  • Added extensive unit test coverage and updated docs/toolsnaps/tool aliases accordingly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
pkg/github/projects.goImplements GraphQL types/queries/mutation + new tools and consolidated dispatch wiring.
pkg/github/minimal_types.goAdds MinimalProjectStatusUpdate response type.
pkg/github/tools.goRegisters the new tools in the tool inventory.
pkg/github/toolset_instructions.goUpdates projects toolset instructions to mention status update workflows.
pkg/github/deprecated_tool_aliases.goAdds deprecated aliases mapping new individual tools to consolidated tools.
pkg/github/projects_test.goAdds comprehensive tests for new tools + consolidated dispatch paths.
pkg/github/toolsnaps/*.snapUpdates/creates tool schema snapshots for new/updated tools.
docs/tool-renaming.mdDocuments the new deprecated aliases.
README.mdUpdates generated docs sections for consolidated tool schema changes.
Comments suppressed due to low confidence (1)

pkg/github/projects.go:2450

  • getProjectStatusUpdate checks q.Node.StatusUpdate.ID == nil, but githubv4.ID cannot be compared to nil (it’s a string alias), which will not compile. Use an empty-string/zero-value check (or make the field a pointer type if you truly need nil semantics) to detect a missing inline-fragment match.
	if q.Node.StatusUpdate.ID == nil || q.Node.StatusUpdate.ID == "" {
return utils.NewToolResultError(fmt.Sprintf("%s: node is not a ProjectV2StatusUpdate or was not found", ProjectStatusUpdateGetFailedError)), nil, nil
}

Comment threadpkg/github/projects.go Outdated
Comment threadpkg/github/projects.go Outdated
Comment threadpkg/github/projects.go Outdated
@e-straight
e-straightforce-pushed the add-project-status-updates branch from 8196111 to ad3fcf5CompareFebruary 10, 2026 03:03
@JoannaaKL
JoannaaKLforce-pushed the add-project-status-updates branch from 5a0aab5 to f3b31a6CompareFebruary 13, 2026 16:02
JoannaaKL
JoannaaKL previously approved these changes Feb 16, 2026

@tommaso-morotommaso-moro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your work on this!

I left a comment, other than that looks good and happy to stamp once conflicts are resolved!

Comment threaddocs/tool-renaming.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These tools are not being renamed I believe, so they shouldn't be added to this list

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

100%, good catch!

elijahstrand others added 6 commits February 18, 2026 09:52
Closesgithub#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.
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pkg/github/toolsnaps/projects_list.snap

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add read and write tools for ProjectV2 status updates to the projects toolset

6 participants

@e-straight@tommaso-moro@JoannaaKL@leuasseurfarrelds247-arch@elijahstr