fix: accept flexible author field formats in PR description - #4232
Open
SSoggyTacoMan wants to merge 11 commits into
Open
SSoggyTacoMan wants to merge 11 commits into
SSoggyTacoMan wants to merge 11 commits into
Conversation
The bot only matched bold **Author:** syntax. Submitters using @mentions, markdown links, or unbolded Author: text kept failing. Now accepts: - **Author:** name (original) - **Author:** @mention or [@foo](github url) - Author: name (unbolded / plain) - ### Author name\nAuthor: name (heading style) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@SSoggyTacoMan is attempting to deploy a commit to the Hack Club Team on Vercel. A member of the Team first needs to authorize it. |
…l chars Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'Files stay in allowed folders' was confusing when the file IS in games/ but has invalid characters. Now says 'Valid filenames and folders' and the error message explicitly lists what characters are allowed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SSoggyTacoMan
force-pushed
the
fix/pr-body-v2
branch
from
September 17, 2026 10:45
e1b4b29 to
2d8a3cb
Compare
…errors - Bad filename chars (apostrophe etc) no longer cascade into false 'no game file found' and 'metadata not checked' errors. The file is still recognized as the game file for count/metadata purposes; only the filename validity check itself fails. - Detect duplicate open PRs from the same GitHub user regardless of filename validity or game title. - Detect if submitted game is an unmodified tutorial (getting_started.js or maze_game_starter.js) by comparing stripped code bodies. - Clarify 'Exactly one game file' error so it doesn't say 'add a file' when there is one but it has an invalid name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When all submitted JS files have invalid names, the 'exactly one game file' check no longer also fails with 'only one allowed' — the filename error already covers it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SSoggyTacoMan
force-pushed
the
fix/pr-body-v2
branch
from
September 17, 2026 15:08
f596177 to
d6c9095
Compare
SSoggyTacoMan
commented
Sep 17, 2026
SSoggyTacoMan
left a comment
Contributor
Author
There was a problem hiding this comment.
Bug in duplicate PR detection. openPulls.find checks for any open PR by the user. If they have an open PR for an engine typo fix, it incorrectly blocks their game submission.
Fix: filter by the 'Submission' label.
const duplicatePR = openPulls.find((pr) =>
pr.number !== prNumber &&
pr.user?.login === submitterLogin &&
pr.labels?.some(l => l.name === 'Submission')
);
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.
Fixes several issues with the auto-triage bot that were causing false failures and confusing error messages.
Changes
Flexible author field parsing
The bot only matched
**Author:**in bold. Submitters using@mentions, markdown links, unboldedAuthor: name, or heading-style formatting kept failing even with valid info filled in.Now accepts all of:
**Author:** name,**Author:** @mention,[@foo](github url),Author: name(unbolded),### Author name\nAuthor: name.No cascading errors from bad filename
When a filename had invalid characters (e.g. an apostrophe in
Rayan's-Maze.js), the bot would report 3 separate failures: invalid filename, no game file found, and metadata not checked — even though there was one game file and it was in the right place. Now only the filename check fails; the file is still recognized for count and metadata purposes. ThematerializeSubmittedGameFilesfunction now also uses a loose regex so badly named files are actually fetched and validated.Better filename error message
Was: "Filenames cannot contain spaces."
Now: "Filenames may only contain letters, numbers, hyphens, and underscores (no spaces, apostrophes, or special characters)."
Better check name
"Files stay in allowed folders" → "Valid filenames and folders" (the old name was confusing when the file was in the right folder but had a bad name).
Duplicate open PR detection
Now detects when the same GitHub user already has another open submission PR, regardless of filename validity or game title match. Only counts PRs with the
Submissionlabel so valid submissions aren't blocked if the user has an open non-game PR (e.g. a docs fix). When a duplicate PR is closed, the bot will now automatically re-validate the remaining open PR from that user so it escapes the "Failed" state.Optimized title conflict check
The existing check fetched file diffs for every open PR in the entire repository. It now filters candidates to only PRs with the
Submissionlabel, saving massive amounts of API calls and preventing rate limits.Tutorial game detection
Detects if the submitted game is an unmodified
getting_started.jsormaze_game_starter.jsby comparing stripped code bodies, and fails with a clear message.Open preview and PR comment links in new tab
Links in the auto-triage bot comment (including "Play in Sprig Editor", "Edit Game File", "Play Similar Game (Gallery)", "View Raw", "View Screenshot", and "PR Files") now open in a new tab (
target="_blank" rel="noopener noreferrer") so reviewers and authors do not lose their place on the pull request.🤖 Generated with Claude Code