Repository navigation
fix(submit): make the README and community checks say what's missing - #206
Merged
jamesconwaydev merged 1 commit intoNov 6, 2026
Merged
jamesconwaydev merged 1 commit into
jamesconwaydev merged 1 commit into
Conversation
- The extras message says "Add one more" when one is already there, instead of "Add at least two". - A #hashtag line is prose now; only # to ###### followed by a space (or nothing) is an ATX heading. Setext headings (a line underlined with === or ---) are stripped too. - Forks have no community profile (404), so the CONTRIBUTING, code of conduct and template checks now list the root, .github and docs folders instead of reading a 404 as "nothing there". - README and licence content is base64-decoded with validate=True, so stray characters make the read undecided instead of decoding to a short README.
jamesconwaydev
approved these changes
Nov 6, 2026
jamesconwaydev
left a comment
Collaborator
There was a problem hiding this comment.
Really nice work, especially the fork fallback. Raising on that 404 would have parked every diverged fork. Good instinct on the setext regex too, and I'm glad the ReDoS test caught the first version. Approved; I'll merge once CI is green.
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.
What and why
Closes #49.
_extras_missingonly returns a list when every check ran, so found = 7 − missing. With one already there, the message is now "Add one more of these to the repo: …".#hashtaglines. The heading strip matched any line starting with#. It now needs#–######followed by a space or tab, or nothing (CommonMark's ATX rule), so#rustlang #cli …counts as prose.===or---is now stripped like an ATX heading. Using a lookahead, it scans each line once. My first version,[^\n]*\S[^\n]*, backtracked on long lines, and the existing ReDoS and large-README tests caught it..githubanddocs(one call each, only on the 404 path). Files namedcontributing.*,code_of_conduct.*,issue_template[.*]orpull_request_template[.*]count, case-insensitively, and a directory counts too (e.g..github/ISSUE_TEMPLATE/). A missing folder just adds nothing.file_bytesdecoded withvalidate=False, which silently drops invalid characters, so!!!!came out empty and read as a short README. It's nowvalidate=True(whitespace is still stripped first), so that raisesUndecided. This is shared with the licence-file reads, which get the same treatment.Each case has a test, and all four test changes fail on
main.Checks
python3 -m unittest discover -s scripts -t .passes (571, ~2.5s)npm --prefix site testpasses (if you touchedsite/)npx prettier --check .passesdata/entries.jsonby hand (submissions go through the form)