-
Notifications
You must be signed in to change notification settings - Fork 227
Fix CI pipeline issue in actions workflow #15709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
81bf39a
e5618d6
3e6b5de
f777b7e
d0fdfb0
d6c33da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,7 +30,7 @@ const { sanitizeTitle, applyTitlePrefix } = require("./sanitize_title.cjs"); | |||||
| const { generateFooterWithMessages } = require("./messages_footer.cjs"); | ||||||
| const { generateWorkflowIdMarker } = require("./generate_footer.cjs"); | ||||||
| const { getTrackerID } = require("./get_tracker_id.cjs"); | ||||||
| const { generateTemporaryId, isTemporaryId, normalizeTemporaryId, replaceTemporaryIdReferences } = require("./temporary_id.cjs"); | ||||||
| const { generateTemporaryId, isTemporaryId, normalizeTemporaryId, getOrGenerateTemporaryId, replaceTemporaryIdReferences } = require("./temporary_id.cjs"); | ||||||
|
||||||
| const { generateTemporaryId, isTemporaryId, normalizeTemporaryId, getOrGenerateTemporaryId, replaceTemporaryIdReferences } = require("./temporary_id.cjs"); | |
| const { isTemporaryId, normalizeTemporaryId, getOrGenerateTemporaryId, replaceTemporaryIdReferences } = require("./temporary_id.cjs"); |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |||||||||||
|
|
||||||||||||
| const { loadAgentOutput } = require("./load_agent_output.cjs"); | ||||||||||||
| const { getErrorMessage } = require("./error_helpers.cjs"); | ||||||||||||
| const { normalizeTemporaryId, isTemporaryId } = require("./temporary_id.cjs"); | ||||||||||||
| const { normalizeTemporaryId, isTemporaryId, generateTemporaryId, getOrGenerateTemporaryId } = require("./temporary_id.cjs"); | ||||||||||||
|
||||||||||||
| const { normalizeTemporaryId, isTemporaryId, generateTemporaryId, getOrGenerateTemporaryId } = require("./temporary_id.cjs"); | |
| const { normalizeTemporaryId, isTemporaryId, getOrGenerateTemporaryId } = require("./temporary_id.cjs"); |
Copilot
AI
Feb 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create_project now auto-generates a temporaryId via getOrGenerateTemporaryId() when message.temporary_id is missing, but that generated ID isn’t written back onto message.temporary_id and isn’t included in the non-staged return value. As a result, the unified handler manager can’t persist the project mapping (it keys off message.temporary_id) and the caller never receives the auto-generated ID, which contradicts the create_project tool contract (“auto-generated and returned”). Consider setting message.temporary_id to the generated value and/or returning it (e.g. temporaryId) so downstream mapping and follow-up update_project calls work.
| const temporaryId = /** @type {string} */ tempIdResult.temporaryId; | |
| const temporaryId = /** @type {string} */ tempIdResult.temporaryId; | |
| // Persist the generated temporary ID back onto the message so downstream | |
| // handlers that key off message.temporary_id can use it. | |
| message.temporary_id = temporaryId; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,48 @@ function replaceTemporaryIdReferencesLegacy(text, tempIdMap) { | |
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Validate and process a temporary_id from a message | ||
| * Auto-generates a temporary ID if not provided, or validates and normalizes if provided | ||
| * | ||
| * @param {Object} message - The message object that may contain a temporary_id field | ||
| * @param {string} entityType - Type of entity (e.g., "issue", "discussion", "project") for error messages | ||
| * @returns {{temporaryId: string, error: null} | {temporaryId: null, error: string}} Result with temporaryId or error | ||
| */ | ||
| function getOrGenerateTemporaryId(message, entityType = "item") { | ||
| // Auto-generate if not provided | ||
|
Comment on lines
+99
to
+108
|
||
| if (message.temporary_id === undefined || message.temporary_id === null) { | ||
| return { | ||
| temporaryId: generateTemporaryId(), | ||
| error: null, | ||
| }; | ||
| } | ||
|
|
||
| // Validate type | ||
| if (typeof message.temporary_id !== "string") { | ||
| return { | ||
| temporaryId: null, | ||
| error: `temporary_id must be a string (got ${typeof message.temporary_id})`, | ||
| }; | ||
| } | ||
|
|
||
| // Normalize and validate format | ||
| const rawTemporaryId = message.temporary_id.trim(); | ||
| const normalized = rawTemporaryId.startsWith("#") ? rawTemporaryId.substring(1).trim() : rawTemporaryId; | ||
|
|
||
| if (!isTemporaryId(normalized)) { | ||
| return { | ||
| temporaryId: null, | ||
| error: `Invalid temporary_id format: '${message.temporary_id}'. Temporary IDs must be in format 'aw_' followed by 3 to 8 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`, | ||
| }; | ||
| } | ||
|
|
||
| return { | ||
| temporaryId: normalized.toLowerCase(), | ||
| error: null, | ||
| }; | ||
| } | ||
|
Comment on lines
+107
to
+139
|
||
|
|
||
| /** | ||
| * Load the temporary ID map from environment variable | ||
| * Supports both old format (temporary_id -> number) and new format (temporary_id -> {repo, number}) | ||
|
|
@@ -470,6 +512,7 @@ module.exports = { | |
| generateTemporaryId, | ||
| isTemporaryId, | ||
| normalizeTemporaryId, | ||
| getOrGenerateTemporaryId, | ||
| replaceTemporaryIdReferences, | ||
| replaceTemporaryIdReferencesLegacy, | ||
| loadTemporaryIdMap, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generateTemporaryId,isTemporaryId, andnormalizeTemporaryIdare imported here but not referenced anywhere in create_discussion.cjs (only getOrGenerateTemporaryId and replaceTemporaryIdReferences are used). Removing unused imports will make it clearer which temporary-id utilities this handler actually depends on.