Skip to content

ci/hostnames: Add example hostnames PR check - #2039

Merged
marcleblanc2 merged 8 commits into
mainfrom
marc/ci/check-hostnames
Oct 2, 2026
Merged

marcleblanc2 merged 8 commits into
mainfrom
marc/ci/check-hostnames

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Helps maintain consistency and readability by adding a non-blocking PR check to flag placeholder hostnames and suggest replacements as one-click review comments

dev/example-hostnames.json maps recommended example hostnames to lists of example hostnames we've seen, as literal text, a * glob, or a /regex/

Also deletes a stray dev/TODO.md

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sourcegraph-docs Ignored Ignored Preview Oct 2, 2026 9:10pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Direct preview links to pages changed in this PR:

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ This revision uses only recommended example hostnames

marcleblanc2 and others added 2 commits October 2, 2026 12:31
Advisory check that flags placeholder hostnames on lines a PR adds that are
not the recommended *.example.com ones, and suggests the replacement as a
one-click review comment. dev/example-hostnames.json maps each recommended
hostname to the placeholders #1932 replaced with it; bare fake company
domains match as a hostname tail so the subdomain carries over.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0d69d-e558-73b8-99b1-e238a0588c49
Co-authored-by: Amp <amp@ampcode.com>
Mapping entries can be literal text, a glob where `*` matches a run of
hostname characters, or a `/regex/`. Matching ignores case, and `-`,
`_`, and `.` in literal and glob entries match any of the three, so one
entry covers the spelling variants the docs used. The JSON is 2-space
indented with keys and lists sorted, and the duplicated literals are
folded into glob and regex entries, including the patterns from #1933.

The workflow runs only when a PR touches docs/ or the check itself.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0fdce-6d4c-708e-a1ac-c5a8f9e48a65
Co-authored-by: Amp <amp@ampcode.com>
<URL>, <external url>, <your externalURL here>, $SOURCEGRAPH_ORIGIN,
[hostname], <your-git-host>, <the domain>: the spellings that
docs/ still uses in prose and config samples where a hostname is meant.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0fdce-6d4c-708e-a1ac-c5a8f9e48a65
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 requested a review from enriquegh October 2, 2026 20:21
@marcleblanc2
marcleblanc2 enabled auto-merge (squash) October 2, 2026 20:21
@marcleblanc2
marcleblanc2 merged commit 84f775b into main Oct 2, 2026
8 checks passed
@marcleblanc2
marcleblanc2 deleted the marc/ci/check-hostnames branch October 2, 2026 21:11
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.

2 participants