Skip to content

Commit b2c958d

Browse files
authored
Merge pull request #23407 from cockroachdb/stanley/consolidated-migration
Project Stanley: consolidated cockroachdb/docs → cockroachlabs/docs migration
2 parents ef3169e + 9569742 commit b2c958d

145 files changed

Lines changed: 270 additions & 280 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/cross_version_link_linter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def format_violations_for_github(self) -> str:
247247
"",
248248
"**Action Required**: Please update all cross-version links to use version variables or ensure links stay within the same version.",
249249
"",
250-
"For more information about proper link formatting, see the [CockroachDB Docs Style Guide](https://github.com/cockroachdb/docs/blob/main/StyleGuide.md#links)."
250+
"For more information about proper link formatting, see the [CockroachDB Docs Style Guide](https://github.com/cockroachlabs/docs/blob/main/StyleGuide.md#links)."
251251
])
252252

253253
return "\n".join(lines)

.github/scripts/docs-prs-reviews.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ type prReviewParse struct {
8282
UpdatedAt time.Time
8383
}
8484

85-
const (
86-
docsOrganization = "cockroachdb"
85+
var (
86+
docsOrganization = maybeEnv("DOCS_ORG", "cockroachlabs")
8787
docsRepo = "docs"
8888
docsPrsTeam = "docs-prs"
8989
)

.github/scripts/validate_branch_existence.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
validate_branch_existence.py (EDUENG-614)
44
55
For every row in src/current/_data/versions.csv, verifies that the listed
6-
crdb_branch_name exists as a branch in cockroachdb/generated-diagrams.
6+
crdb_branch_name exists as a branch in the generated-diagrams repo.
77
88
Also flags entries where versions.csv still points to an older branch even
99
though the "natural" release-X.Y branch for that version now exists
@@ -37,7 +37,7 @@
3737
import urllib.request
3838
from pathlib import Path
3939

40-
GENERATED_DIAGRAMS_REPO = "cockroachdb/generated-diagrams"
40+
GENERATED_DIAGRAMS_REPO = os.environ.get("GENERATED_DIAGRAMS_REPO", "cockroachdb/generated-diagrams")
4141
GITHUB_API_BASE = "https://api.github.com"
4242
VERSIONS_CSV = Path("src/current/_data/versions.csv")
4343
DOCS_ROOT = Path("src/current")
@@ -139,7 +139,7 @@ def run_checks(rows: list[dict], _exists_fn=None, _has_docs_fn=None) -> list[dic
139139
"branch": branch,
140140
"message": (
141141
f"{version}: crdb_branch_name={branch!r} does not exist "
142-
f"in cockroachdb/generated-diagrams."
142+
f"in {GENERATED_DIAGRAMS_REPO}."
143143
),
144144
})
145145
continue
@@ -157,7 +157,7 @@ def run_checks(rows: list[dict], _exists_fn=None, _has_docs_fn=None) -> list[dic
157157
"expected": expected,
158158
"message": (
159159
f"{version}: crdb_branch_name={branch!r} but {expected!r} "
160-
f"now exists in cockroachdb/generated-diagrams. "
160+
f"now exists in {GENERATED_DIAGRAMS_REPO}. "
161161
f"Update versions.csv to use {expected!r}."
162162
),
163163
})
@@ -174,7 +174,7 @@ def format_comment(failures: list[dict]) -> str:
174174
return (
175175
"## Branch Existence Check: Passed\n\n"
176176
"All `crdb_branch_name` entries in `versions.csv` exist in "
177-
"`cockroachdb/generated-diagrams`."
177+
f"`{GENERATED_DIAGRAMS_REPO}`."
178178
)
179179

