Skip to content

Commit 25229aa

Browse files
SableRafclaude
andcommitted
Fix Plus Code URL in PR body using undefined instead of resolved code
plusCodeNote is a string, not an object — plusCodeNote.code was always undefined. Pass resolvedPlusCode into buildPrBody and use it in the URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fc28155 commit 25229aa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/scripts/process-new-event-issue.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function buildValidationComment(errors) {
132132
].join('\n');
133133
}
134134

135-
function buildPrBody(number, name, submitterLogin, isOnlineEvent, eventDate, startTime, address, plusCodeNote, rawPlusCode, shortDescription, fullDescription, contactName, contactEmail) {
135+
function buildPrBody(number, name, submitterLogin, isOnlineEvent, eventDate, startTime, address, plusCodeNote, rawPlusCode, resolvedPlusCode, shortDescription, fullDescription, contactName, contactEmail) {
136136
const submitterMention = submitterLogin ? `@${submitterLogin}` : 'the submitter';
137137
const locationLine = isOnlineEvent
138138
? '- [ ] Online event URL is correct and accessible'
@@ -148,7 +148,7 @@ function buildPrBody(number, name, submitterLogin, isOnlineEvent, eventDate, sta
148148
const noteBlock = plusCodeNote
149149
? [
150150
'> [!NOTE]',
151-
`> The Plus Code was auto-recovered from the user's input (\`${rawPlusCode}\`) using the city as a reference. Please verify the map pin placement is correct (https://plus.codes/${plusCodeNote.code}).`,
151+
`> The Plus Code was auto-recovered from the user's input (\`${rawPlusCode}\`) using the city as a reference. Please verify the map pin placement is correct (https://plus.codes/${resolvedPlusCode}).`,
152152
'',
153153
]
154154
: [];
@@ -332,7 +332,7 @@ async function main() {
332332
await fs.writeFile(metadataPath, `${JSON.stringify(nodeRecord, null, 2)}\n`);
333333

334334
const prBodyPath = path.join(RUNNER_TEMP, `new-event-${issueNumber}-pr-body.md`);
335-
await fs.writeFile(prBodyPath, buildPrBody(issueNumber, eventName, submitterLogin, isOnlineEvent, eventDate, startTime, address, plusCodeNote, rawPlusCode, shortDescription, fullDescription, primaryContactName, contactEmail));
335+
await fs.writeFile(prBodyPath, buildPrBody(issueNumber, eventName, submitterLogin, isOnlineEvent, eventDate, startTime, address, plusCodeNote, rawPlusCode, resolvedPlusCode, shortDescription, fullDescription, primaryContactName, contactEmail));
336336

337337
console.log(`[process-new-event-issue] validation passed — event id: ${eventId}`);
338338
await setOutput('valid', 'true');

0 commit comments

Comments
 (0)