Add temporary_id support to update_project for draft issue references#14331
Merged
Add temporary_id support to update_project for draft issue references#14331
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…lity Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
mnkiefer
approved these changes
Feb 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the update_project safe-output tool to better support GitHub Projects v2 draft issue workflows by allowing draft items to be referenced and updated via a stable temporary identifier across steps/messages.
Changes:
- Added
temporary_idanddraft_issue_idinputs for draft issues in theupdate_projecttool schema. - Updated
update_project.cjsto storetemporary_id -> draftItemIdmappings on creation and to resolvedraft_issue_idfor updates (with title fallback). - Added new unit tests covering creation/update flows,
#prefix normalization, fallbacks, and error cases.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| actions/setup/js/update_project.cjs | Adds draft-issue create/update modes using temporary_id / draft_issue_id, including mapping storage and output. |
| actions/setup/js/update_project.test.cjs | Adds test cases validating the new draft-issue reference/update behavior and error handling. |
| actions/setup/js/safe_outputs_tools.json | Extends the update_project input schema to document/validate the new draft-issue parameters. |
Comments suppressed due to low confidence (1)
actions/setup/js/safe_outputs_tools.json:639
- Inconsistent temporary ID format in the schema:
draft_issue_idis constrained to^#?aw_[0-9a-f]{12}$, but the description examples useaw_smokedraft01/#aw_smokedraft01(non-hex). Please either update the examples to a valid 12-hex ID (e.g.,aw_abc123def456) or relax the pattern to match the intended allowed format.
"draft_issue_id": {
"type": "string",
"pattern": "^#?aw_[0-9a-f]{12}$",
"description": "Temporary ID of an existing draft issue to update (e.g., 'aw_smokedraft01' or '#aw_smokedraft01'). Use this to reference a draft created earlier with a matching temporary_id. When provided, draft_title is not required for updates."
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot
AI
changed the title
[WIP] Fix update_project tool for draft issue references
Add temporary_id support to update_project for draft issue references
Feb 7, 2026
…act duplicate function, fix test IDs Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix update_project safe outputs tool: Add temporary_id support for draft issues
Implementation Plan
Changes Made
1. Schema Updates (Comment 2777532857)
temporary_idpattern to^#?aw_[0-9a-f]{12}$(allows optional#prefix)2. Test IDs Fixed (Comment 2777532861)
aw_smokedraft01→aw_9f11121ed7dfaw_notfound123→aw_aefe5b4b9585aw_notfound456→aw_27a9a9bfcc4eaw_missing1234→aw_1a2b3c4d5e6f3. Validation with Shared Helpers (Comment 2777532863)
isTemporaryId,normalizeTemporaryIdfromtemporary_id.cjstemporary_idanddraft_issue_idnormalizeTemporaryId()for consistent map lookups4. Extract Duplicate Function (Comment 2777532867 - user requested)
findExistingDraftByTitle()as standalone helper functionValidation
✅ All 52 tests pass
✅ JavaScript formatted and linted
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.