180180
lines = [
@@ -258,7 +258,7 @@ def main() -> None:
258258
_run_self_tests()
259259

260260
rows = load_versions_csv()
261-
print(f"Checking {len(rows)} versions.csv entries against cockroachdb/generated-diagrams...\n")
261+
print(f"Checking {len(rows)} versions.csv entries against {GENERATED_DIAGRAMS_REPO}...\n")
262262
failures = run_checks(rows)
263263

264264
comment = format_comment(failures)

.github/workflows/changed_files.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
id: format
1717
env:
1818
GH_TOKEN: ${{ github.token }}
19+
NETLIFY_SITE_NAME: ${{ vars.NETLIFY_SITE_NAME || 'cockroachlabs-docs' }}
1920
run: |
2021
declare -a output
2122
pr_num=${{ github.event.pull_request.number }}
@@ -29,7 +30,7 @@ jobs:
2930
3031
function generateMainFiles() {
3132
html_file=`echo "${1%.md}.html" | sed -E 's/src\/[^\/]*\///g'`
32-
file="<li><a href=\"https://deploy-preview-$pr_num--cockroachdb-docs.netlify.app/docs/$html_file\" target=\"_blank\" rel=\"noopener\">$1</a></li>"
33+
file="<li><a href=\"https://deploy-preview-$pr_num--${NETLIFY_SITE_NAME}.netlify.app/docs/$html_file\" target=\"_blank\" rel=\"noopener\">$1</a></li>"
3334
output+="$file"
3435
}
3536
@@ -86,7 +87,7 @@ jobs:
8687
read -ra path <<< "$file"
8788
IFS=$OLDIFS
8889
major_version=${path[-2]}
89-
file="<li>${file}:<ul><li><a href=\"https://deploy-preview-$pr_num--cockroachdb-docs.netlify.app/docs/releases/${major_version}.html\" target=\"_blank\" rel=\"noopener\">releases/${major_version}.md</a></li></ul></li>"
90+
file="<li>${file}:<ul><li><a href=\"https://deploy-preview-$pr_num--${NETLIFY_SITE_NAME}.netlify.app/docs/releases/${major_version}.html\" target=\"_blank\" rel=\"noopener\">releases/${major_version}.md</a></li></ul></li>"
9091
output+="$file"
9192
elif [[ $file == src/*/_includes/v* || $file == src/*/_includes/cockroachcloud* || $file == src/*/images/* ]] && [[ $file != src/**/*.json ]] && [[ $file != *.gitignore* ]]
9293
then

MarkdownGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ The contents of `shared-file.md` will now appear on all of the pages where you a
592592

593593
#### Different content depending on page name
594594

595-
There may be cases where the content of the include file will need to vary slightly depending on what pages that content is being shared into. For example, while working on [cockroachdb/docs#12216](https://github.com/cockroachdb/docs/pull/12216), I needed a way to:
595+
There may be cases where the content of the include file will need to vary slightly depending on what pages that content is being shared into. For example, while working on [cockroachlabs/docs#12216](https://github.com/cockroachlabs/docs/pull/12216), I needed a way to:
596596

597597
- Have text be a link on the [Known Limitations](https://www.cockroachlabs.com/docs/stable/known-limitations) page.
598598
- Have that same text _not_ be a link on the [Cost-Based Optimizer](https://www.cockroachlabs.com/docs/stable/cost-based-optimizer) page (since it would be a self-referring link).
@@ -615,7 +615,7 @@ Locality-optimized search
615615

616616
#### Remote includes
617617

618-
Sometimes, you need to include files that are maintained in other places than the `cockroachdb/docs` repo but referenced in our docs. The `remote_include` tag is used for this. We most often use this tag for code samples, which are maintained in various repos.
618+
Sometimes, you need to include files that are maintained in other places than the `cockroachlabs/docs` repo but referenced in our docs. The `remote_include` tag is used for this. We most often use this tag for code samples, which are maintained in various repos.
619619

620620
For code samples, you usually want to show only part of a larger file to highlight a specific technique, or due to length considerations.
621621

@@ -639,7 +639,7 @@ For more information about the `remote_include` tag, see the README in the [jeky
639639

640640
### Filter tabs
641641

642-
Use filter tabs to create navigation between related pages. The [`filter-tabs.md`](https://github.com/cockroachdb/docs/blob/main/src/current/_includes/filter-tabs.md) include generates tabs that link to different pages.
642+
Use filter tabs to create navigation between related pages. The [`filter-tabs.md`](https://github.com/cockroachlabs/docs/blob/main/src/current/_includes/filter-tabs.md) include generates tabs that link to different pages.
643643

644644
**Note:** Filter tabs link to different URLs/pages, not tabs within a single page.
645645

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository contains the source files for the CockroachDB documentation avai
44

55
## Suggest Improvements
66

7-
Want a topic added to the docs? Need additional details or clarification? See an error or other problem? Please [open an issue](https://github.com/cockroachdb/docs/issues).
7+
Want a topic added to the docs? Need additional details or clarification? See an error or other problem? Please [open an issue](https://github.com/cockroachlabs/docs/issues).
88

99
## Resources
1010

StyleGuide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Avoid terms that imply violence or harm.
283283
- Replace "performance _hit_" with **reduced performance**.
284284
- Replace "want to _hit_ up" with **want to visit**.
285285

286-
Terminology around "kill" vs. "stop" vs. "terminate" is nuanced, as described [in this GitHub comment](https://github.com/cockroachdb/docs/issues/7767#issuecomment-662028864). Use your best judgement.
286+
Terminology around "kill" vs. "stop" vs. "terminate" is nuanced, as described [in this GitHub comment](https://github.com/cockroachlabs/docs/issues/7767#issuecomment-662028864). Use your best judgement.
287287

288288
### Write accessible documentation
289289

@@ -372,7 +372,7 @@ A _concept_ topic explains how a particular feature works, or how a specific sys
372372

373373
- Provide as much relevant information as you can, and then link to other pages as necessary. If there is a related [reference](#reference) topic, link to it from within the conceptual topic.
374374

375-
For templates that provide a starting point for writing concept topics, refer to the [concept templates](https://github.com/cockroachdb/docs/tree/main/templates/concept).
375+
For templates that provide a starting point for writing concept topics, refer to the [concept templates](https://github.com/cockroachlabs/docs/tree/main/templates/concept).
376376

377377
#### Examples
378378

@@ -403,7 +403,7 @@ A _task_ topic provides step-by-step instructions to complete a specific goal. T
403403

404404
Tasks should **not** include concept or reference information; instead, a task should link to [Concept](#concept) and [Reference](#reference) topics as needed.
405405

406-
For templates that provide a starting point for writing task topics, refer to the [task templates](https://github.com/cockroachdb/docs/tree/main/templates/task).
406+
For templates that provide a starting point for writing task topics, refer to the [task templates](https://github.com/cockroachlabs/docs/tree/main/templates/task).
407407

408408
#### Examples
409409

@@ -422,7 +422,7 @@ Reference topics help users understand the precise meaning and effect of Cockroa
422422
- The content should be comprehensive and accurate. This principle might apply to other page types, but it is especially important for reference, as it is the ultimate source of truth for a particular feature or interface.
423423
- The content should be succinct. Details are often presented in table format. Prose is better suited for [Concept](#concept) topics.
424424

425-
For templates that provide a starting point for writing reference topics, refer to the [reference templates](https://github.com/cockroachdb/docs/tree/main/templates/reference).
425+
For templates that provide a starting point for writing reference topics, refer to the [reference templates](https://github.com/cockroachlabs/docs/tree/main/templates/reference).
426426

427427
#### Examples
428428

@@ -436,7 +436,7 @@ _Guides_ offer the reader a perspective on how to decide between a number of dif
436436

437437
To accomplish this goal, guides often link to several different [Concept](#concept) topics and compare and contrast them. They can also link to multiple [Task](#task) topics.
438438

439-
For templates that provide a starting point for writing guide topics, refer to the [guide templates](https://github.com/cockroachdb/docs/tree/main/templates/guide).
439+
For templates that provide a starting point for writing guide topics, refer to the [guide templates](https://github.com/cockroachlabs/docs/tree/main/templates/guide).
440440

441441
#### Examples
442442

@@ -564,7 +564,7 @@ For include file syntax, refer to the [Markdown Guide](MarkdownGuide.md#include-
564564

565565
Reference issues and pull requests by their corresponding number, prepended with `#`.
566566

567-
**Example:** `[#1](https://github.com/cockroachdb/docs/pull/1)`
567+
**Example:** `[#1](https://github.com/cockroachlabs/docs/pull/1)`
568568

569569
#### External links
570570

src/api/_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"author": {
2525
"@type": "Organization",
2626
"name": "Cockroach Labs Documentation Team",
27-
"url": "https://github.com/cockroachdb/docs"
27+
"url": "https://github.com/cockroachlabs/docs"
2828
}
2929
}
3030
</script>

src/current/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ FROM ruby:3.4-slim
1111
# Version labels
1212
LABEL org.opencontainers.image.title="CockroachDB Docs Builder"
1313
LABEL org.opencontainers.image.description="Hermetic build environment for CockroachDB documentation"
14-
LABEL org.opencontainers.image.source="https://github.com/cockroachdb/docs"
14+
LABEL org.opencontainers.image.source="https://github.com/cockroachlabs/docs"
1515
LABEL ruby.version="3.4.0"
1616
LABEL bundler.version="2.7.2"
1717
LABEL jekyll.version="4.3.4"

src/current/_data/redirects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# in the list of versions that matches a major version in
3232
# versions.csv, Jekyll will automatically add a redirect
3333
# for the dev and stable aliases for that page. versions.csv:
34-
# https://github.com/cockroachdb/docs/blob/main/src/current/_data/versions.csv
34+
# https://github.com/cockroachlabs/docs/blob/main/src/current/_data/versions.csv
3535
#
3636
# Each redirect added in redirects.yml generates a redirect
3737
# for the page without the .md extension and a redirect for

0 commit comments

Comments
 (0)