You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: update all error messages and tests from 3-to-8 to 3-to-12 char limit
- Update "3 to 8" → "3 to 12" in error messages across:
temporary_id.cjs, create_issue.cjs, create_pull_request.cjs,
safe_output_unified_handler_manager.cjs, update_project.cjs
- Update test assertions in temporary_id.test.cjs and update_project.test.cjs
- Use 13-char "aw_toolong123456" in update_project.test.cjs "too long" test case
(previous "aw_toolong123" was 10 chars, now valid under 12-char limit)
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy file name to clipboardExpand all lines: actions/setup/js/create_issue.cjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -340,7 +340,7 @@ async function main(config = {}) {
340
340
}else{
341
341
// Check if it looks like a malformed temporary ID
342
342
if(parentWithoutHash.startsWith("aw_")){
343
-
core.warning(`Invalid temporary ID format for parent: '${message.parent}'. Temporary IDs must be in format 'aw_' followed by 3 to 8 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`);
343
+
core.warning(`Invalid temporary ID format for parent: '${message.parent}'. Temporary IDs must be in format 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`);
Copy file name to clipboardExpand all lines: actions/setup/js/create_pull_request.cjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -211,11 +211,11 @@ async function main(config = {}) {
211
211
212
212
if(!isTemporaryId(normalized)){
213
213
core.warning(
214
-
`Skipping create_pull_request: Invalid temporary_id format: '${pullRequestItem.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'`
214
+
`Skipping create_pull_request: Invalid temporary_id format: '${pullRequestItem.temporary_id}'. Temporary IDs must be in format 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`
215
215
);
216
216
return{
217
217
success: false,
218
-
error: `Invalid temporary_id format: '${pullRequestItem.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'`,
218
+
error: `Invalid temporary_id format: '${pullRequestItem.temporary_id}'. Temporary IDs must be in format 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`,
thrownewError(`${ERR_VALIDATION}: Message ${messageIndex+1} (${messageType}): invalid temporary_id '${raw}'. Temporary IDs must be 'aw_' followed by 3 to 8 alphanumeric characters (A-Za-z0-9), e.g. 'aw_abc' or 'aw_Test123'`);
762
+
thrownewError(`${ERR_VALIDATION}: Message ${messageIndex+1} (${messageType}): invalid temporary_id '${raw}'. Temporary IDs must be 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9), e.g. 'aw_abc' or 'aw_Test123'`);
763
763
}
764
764
765
765
// Normalize to the strict bare ID to keep lookups consistent.
core.warning(`Malformed temporary ID reference '${candidate[0]}' found in body text. Temporary IDs must be in format '#aw_' followed by 3 to 8 alphanumeric characters (A-Za-z0-9). Example: '#aw_abc' or '#aw_Test123'`);
95
+
core.warning(`Malformed temporary ID reference '${candidate[0]}' found in body text. Temporary IDs must be in format '#aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: '#aw_abc' or '#aw_Test123'`);
96
96
}
97
97
}
98
98
@@ -162,7 +162,7 @@ function getOrGenerateTemporaryId(message, entityType = "item") {
162
162
if(!isTemporaryId(normalized)){
163
163
return{
164
164
temporaryId: null,
165
-
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'`,
165
+
error: `Invalid temporary_id format: '${message.temporary_id}'. Temporary IDs must be in format 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_Test123'`,
166
166
};
167
167
}
168
168
@@ -298,14 +298,14 @@ function resolveIssueNumber(value, temporaryIdMap) {
298
298
return{
299
299
resolved: null,
300
300
wasTemporaryId: false,
301
-
errorMessage: `Invalid temporary ID format: '${valueStr}'. Temporary IDs must be in format 'aw_' followed by 3 to 8 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_abc12345'`,
301
+
errorMessage: `Invalid temporary ID format: '${valueStr}'. Temporary IDs must be in format 'aw_' followed by 3 to 12 alphanumeric characters (A-Za-z0-9). Example: 'aw_abc' or 'aw_abc12345'`,
302
302
};
303
303
}
304
304
305
305
// It's a real issue number - use context repo as default
306
306
constissueNumber=typeofvalue==="number" ? value : parseInt(valueWithoutHash,10);
307
307
if(isNaN(issueNumber)||issueNumber<=0){
308
-
return{resolved: null,wasTemporaryId: false,errorMessage: `Invalid issue number: ${value}. Expected either a valid temporary ID (format: aw_ followed by 3-8 alphanumeric characters) or a numeric issue number.`};
308
+
return{resolved: null,wasTemporaryId: false,errorMessage: `Invalid issue number: ${value}. Expected either a valid temporary ID (format: aw_ followed by 3-12 alphanumeric characters) or a numeric issue number.`};
@@ -939,7 +939,7 @@ async function updateProject(output, temporaryIdMap = new Map(), githubClient =
939
939
}else{
940
940
// Not a temporary ID - validate as numeric
941
941
if(!/^\d+$/.test(sanitizedContentNumber)){
942
-
thrownewError(`${ERR_VALIDATION}: Invalid content number "${rawContentNumber}". Provide a positive integer or a valid temporary ID (format: aw_ followed by 3-8 alphanumeric characters).`);
942
+
thrownewError(`${ERR_VALIDATION}: Invalid content number "${rawContentNumber}". Provide a positive integer or a valid temporary ID (format: aw_ followed by 3-12 alphanumeric characters).`);
0 commit comments