Skip to content

Point stale docs.sourcegraph.com links at sourcegraph.com/docs - #1364

Open
bahrmichael wants to merge 1 commit into
mainfrom
docs-url-rewrite-88cfd6e5-d8f4-47ad-a67e-f9286a430b5a
Open

Point stale docs.sourcegraph.com links at sourcegraph.com/docs#1364
bahrmichael wants to merge 1 commit into
mainfrom
docs-url-rewrite-88cfd6e5-d8f4-47ad-a67e-f9286a430b5a

Conversation

@bahrmichael

Copy link
Copy Markdown
Contributor

docs.sourcegraph.com is no longer the docs host. This rewrites the remaining absolute references to their sourcegraph.com/docs equivalents.

The rewrite is purely mechanical — only the host portion changes (docs.sourcegraph.com/<path> becomes sourcegraph.com/docs/<path>). Paths that were reorganised since (for example admin/observability/tracing and batch_changes/references/troubleshooting) are already covered by permanent redirects in the docs site's redirect map, so the rewritten links resolve.

In src-cli, CHANGELOG.md is deliberately left alone: those entries are a historical record. In the docs repo the change is scoped to docs/cli/references/**, which is generated from src-cli by src doc — the companion src-cli changeset fixes the generator's source strings so the docs stay correct after the next regeneration.

Created by a Sourcegraph agentic batch change.

@bahrmichael
bahrmichael marked this pull request as ready for review September 3, 2026 12:12
@bahrmichael
bahrmichael enabled auto-merge (squash) September 3, 2026 12:13

@keegancsmith keegancsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock. I checked all nine distinct rewritten URLs in a browser: five reach the intended docs pages, while four render the docs site’s soft-404 page despite returning HTTP 200. I left non-blocking inline notes on those four links.

Comment thread DEVELOPMENT.md
This script intentionally uses your currently exported `SRC_*` environment variables, is not hooked up to CI, and is meant for manual regression checks (for example, to catch issues like `src users list` failing unexpectedly).

We adhere to the [general Sourcegraph principles for testing](https://docs.sourcegraph.com/dev/background-information/testing_principles), as well as [the Go specific directions](https://docs.sourcegraph.com/dev/background-information/languages/testing_go_code), at least to the extent they apply to a standalone tool like `src`.
We adhere to the [general Sourcegraph principles for testing](https://sourcegraph.com/docs/dev/background-information/testing_principles), as well as [the Go specific directions](https://sourcegraph.com/docs/dev/background-information/languages/testing_go_code), at least to the extent they apply to a standalone tool like `src`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: both rewritten testing links render Page not found (the docs site returns HTTP 200 for its soft-404 page). I couldn’t find replacement testing pages in the current docs repo, so these should be removed or replaced in a follow-up.

Comment thread README.md
To disable this and _only_ send the version, you can set `-user-agent-telemetry=false` for a single command, or set the `SRC_DISABLE_USER_AGENT_TELEMETRY` environment variable to any non-blank string.

As with [other Sourcegraph telemetry](https://docs.sourcegraph.com/dev/background-information/telemetry), any collected data is only sent to Sourcegraph.com in aggregate form.
As with [other Sourcegraph telemetry](https://sourcegraph.com/docs/dev/background-information/telemetry), any collected data is only sent to Sourcegraph.com in aggregate form.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this URL renders Page not found. https://sourcegraph.com/docs/admin/telemetry is live and appears to be the current telemetry documentation.

Comment thread internal/users/admin.go
} else {
// NOTE: This header is required to authenticate our session with a session cookie, see:
// https://docs.sourcegraph.com/dev/security/csrf_security_model#authentication-in-api-endpoints
// https://sourcegraph.com/docs/dev/security/csrf_security_model#authentication-in-api-endpoints

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this page (and therefore the anchor) renders Page not found. Please remove the stale reference or replace it with a current security/API doc in a follow-up.

@bahrmichael

Copy link
Copy Markdown
Contributor Author

Thanks @keegancsmith ! I'll go through those tomorrow :)

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