Repository navigation
Let /ship-it's repository check pass docs.github.com links - #186
Merged
Merged
Conversation
Before posting a comment, /ship-it checks every github.com/<owner>/<repo> link in it and refuses one that is not a public repository. The pattern also matched inside docs.github.com URLs, so a link to GitHub's documentation was read as the repository en/actions or en/code-security and stopped the post, though nothing private was named. The check now matches the host with any subdomain, skips docs.github.com, whose paths are documentation pages, and takes the slug from after github.com/. Every other subdomain is still checked as before, so an api.github.com/repos/... link that names a private repository is still refused. Matches are lowercased first, so a link spelled GitHub.com resolves the same way.
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.
Summary
/ship-it's Step 6 refuses to post a comment containing agithub.com/<owner>/<repo>link that is not a public repository. Its pattern also matched insidedocs.github.comURLs, so a link to GitHub's documentation read as the repositoryen/actionsand stopped the post.docs.github.comand takes the slug from aftergithub.com/. Matches are lowercased first, soGitHub.comresolves the same way.api.github.com/repos/...link naming a private repository is still refusedTest plan
docs.github.comlink is dropped;github.com,www.GitHub.comand a trailing.gitresolve to the right slug; anapi.github.com/repos/...link is still checked.claude/skills/ship-it/SKILL.md/ship-itscrubber test (test-scrub.sh)lintpasses on this pull request (run 40134473318 on 624dfaa)/ship-itrun posts a comment that cites adocs.github.compage without being stopped