Skip to content

Let /ship-it's repository check pass docs.github.com links - #186

Merged
mattmenefee merged 1 commit into
mainfrom
ship-it-repo-check-subdomains
Oct 24, 2026
Merged

mattmenefee merged 1 commit into
mainfrom
ship-it-repo-check-subdomains

Conversation

@mattmenefee

@mattmenefee mattmenefee commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • /ship-it's Step 6 refuses to post a comment containing a github.com/<owner>/<repo> link that is not a public repository. Its pattern also matched inside docs.github.com URLs, so a link to GitHub's documentation read as the repository en/actions and stopped the post.
  • The check now matches the host with any subdomain, skips docs.github.com and takes the slug from after github.com/. Matches are lowercased first, so GitHub.com resolves the same way.
  • Every other subdomain is still checked, so an api.github.com/repos/... link naming a private repository is still refused

Test plan

  • Ran the new pattern and slug extraction on a sample: a docs.github.com link is dropped; github.com, www.GitHub.com and a trailing .git resolve to the right slug; an api.github.com/repos/... link is still checked
  • markdownlint-cli 0.45.0 with the repository config on .claude/skills/ship-it/SKILL.md
  • /ship-it scrubber test (test-scrub.sh)
  • lint passes on this pull request (run 40134473318 on 624dfaa)
  • A /ship-it run posts a comment that cites a docs.github.com page without being stopped

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.
@mattmenefee mattmenefee self-assigned this Oct 24, 2026
@mattmenefee mattmenefee removed the wip label Oct 24, 2026
@mattmenefee
mattmenefee marked this pull request as ready for review October 24, 2026 21:29
@mattmenefee
mattmenefee merged commit a605cc6 into main Oct 24, 2026
11 checks passed
@mattmenefee
mattmenefee deleted the ship-it-repo-check-subdomains branch October 24, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant