Repository navigation
Test: check-duplicates PR check (throwaway, do not merge) - #2077
marcleblanc2 wants to merge 3 commits into
Conversation
Each fact should have one home in the docs, with other pages linking to it; copies drift out of date the moment the original changes. This adds a non-blocking PR check that comments the passages a PR adds which say the same thing as a passage elsewhere under `docs/`, paraphrased or verbatim, plus an inline comment on each added passage pointing at its duplicates. `dev/check-duplicates.mjs` splits every page into passages (paragraphs, list items, tables, fenced code blocks), normalizes them, and compares word trigrams by Jaccard similarity. Auto-generated pages and SCHEMA_SYNC blocks are skipped. Like the links and redirects checks, CI records the findings on the merge base and reports only the ones the PR adds; main has hundreds of pre-existing findings. AGENTS.md gains the "One home per fact" rules so the duplication does not grow back. Amp-Thread-ID: https://ampcode.com/threads/T-01a11326-478d-72cf-bbb7-587d16b378e9 Co-authored-by: Amp <[email protected]>
A PR that edits one copy of a duplicated passage now gets a comment naming the other copies, so the author can pick the home and replace the rest with links, or make the same change there. Added duplication and edited duplication are reported in separate sections with their own advice. Also strip trailing spaces from the example-hostnames bullet in AGENTS.md. Amp-Thread-ID: https://ampcode.com/threads/T-01a11326-478d-72cf-bbb7-587d16b378e9 Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a11326-478d-72cf-bbb7-587d16b378e9 Co-authored-by: Amp <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Direct preview links to pages changed in this PR: |
|
| 5. After changing the values in Administration > Global settings, the frontend will either restart automatically or you might be asked to restart the frontend for the changes to take effect. | ||
| 6. For more information, see [Editing global settings for administrators](/admin/config/settings#editing-global-settings-for-site-admins) | ||
|
|
||
| After setting or changing certain values in **Site admin > Global settings** the frontend will restart automatically or |
There was a problem hiding this comment.
This passage says the same thing as:
docs/admin/config/settings.mdx:15-17(57% similar)
Each fact has one home in the docs. Keep the passage on the page that owns the topic, and replace the others with a sentence and a link to it, so they cannot drift apart. Before writing a config snippet, search docs/ for the key and link to the existing one.
| Search contexts help you search the code you care about on Sourcegraph. A search context represents a set of repositories at specific revisions on a Sourcegraph instance that will be targeted by search queries by default. | ||
|
|
||
| Every search on Sourcegraph uses a search context. Search contexts can be defined with the contexts selector shown in the search input, or entered directly in a search query. | ||
| Every search in Sourcegraph uses a search context. Search contexts can be defined with the contexts selector shown in the search input, or entered directly in a search query. |
There was a problem hiding this comment.
This passage was already duplicated, and is now out of step with:
docs/code-search/working/search-contexts.mdx:9(80% similar)
The passage you changed is also written somewhere else, so the two copies now disagree. Decide which page is the home for it, and replace the other copy with a link; or make the same change there too.
Throwaway test for #2076. Copies a paragraph from
docs/admin/config/settings.mdxintodocs/admin/how-to/enable-experimental-feature.mdx(added duplicate), and changes one word indocs/code-search/features.mdxline 60, which was already a duplicate ofdocs/code-search/working/search-contexts.mdx(edited duplicate). Will be closed once the check has commented.