Require temporary_id for draft issue creation (breaking change)#14321
Require temporary_id for draft issue creation (breaking change)#14321
Conversation
…_project Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot Recompile workflows |
Workflows recompiled successfully. All 147 workflows compiled with no changes needed - the lock files were already up-to-date. |
|
@copilot No longer support draft_title only. The behavior should be just like in issues and PRs and yield and error. When done, recompile workflows |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Changes implemented in commit 2025ddb: Breaking change: Draft issues now require
The behavior now enforces explicit ID management to prevent duplicate drafts, just like issues and PRs. |
|
@pelikhan I think this is a required change. There should be no reason to treat draft issue items (in GitHub Projects) any different than issues or pull requests. Not requiring any identifier and matching by titles or hash of titles+body is not something I want to support going forward, it leads to all sorts of troubles. Current behavior is that often draft items get duplicated instead of updated with |
|
@copilot Refactor implementation |
… mapping Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Implementation refactored in commit 860b484: Key improvements:
All 51 tests passing. Backward compatible with legacy string mapping format. |
Refactoring Implementation
Addressed all PR review feedback to improve code quality and efficiency.
Changes Made
1. Removed unused import
generateTemporaryIdfrom imports (was never used)2. Optimized
findExistingDraftByItemId()node(id: $draftItemId)3. Added
#prefix handlingdraft_issue_idnow strips optional leading#prefixtemporary_idnow strips optional leading#prefixcontent_numberandprojecthandle#prefix4. Structured temporary ID mapping
{ draftItemId: "..." }{ repo, number }temporaryIdMap5. Improved schema documentation
temporary_idrequirement is runtime-enforced, not schema-enforced6. Added comprehensive tests
#prefix handling indraft_issue_id#prefix handling intemporary_idBackward Compatibility
✅ Resolution logic handles both formats:
temporaryIdMap.set("aw_...", "itemId")temporaryIdMap.set("aw_...", { draftItemId: "itemId" })💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.