From 10128fcdca647e214d19e9aaf88f4b489cbb1216 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 21 Jan 2025 10:25:38 -0800 Subject: [PATCH 01/10] Remove code-fence-line-length linter rule (#53969) --- data/reusables/contributing/content-linter-rules.md | 1 - src/content-linter/style/github-docs.js | 6 ------ 2 files changed, 7 deletions(-) diff --git a/data/reusables/contributing/content-linter-rules.md b/data/reusables/contributing/content-linter-rules.md index f471bf450f22..31f886da8b18 100644 --- a/data/reusables/contributing/content-linter-rules.md +++ b/data/reusables/contributing/content-linter-rules.md @@ -32,7 +32,6 @@ | [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: octicon- | The octicon liquid syntax used is deprecated. Use this format instead `octicon "" aria-label=""` | error | | | [GH001](https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md) | no-default-alt-text | Images should have meaningful alternative text (alt text) | error | accessibility, images | | [GH002](https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md) | no-generic-link-text | Avoid using generic link text like `Learn more` or `Click here` | error | accessibility, links | -| GHD030 | code-fence-line-length | Code fence lines should not exceed a maximum length | warning | code, accessibility | | GHD032 | image-alt-text-end-punctuation | Alternate text for images should end with punctuation | error | accessibility, images | | GHD004 | image-file-kebab-case | Image file names must use kebab-case | error | images | | GHD033 | incorrect-alt-text-length | Images alternate text should be between 40-150 characters | warning | accessibility, images | diff --git a/src/content-linter/style/github-docs.js b/src/content-linter/style/github-docs.js index 6c92e6154f40..328c064e41f1 100644 --- a/src/content-linter/style/github-docs.js +++ b/src/content-linter/style/github-docs.js @@ -100,12 +100,6 @@ const githubDocsConfig = { 'partial-markdown-files': true, 'yml-files': true, }, - 'code-fence-line-length': { - // GHD030 - severity: 'warning', - 'partial-markdown-files': true, - 'yml-files': true, - }, 'image-alt-text-exclude-words': { // GHD031 severity: 'error', From 88f15e4feaa6015ddaba4ade5ef653043fff738f Mon Sep 17 00:00:00 2001 From: Pallavi <96553709+pallsama@users.noreply.github.com> Date: Tue, 21 Jan 2025 11:07:52 -0800 Subject: [PATCH 02/10] Updating 3.15.2 release notes to fix 400GB change. (#54035) --- data/release-notes/enterprise-server/3-15/2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/release-notes/enterprise-server/3-15/2.yml b/data/release-notes/enterprise-server/3-15/2.yml index 1ffbf5af8e5a..7b7575584e85 100644 --- a/data/release-notes/enterprise-server/3-15/2.yml +++ b/data/release-notes/enterprise-server/3-15/2.yml @@ -32,7 +32,7 @@ sections: In some cases, `ghe-spokesctl status`(without `--live`) displayed entries that no longer existed. changes: - | - New installations of GitHub Enterprise Server version 3.15 and upgrades to 3.15 recommend a root disk size of at least 400GB. Previously the system would not boot with a smaller disk size, see [Enterprise Server 3.15.0](/enterprise-server@3.15/admin/release-notes#3.15.0-features). Customers on standalone or standalone HA topologies should plan to upgrade their root disk size to 400GB. + The 400GB root disk requirement introduced in [Enterprise Server 3.15.0](/enterprise-server@3.15/admin/release-notes#3.15.0-features) has been reverted. The 400GB root disk size is no longer a requirement for GHES new installations and upgrades. Customers on standalone or standalone HA topologies are still recommended to upgrade their root disk size to 400GB. - | To avoid service disruption, the bundled action `actions/setup-dotnet` uses new .NET CDN URLs. See https://github.com/dotnet/core/issues/9671. - | From 201f7f7a6b22c5e89ad8195557ae662dc0a627a7 Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Tue, 21 Jan 2025 11:13:03 -0800 Subject: [PATCH 03/10] Update other reviewers to avoid copilot reviewer (#54033) --- .../workflows/codeowners-content-systems.yml | 34 --------------- .../workflows/reviewers-content-systems.yml | 41 +++++++++++++++++++ .github/workflows/reviewers-dependabot.yml | 30 +++++++++----- ...ing.yml => reviewers-docs-engineering.yml} | 28 ++++++------- ...deowners-legal.yml => reviewers-legal.yml} | 7 ++-- 5 files changed, 77 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/codeowners-content-systems.yml create mode 100644 .github/workflows/reviewers-content-systems.yml rename .github/workflows/{codeowners-docs-engineering.yml => reviewers-docs-engineering.yml} (72%) rename .github/workflows/{codeowners-legal.yml => reviewers-legal.yml} (92%) diff --git a/.github/workflows/codeowners-content-systems.yml b/.github/workflows/codeowners-content-systems.yml deleted file mode 100644 index 46d28af765fb..000000000000 --- a/.github/workflows/codeowners-content-systems.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Codeowners - Content Strategy - -# **What it does**: Automatically add reviewers based on paths, but only for the docs-internal repo. -# **Why we have it**: So we can have reviewers automatically without getting open source notifications. -# **Who does it impact**: Docs team. - -on: - pull_request: - paths: - - 'contributing/content-*.md' - - 'content/contributing/**.md' - - .github/workflows/codeowners-content-systems.yml - -jobs: - codeowners-content-systems: - if: ${{ github.repository == 'github/docs-internal' }} - runs-on: ubuntu-latest - steps: - - name: Check out repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Add Content Systems as a reviewer - env: - GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} - PR: ${{ github.event.pull_request.html_url }} - run: | - has_reviewer=$( - gh pr view $PR --json reviews | - jq 'any(.reviews[]; select(length > 0))' - ) - if ! $has_reviewer - then - gh pr edit $PR --add-reviewer github/docs-content-systems - fi diff --git a/.github/workflows/reviewers-content-systems.yml b/.github/workflows/reviewers-content-systems.yml new file mode 100644 index 000000000000..0e26de5b58f6 --- /dev/null +++ b/.github/workflows/reviewers-content-systems.yml @@ -0,0 +1,41 @@ +name: Reviewers - Content Systems + +# **What it does**: Automatically add reviewers based on paths, but only for the docs-internal repo. +# **Why we have it**: So we can have reviewers automatically without getting open source notifications. +# **Who does it impact**: Docs team. + +on: + pull_request: + paths: + - 'contributing/content-*.md' + - 'content/contributing/**.md' + - .github/workflows/reviewers-content-systems.yml + +permissions: + contents: read + pull-requests: write + repository-projects: read + +jobs: + reviewers-content-systems: + if: >- + ${{ github.repository == 'github/docs-internal' && + !github.event.pull_request.draft && + !contains(github.event.pull_request.labels.*.name, 'reviewers-content-systems') && + github.event.pull_request.head.ref != 'repo-sync' }} + runs-on: ubuntu-latest + env: + PR: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} + + steps: + - name: Check out repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Add content systems as a reviewer + run: | + labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name') + if ! echo "$labels" | grep -q 'reviewers-content-systems'; then + gh pr edit $PR --add-reviewer github/docs-content-systems + gh pr edit $PR --add-label reviewers-content-systems + fi diff --git a/.github/workflows/reviewers-dependabot.yml b/.github/workflows/reviewers-dependabot.yml index ce1d69a7b3bd..9b62d4549ae0 100644 --- a/.github/workflows/reviewers-dependabot.yml +++ b/.github/workflows/reviewers-dependabot.yml @@ -1,4 +1,4 @@ -name: Add Dependabot Core Maintainers as Reviewers +name: Reviewers - Dependabot # **What it does**: Automatically add reviewers based on paths, for docs-internal and docs repos. # **Why we have it**: So dependabot maintainers can be notified about relevant pull requests. @@ -10,25 +10,33 @@ on: - 'data/reusable/dependabot/**' - 'content/code-security/dependabot/**' - 'content/rest/dependabot/**' + - '.github/workflows/reviewers-dependabot.yml' + +permissions: + contents: read + pull-requests: write + repository-projects: read jobs: add-reviewer: - if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' + if: >- + ${{ github.repository == 'github/docs-internal' && + !github.event.pull_request.draft && + !contains(github.event.pull_request.labels.*.name, 'reviewers-dependabot') && + github.event.pull_request.head.ref != 'repo-sync' }} runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} + PR: ${{ github.event.pull_request.html_url }} + steps: - name: Check out repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Add Dependabot Core Maintainers as reviewers - env: - GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} - PR: ${{ github.event.pull_request.html_url }} run: | - has_reviewer=$( - gh pr view $PR --json reviews | - jq 'any(.reviews[]; select(length > 0))' - ) - if ! $has_reviewer - then + labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name') + if ! echo "$labels" | grep -q 'reviewers-dependabot'; then gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers + gh pr edit $PR --add-label reviewers-dependabot fi diff --git a/.github/workflows/codeowners-docs-engineering.yml b/.github/workflows/reviewers-docs-engineering.yml similarity index 72% rename from .github/workflows/codeowners-docs-engineering.yml rename to .github/workflows/reviewers-docs-engineering.yml index 0eba56112a24..c95809f07b3f 100644 --- a/.github/workflows/codeowners-docs-engineering.yml +++ b/.github/workflows/reviewers-docs-engineering.yml @@ -1,4 +1,4 @@ -name: Codeowners - Docs Engineering +name: Reviewers - Docs Engineering # **What it does**: Automatically add reviewers based on paths, but only for the docs-internal repo. # And sets the 'engineering' label on the PR. It also edits the PR body to add a template @@ -25,35 +25,33 @@ on: - '.github/**' - '**Dockerfile' - 'package*.json' - - .github/workflows/codeowners-docs-engineering.yml + - .github/workflows/reviewers-docs-engineering.yml + +permissions: + contents: read + pull-requests: write + repository-projects: read jobs: codeowners-docs-engineering: if: >- ${{ github.repository == 'github/docs-internal' && !github.event.pull_request.draft && - !contains(github.event.pull_request.labels.*.name, 'engineering') && + !contains(github.event.pull_request.labels.*.name, 'reviewers-docs-engineering') && github.event.pull_request.head.ref != 'repo-sync' }} runs-on: ubuntu-latest env: - GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} PR: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} steps: - name: Check out repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Label as engineering - run: gh pr edit $PR --add-label engineering - - - name: Add Docs Engineering as a reviewer + - name: Add docs engineering as a reviewer run: | - needs_review=$( - gh pr view $PR --json reviews | - jq '.reviews | - length == 0 or all(.author.login == "${{github.event.pull_request.user.login}}")' - ) - if $needs_review - then + labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name') + if ! echo "$labels" | grep -q 'reviewers-docs-engineering'; then gh pr edit $PR --add-reviewer github/docs-engineering + gh pr edit $PR --add-label reviewers-docs-engineering fi diff --git a/.github/workflows/codeowners-legal.yml b/.github/workflows/reviewers-legal.yml similarity index 92% rename from .github/workflows/codeowners-legal.yml rename to .github/workflows/reviewers-legal.yml index e783f5ad4321..23cfa1e90b44 100644 --- a/.github/workflows/codeowners-legal.yml +++ b/.github/workflows/reviewers-legal.yml @@ -1,4 +1,4 @@ -name: Codeowners - Legal +name: Reviewers - Legal # **What it does**: Enforces reviews of Responsible AI (RAI) content by the GitHub legal team. Because RAI content can live anywhere in the content directory, it becomes a maintenance problem to use CODEOWNERS to enforce review on each article. # **Why we have it**: RAI content must be reviewed by the GitHub legal team. @@ -15,7 +15,7 @@ on: - synchronize paths: - 'content/**' - - .github/workflows/codeowners-legal.yml + - .github/workflows/reviewers-legal.yml permissions: contents: read @@ -27,6 +27,7 @@ jobs: if: >- ${{ github.repository == 'github/docs-internal' && !github.event.pull_request.draft && + !contains(github.event.pull_request.labels.*.name, 'reviewers-legal') && github.event.pull_request.head.ref != 'repo-sync' }} runs-on: ubuntu-latest steps: @@ -62,7 +63,7 @@ jobs: - name: Check for reviewers-legal label, add if missing and request review if: steps.checkContentType.outputs.containsContentType == 'true' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} PR: ${{ github.event.pull_request.html_url }} run: | labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name') From c13bd36c5e4b48d962a69d98bf9129c2c9ae2d11 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 21 Jan 2025 11:32:07 -0800 Subject: [PATCH 04/10] Remove unused env vars from Azure (#54036) --- src/frame/middleware/index.ts | 6 +----- src/observability/lib/statsd.js | 13 ++----------- src/observability/middleware/handle-errors.ts | 2 +- src/observability/middleware/trigger-error.ts | 2 +- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/frame/middleware/index.ts b/src/frame/middleware/index.ts index 9d4c9a99d42a..39cec4ea3069 100644 --- a/src/frame/middleware/index.ts +++ b/src/frame/middleware/index.ts @@ -113,11 +113,7 @@ export default function (app: Express) { } // *** Observability *** - // This DD_API_KEY is only being used to determine if the target - // deployment environment is production. The key is not actually - // used for sending data. Afer migrating to Moda, we can remove - // the DD_API_KEY. - if (process.env.DD_API_KEY || process.env.MODA_PROD_SERVICE_ENV) { + if (process.env.MODA_PROD_SERVICE_ENV) { app.use(datadog) } diff --git a/src/observability/lib/statsd.js b/src/observability/lib/statsd.js index 64f0557c4f59..096201220b5c 100644 --- a/src/observability/lib/statsd.js +++ b/src/observability/lib/statsd.js @@ -1,9 +1,7 @@ import StatsD from 'hot-shots' const { - HEROKU_APP_NAME, NODE_ENV, - DD_API_KEY, MODA_APP_NAME, MODA_PROD_SERVICE_ENV, KUBE_NODE_HOSTNAME, @@ -11,19 +9,12 @@ const { DD_AGENT_HOST, } = process.env -// This DD_API_KEY is only being used to determine if the target -// deployment environment is production. The key is not actually -// used for sending data. Afer migrating to Moda, we can remove -// the DD_API_KEY. -const isServiceEnvProduction = DD_API_KEY || MODA_PROD_SERVICE_ENV -const mock = NODE_ENV === 'test' || !isServiceEnvProduction +const mock = NODE_ENV === 'test' || !MODA_PROD_SERVICE_ENV // MODA_APP_NAME gets set when the deploy target is Moda const modaApp = MODA_APP_NAME ? `moda_app_name:${MODA_APP_NAME}` : false -// HEROKU_APP_NAME gets set when the deploy target is Azure -const herokuApp = HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false -export const tags = ['app:docs', modaApp, herokuApp].filter(Boolean) +export const tags = ['app:docs', modaApp].filter(Boolean) /** * @type {import('hot-shots').StatsD} diff --git a/src/observability/middleware/handle-errors.ts b/src/observability/middleware/handle-errors.ts index 09598b664c2e..9351dcb446e0 100644 --- a/src/observability/middleware/handle-errors.ts +++ b/src/observability/middleware/handle-errors.ts @@ -110,7 +110,7 @@ export default async function handleError( } // display error on the page in development and staging, but not in production - if (process.env.HEROKU_PRODUCTION_APP !== 'true') { + if (!process.env.MODA_PROD_SERVICE_ENV) { req.context.error = error } diff --git a/src/observability/middleware/trigger-error.ts b/src/observability/middleware/trigger-error.ts index 9bfd319ce5f6..1521cb3d3226 100644 --- a/src/observability/middleware/trigger-error.ts +++ b/src/observability/middleware/trigger-error.ts @@ -15,7 +15,7 @@ export default async function triggerError( // pattern used on async middleware! This is an intentional omission! // prevent this from being used in production - if (process.env.NODE_ENV === 'production' && process.env.HEROKU_PRODUCTION_APP) return next() + if (process.env.NODE_ENV === 'production' && process.env.MODA_PROD_SERVICE_ENV) return next() throw new Error('Intentional error') } From ec4860b29f27bb7578b616b9d52ed83d7dc973c7 Mon Sep 17 00:00:00 2001 From: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com> Date: Tue, 21 Jan 2025 11:47:47 -0800 Subject: [PATCH 05/10] Typo fix for 'noFineGrainedAccess' (#54024) Co-authored-by: Kevin Heis --- src/rest/components/RestAuth.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/components/RestAuth.tsx b/src/rest/components/RestAuth.tsx index 0eeeb63ddb08..157d03f60922 100644 --- a/src/rest/components/RestAuth.tsx +++ b/src/rest/components/RestAuth.tsx @@ -32,7 +32,7 @@ export function RestAuth({ progAccess, slug, operationTitle }: Props) { // For those operations, we shouldn't display this component if (!progAccess) return null const { userToServerRest, serverToServer, fineGrainedPat, basicAuth = false } = progAccess - const noFineGrainedAcccess = !(userToServerRest || serverToServer || fineGrainedPat) + const noFineGrainedAccess = !(userToServerRest || serverToServer || fineGrainedPat) const heading = basicAuth ? t('basic_auth_heading') : t('fine_grained_access') const headingId = heading.replace('{{ RESTOperationTitle }}', operationTitle) @@ -45,7 +45,7 @@ export function RestAuth({ progAccess, slug, operationTitle }: Props) {

{headingId}

- {noFineGrainedAcccess ? ( + {noFineGrainedAccess ? ( ) : ( From 589865de64f17cb2a7a5ee0cf5de44cda5b748d6 Mon Sep 17 00:00:00 2001 From: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com> Date: Tue, 21 Jan 2025 11:49:02 -0800 Subject: [PATCH 06/10] Typo fix in no-response.yaml (#53727) Co-authored-by: Kevin Heis --- .github/workflows/no-response.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-response.yaml b/.github/workflows/no-response.yaml index 6c565f69ae7d..e1d58b63f0f8 100644 --- a/.github/workflows/no-response.yaml +++ b/.github/workflows/no-response.yaml @@ -46,7 +46,7 @@ jobs: This PR has been automatically closed because there has been no response to to our request for more information from the original author. Please reach out if you have the information we requested, or open a [new issue](https://github.com/github/docs/issues/new/choose) - to describing your changes. Then we can begin the review process. + to describe your changes. Then we can begin the review process. - name: Check out repo if: ${{ failure() }} From 8fd30e4041eb838376f9d16f8926c122ac0bc2ee Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Tue, 21 Jan 2025 12:30:22 -0800 Subject: [PATCH 07/10] Add cookie value 'dotcom_user' to events (#54032) --- src/events/lib/schema.ts | 4 ++++ src/events/middleware.ts | 6 +++++- src/events/types.ts | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/events/lib/schema.ts b/src/events/lib/schema.ts index 22abfea1dfc4..cb48648644ef 100644 --- a/src/events/lib/schema.ts +++ b/src/events/lib/schema.ts @@ -106,6 +106,10 @@ const context = { type: 'boolean', description: 'Anonymous -- whether the user has github.com cookies set.', }, + dotcom_user: { + type: 'string', + description: 'The cookie value of dotcom_user', + }, // Device information os: { diff --git a/src/events/middleware.ts b/src/events/middleware.ts index 38c154bcda09..74577cca2970 100644 --- a/src/events/middleware.ts +++ b/src/events/middleware.ts @@ -52,7 +52,7 @@ router.post( // Validate the data matches the corresponding data schema const validate = validators[type] - if (!validate(req.body)) { + if (!validate(body)) { // This protects so we don't bother sending the same validation // error, per user, more than once (per time interval). // This helps if we're bombarded with junk bot traffic. So it @@ -84,6 +84,10 @@ router.post( body.survey_comment_language = await getGuessedLanguage(body.survey_comment) } + // Add dotcom_user to the context if it's available + // JSON.stringify removes `undefined` values but not `null`, and we don't want to send `null` to Hydro + body.context.dotcom_user = req.cookies?.dotcom_user ? req.cookies.dotcom_user : undefined + await publish({ schema: hydroNames[type], value: omit(body, OMIT_FIELDS), diff --git a/src/events/types.ts b/src/events/types.ts index 2329c2dd4881..35c7022b4165 100644 --- a/src/events/types.ts +++ b/src/events/types.ts @@ -34,6 +34,7 @@ export type EventProps = { path_type: string status: number is_logged_in: boolean + dotcom_user: string os: string os_version: string browser: string From 3219cb30710f985c9804b468570465d79e874180 Mon Sep 17 00:00:00 2001 From: Felicity Chapman Date: Tue, 21 Jan 2025 20:40:48 +0000 Subject: [PATCH 08/10] Hack week Jan 2025 follow up: Remove outdated project v2 warnings (#54028) Co-authored-by: Kevin Heis --- content/issues/index.md | 2 +- .../creating-a-project-board.md | 12 ++++++------ .../managing-access-to-your-projects.md | 4 ---- ...ing-and-tracking-work-for-your-team-or-project.md | 11 ++++------- .../configuring-issues/quickstart.md | 4 ++-- ...orator-to-a-project-board-in-your-organization.md | 4 ++-- ...ss-to-a-project-board-for-organization-members.md | 4 ++-- ...iduals-access-to-an-organization-project-board.md | 12 ++++++------ ...g-team-access-to-an-organization-project-board.md | 8 ++------ ...ollaborator-from-an-organization-project-board.md | 4 ++-- ...roject-visibility-changes-in-your-organization.md | 4 +--- .../disabling-project-boards-in-your-organization.md | 6 +++--- .../disabling-projects-in-a-repository.md | 8 ++++---- .../organizations/organization-wide-project.md | 4 +--- data/reusables/projects/project_boards_old.md | 4 ---- data/reusables/projects/sunset_notice_content.md | 2 +- data/variables/projects.yml | 4 ++-- 17 files changed, 39 insertions(+), 58 deletions(-) diff --git a/content/issues/index.md b/content/issues/index.md index 6e90ef02d6cd..00e246ab985d 100644 --- a/content/issues/index.md +++ b/content/issues/index.md @@ -37,7 +37,7 @@ children: - /organizing-your-work-with-project-boards - /using-labels-and-milestones-to-track-work - /guides -product_video: '{% ifversion projects-v2 %}https://www.youtube-nocookie.com/embed/yFQ-p6wMS_Y{% endif %}' +product_video: 'https://www.youtube-nocookie.com/embed/yFQ-p6wMS_Y' product_video_transcript: /video-transcripts/transcript-using-projects-for-feature-planning redirect_from: - /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests diff --git a/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md b/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md index 2f9d1d9891b8..dff417f967fa 100644 --- a/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md +++ b/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md @@ -37,9 +37,9 @@ You can also configure workflow automations to keep your {% data variables.proje {% data reusables.profile.access_profile %} 1. On the top of your profile page, in the main navigation, click **{% octicon "project" aria-hidden="true" %} Projects**. - ![Screenshot showing profile tabs. The 'Projects' tab is highlighted with an orange outline.](/assets/images/help/projects-v2/tab-projects.png){% ifversion projects-v2 %} + ![Screenshot showing profile tabs. The 'Projects' tab is highlighted with an orange outline.](/assets/images/help/projects-v2/tab-projects.png) -1. Click **Projects (classic)**{% endif %} +1. Click **Projects (classic)**. {% data reusables.project-management.click-new-project %} {% data reusables.project-management.create-project-name-description %} {% data reusables.project-management.choose-template %} @@ -64,8 +64,8 @@ You can also configure workflow automations to keep your {% data variables.proje {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.click-new-project %} {% data reusables.project-management.create-project-name-description %} {% data reusables.project-management.choose-template %} @@ -88,8 +88,8 @@ You can also configure workflow automations to keep your {% data variables.proje {% data reusables.projects.classic-project-creation %} {% data reusables.repositories.navigate-to-repo %} -1. Under your repository name, click **{% octicon "project" aria-hidden="true" %} Projects**.{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +1. Under your repository name, click **{% octicon "project" aria-hidden="true" %} Projects**. +1. Click **Projects (classic)**. {% data reusables.project-management.click-new-project %} {% data reusables.project-management.create-project-name-description %} {% data reusables.project-management.choose-template %} diff --git a/content/issues/planning-and-tracking-with-projects/managing-your-project/managing-access-to-your-projects.md b/content/issues/planning-and-tracking-with-projects/managing-your-project/managing-access-to-your-projects.md index 7f6280b99411..05cd088b067d 100644 --- a/content/issues/planning-and-tracking-with-projects/managing-your-project/managing-access-to-your-projects.md +++ b/content/issues/planning-and-tracking-with-projects/managing-your-project/managing-access-to-your-projects.md @@ -46,12 +46,8 @@ You can also configure the default base permission at the organization-level for You can also add teams, external collaborators, and individual organization members as collaborators for an organization-level project. For more information, see [AUTOTITLE](/organizations/organizing-members-into-teams/about-teams). -{% ifversion projects-v2-add-to-team %} - If you grant a team read permissions or greater for a project, the project is also displayed on the team's projects page. You can also add projects to a team on the team's projects page. For more information, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/managing-your-project/adding-your-project-to-a-team). -{% endif %} - You can only invite an individual user to collaborate on your organization-level project if they are already a member of the organization or an outside collaborator on at least one repository in the organization. {% data reusables.projects.project-settings %} diff --git a/content/issues/tracking-your-work-with-issues/configuring-issues/planning-and-tracking-work-for-your-team-or-project.md b/content/issues/tracking-your-work-with-issues/configuring-issues/planning-and-tracking-work-for-your-team-or-project.md index 748b63ca525d..75797d201dcd 100644 --- a/content/issues/tracking-your-work-with-issues/configuring-issues/planning-and-tracking-work-for-your-team-or-project.md +++ b/content/issues/tracking-your-work-with-issues/configuring-issues/planning-and-tracking-work-for-your-team-or-project.md @@ -155,9 +155,7 @@ Below is an example of a `front-end` label that we created and added to the issu ![Screenshot of an issue called "Front-end work for Project Octocat." In the right sidebar, in the "Labels" section, the "front-end" label is applied.](/assets/images/help/issues/quickstart-add-label-to-issue.png) -## Adding issues to a {% data variables.projects.projects_v1_board %} - -{% ifversion projects-v2 %} +## Adding issues to a {% data variables.projects.projects_v2 %} You can use {% data variables.projects.projects_v2 %} on {% data variables.product.prodname_dotcom %} to plan and track the work for your team. A project is a customizable spreadsheet that integrates with your issues and pull requests on {% data variables.product.prodname_dotcom %}, automatically staying up-to-date with the information on {% data variables.product.prodname_dotcom %}. You can customize the layout by filtering, sorting, and grouping your issues and PRs. To get started with projects, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/quickstart-for-projects). @@ -171,10 +169,9 @@ We can also view the same project as a board. ![Screenshot of the board view of a project, with issues organized into columns for "No Status," "Todo," "In Progress," and "Done."](/assets/images/help/issues/quickstart-projects-board-view.png) -{% endif %} {% ifversion projects-v1 %} -You can {% ifversion projects-v2 %} also use the existing{% else %} use{% endif %} {% data variables.product.prodname_projects_v1 %} on {% data variables.product.prodname_dotcom %} to plan and track your or your team's work. {% data variables.projects.projects_v1_boards_caps %} are made up of issues, pull requests, and notes that are categorized as cards in columns of your choosing. You can create {% data variables.projects.projects_v1_boards %} for feature work, high-level roadmaps, or even release checklists. For more information, see [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards). +You can also use the existing {% data variables.product.prodname_projects_v1 %} on {% data variables.product.prodname_dotcom %} to plan and track your or your team's work. {% data variables.projects.projects_v1_boards_caps %} are made up of issues, pull requests, and notes that are categorized as cards in columns of your choosing. You can create {% data variables.projects.projects_v1_boards %} for feature work, high-level roadmaps, or even release checklists. For more information, see [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards). ### {% data variables.projects.projects_v1_board_caps %} example @@ -193,6 +190,6 @@ You have now learned about the tools {% data variables.product.prodname_dotcom % * [AUTOTITLE](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates) for learning more about issue templates * [AUTOTITLE](/issues/using-labels-and-milestones-to-track-work/managing-labels) for learning how to create, edit and delete labels * [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists) for learning more about task lists -{% ifversion projects-v2 %} - [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) for learning more about projects -* [AUTOTITLE](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/changing-the-layout-of-a-view) for learning how to customize views for projects{% endif %} +* [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) for learning more about projects +* [AUTOTITLE](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/changing-the-layout-of-a-view) for learning how to customize views for projects {% ifversion projects-v1 %}- [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) for learning how to manage {% data variables.projects.projects_v1_boards %}{% endif %} diff --git a/content/issues/tracking-your-work-with-issues/configuring-issues/quickstart.md b/content/issues/tracking-your-work-with-issues/configuring-issues/quickstart.md index 41013d85ab7f..731b95c785e5 100644 --- a/content/issues/tracking-your-work-with-issues/configuring-issues/quickstart.md +++ b/content/issues/tracking-your-work-with-issues/configuring-issues/quickstart.md @@ -69,7 +69,7 @@ To communicate responsibility, you can assign the issue to a member of your orga ## Adding the issue to a project -You can add the issue to an existing project{% ifversion projects-v2 %} and populate metadata for the project. {% endif %} For more information about projects, see {% ifversion projects-v2 %}[AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects).{% else %}[AUTOTITLE](/issues/organizing-your-work-with-project-boards).{% endif %} +You can add the issue to an existing project and populate metadata for the project. For more information about projects, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects). ![Screenshot of the new issue form. In the right sidebar, the "Projects" section is outlined in dark orange.](/assets/images/help/issues/issue-project.png) @@ -101,5 +101,5 @@ To break your issue down into more manageable tasks, you can add multiple levels Here are some helpful resources for taking your next steps with {% data variables.product.prodname_github_issues %}: * To learn more about issues, see [AUTOTITLE](/issues/tracking-your-work-with-issues/about-issues). -* To learn more about how projects can help you with planning and tracking, see {% ifversion projects-v2 %}[AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects).{% else %}[AUTOTITLE](/issues/organizing-your-work-with-project-boards).{% endif %} +* To learn more about how projects can help you with planning and tracking, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects). * To learn more about using issue templates{% ifversion fpt or ghec %} and issue forms{% endif %} to encourage contributors to provide specific information, see [AUTOTITLE](/communities/using-templates-to-encourage-useful-issues-and-pull-requests). diff --git a/content/organizations/managing-access-to-your-organizations-project-boards/adding-an-outside-collaborator-to-a-project-board-in-your-organization.md b/content/organizations/managing-access-to-your-organizations-project-boards/adding-an-outside-collaborator-to-a-project-board-in-your-organization.md index 70349b285d27..eebefb7b3614 100644 --- a/content/organizations/managing-access-to-your-organizations-project-boards/adding-an-outside-collaborator-to-a-project-board-in-your-organization.md +++ b/content/organizations/managing-access-to-your-organizations-project-boards/adding-an-outside-collaborator-to-a-project-board-in-your-organization.md @@ -19,8 +19,8 @@ An outside collaborator is a person who isn't explicitly a member of your organi {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} diff --git a/content/organizations/managing-access-to-your-organizations-project-boards/managing-access-to-a-project-board-for-organization-members.md b/content/organizations/managing-access-to-your-organizations-project-boards/managing-access-to-a-project-board-for-organization-members.md index 0cf824477ec5..620c3ab03538 100644 --- a/content/organizations/managing-access-to-your-organizations-project-boards/managing-access-to-a-project-board-for-organization-members.md +++ b/content/organizations/managing-access-to-your-organizations-project-boards/managing-access-to-a-project-board-for-organization-members.md @@ -24,8 +24,8 @@ By default, organization members have write access to their organization's {% da {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} diff --git a/content/organizations/managing-access-to-your-organizations-project-boards/managing-an-individuals-access-to-an-organization-project-board.md b/content/organizations/managing-access-to-your-organizations-project-boards/managing-an-individuals-access-to-an-organization-project-board.md index 365c31604042..b5541c005f7b 100644 --- a/content/organizations/managing-access-to-your-organizations-project-boards/managing-an-individuals-access-to-an-organization-project-board.md +++ b/content/organizations/managing-access-to-your-organizations-project-boards/managing-an-individuals-access-to-an-organization-project-board.md @@ -23,8 +23,8 @@ allowTitleToDifferFromFilename: true {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} @@ -37,8 +37,8 @@ allowTitleToDifferFromFilename: true {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} @@ -51,8 +51,8 @@ When you remove a collaborator from a {% data variables.projects.projects_v1_boa {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} diff --git a/content/organizations/managing-access-to-your-organizations-project-boards/managing-team-access-to-an-organization-project-board.md b/content/organizations/managing-access-to-your-organizations-project-boards/managing-team-access-to-an-organization-project-board.md index e34bf6b441cb..c280c25c0878 100644 --- a/content/organizations/managing-access-to-your-organizations-project-boards/managing-team-access-to-an-organization-project-board.md +++ b/content/organizations/managing-access-to-your-organizations-project-boards/managing-team-access-to-an-organization-project-board.md @@ -28,8 +28,8 @@ You can give an entire team the same permission level to a {% data variables.pro {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} @@ -49,10 +49,6 @@ If a team's access to a {% data variables.projects.projects_v1_board %} is inher ![Screenshot of the main page for a team. In the horizontal navigation bar, the "Projects" tab is outlined in dark orange.](/assets/images/help/organizations/team-project-board-button.png) 1. To change permissions levels, to the right of the {% data variables.projects.projects_v1_board %} you want to update, use the permission level dropdown menu. -{% ifversion projects-v2-add-to-team %} - ## Further reading * [Adding your project to a team](/issues/planning-and-tracking-with-projects/managing-your-project/adding-your-project-to-a-team) - -{% endif %} diff --git a/content/organizations/managing-access-to-your-organizations-project-boards/removing-an-outside-collaborator-from-an-organization-project-board.md b/content/organizations/managing-access-to-your-organizations-project-boards/removing-an-outside-collaborator-from-an-organization-project-board.md index 328802be4c8e..b168bae8db55 100644 --- a/content/organizations/managing-access-to-your-organizations-project-boards/removing-an-outside-collaborator-from-an-organization-project-board.md +++ b/content/organizations/managing-access-to-your-organizations-project-boards/removing-an-outside-collaborator-from-an-organization-project-board.md @@ -17,8 +17,8 @@ allowTitleToDifferFromFilename: true {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} -{% data reusables.organizations.organization-wide-project %}{% ifversion projects-v2 %} -1. Click **Projects (classic)**{% endif %} +{% data reusables.organizations.organization-wide-project %} +1. Click **Projects (classic)**. {% data reusables.project-management.select-project %} {% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} diff --git a/content/organizations/managing-organization-settings/allowing-project-visibility-changes-in-your-organization.md b/content/organizations/managing-organization-settings/allowing-project-visibility-changes-in-your-organization.md index 8d800f8cde68..951b7a11c583 100644 --- a/content/organizations/managing-organization-settings/allowing-project-visibility-changes-in-your-organization.md +++ b/content/organizations/managing-organization-settings/allowing-project-visibility-changes-in-your-organization.md @@ -33,8 +33,6 @@ This option may not be available to you if an enterprise owner restricts visibil ## Further reading -{% ifversion projects-v2 %} -* [AUTOTITLE](/issues/planning-and-tracking-with-projects/managing-your-project/managing-visibility-of-your-projects) -{%- endif %}{%- ifversion projects-v1 %} +* [AUTOTITLE](/issues/planning-and-tracking-with-projects/managing-your-project/managing-visibility-of-your-projects){%- ifversion projects-v1 %} * [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/changing-project-board-visibility) {% endif %} diff --git a/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md b/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md index 7cf7f696d5f3..b4367b93bc1c 100644 --- a/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md +++ b/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md @@ -1,6 +1,6 @@ --- -title: 'Disabling {% ifversion projects-v2 %}projects{% else %}{% data variables.projects.projects_v1_boards %}{% endif %} in your organization' -intro: 'Organization owners can turn off {% ifversion projects-v2 %}organization-wide {% data variables.projects.projects_v2 %}, organization-wide {% data variables.projects.projects_v1_boards %}, and repository-level {% data variables.projects.projects_v1_boards %}{% else %}organization-wide {% data variables.projects.projects_v1_boards %} and repository {% data variables.projects.projects_v1_boards %}{% endif %} in an organization.' +title: 'Disabling projects in your organization' +intro: 'Organization owners can turn off organization-wide {% data variables.projects.projects_v2 %}, organization-wide {% data variables.projects.projects_v1_boards %}, and repository-level {% data variables.projects.projects_v1_boards %} in an organization.' redirect_from: - /github/managing-your-work-on-github/managing-project-boards/disabling-project-boards-in-your-organization - /articles/disabling-project-boards-in-your-organization @@ -54,7 +54,7 @@ You can control whether organization members can create {% data variables.projec ## Further reading -{% ifversion projects-v2 %}- [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects){% endif %} +* [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) {% ifversion projects-v1 %}* [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) * [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/closing-a-project-board) * [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/deleting-a-project-board){% endif %} diff --git a/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-projects-in-a-repository.md b/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-projects-in-a-repository.md index 01c3d81ef916..d58ad9b583cb 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-projects-in-a-repository.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-projects-in-a-repository.md @@ -17,8 +17,6 @@ shortTitle: 'Disable projects' allowTitleToDifferFromFilename: true --- -{% ifversion projects-v2 %} - ## Disabling {% data variables.projects.projects_v2 %} in a repository When you disable {% data variables.projects.projects_v2 %} in a repository, linked projects will no longer be available in the repository's **{% octicon "table" aria-hidden="true" %} Projects** tab. Linked projects will remain accessible at an organization or user level. @@ -27,9 +25,9 @@ When you disable {% data variables.projects.projects_v2 %} in a repository, link {% data reusables.repositories.sidebar-settings %} 1. Under "Features," deselect the **Projects** checkbox. -{% ifversion projects-v1 %}## Disabling {% data variables.projects.projects_v1_boards %} in a repository{% endif %} +{% ifversion projects-v1 %} -{% endif %} +## Disabling {% data variables.projects.projects_v1_boards %} in a repository When you disable {% data variables.projects.projects_v1_boards %} in a repository, existing {% data variables.projects.projects_v1_boards %} are inaccessible at their previous URLs. If you decide to re-enable {% data variables.projects.projects_v1_boards %}, any {% data variables.projects.projects_v1_boards %} that were previously added will be available. @@ -40,3 +38,5 @@ After you disable {% data variables.projects.projects_v1_boards %}, you will no {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} 1. Under "Features," deselect the **{% data variables.product.prodname_projects_v1_caps %}** checkbox. + +{% endif %} diff --git a/data/reusables/organizations/organization-wide-project.md b/data/reusables/organizations/organization-wide-project.md index 0c55e1703d73..fcf0e74b12ca 100644 --- a/data/reusables/organizations/organization-wide-project.md +++ b/data/reusables/organizations/organization-wide-project.md @@ -1,5 +1,3 @@ -1. Under your organization name, click {% ifversion projects-v2 %}**{% octicon "table" aria-hidden="true" %}{% else %}{% octicon "project" aria-hidden="true" %}{% endif %} Projects**. +1. Under your organization name, click **{% octicon "table" aria-hidden="true" %} Projects**. - {% ifversion projects-v2 %} ![Screenshot of the horizontal navigation bar for an organization. A tab, labeled with a table icon and "Projects," is outlined in dark orange.](/assets/images/help/organizations/organization-projects-tab-table.png) - {% endif %} diff --git a/data/reusables/projects/project_boards_old.md b/data/reusables/projects/project_boards_old.md index aa63e63a41dd..12c0c2b04057 100644 --- a/data/reusables/projects/project_boards_old.md +++ b/data/reusables/projects/project_boards_old.md @@ -1,13 +1,9 @@ {% ifversion projects-v1-can-create %} -{% ifversion projects-v2 %} - >[!NOTE] >* {% data variables.product.prodname_projects_v2 %}, the all-new projects experience, is now available. For more information about {% data variables.product.prodname_projects_v2 %}, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects). >* You can only create a new {% data variables.projects.projects_v1_board %} for an organization{% ifversion projects-v1-create-repo-project %}, repository, {% endif %} or user that already has at least one {% data variables.projects.projects_v1_board %}. {% ifversion projects-v1-create-repo-project %}{% else %} You cannot create new {% data variables.projects.projects_v1_boards %} for repositories. {% endif %} If you're unable to create a {% data variables.projects.projects_v1_board %}, create a project instead. -{% endif %} - {% else %} >[!NOTE] diff --git a/data/reusables/projects/sunset_notice_content.md b/data/reusables/projects/sunset_notice_content.md index 4d68d84066a7..3c0863e80855 100644 --- a/data/reusables/projects/sunset_notice_content.md +++ b/data/reusables/projects/sunset_notice_content.md @@ -1,3 +1,3 @@ ->{% data variables.product.prodname_projects_v1_caps %} has been removed. You can read more about this change on [{% data variables.product.prodname_blog %}](https://gh.io/projects-classic-sunset-notice). +>{% data variables.product.prodname_projects_v1_caps %} has been retired. You can read more about this change on [{% data variables.product.prodname_blog %}](https://gh.io/projects-classic-sunset-notice). > >The new and improved Projects experience is available. For more information, see [AUTOTITLE](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects). diff --git a/data/variables/projects.yml b/data/variables/projects.yml index 7b533b851aba..6be69723893c 100644 --- a/data/variables/projects.yml +++ b/data/variables/projects.yml @@ -15,8 +15,8 @@ projects_v1_boards_caps: >- command-palette-shortcut: 'Command+K (Mac) or Ctrl+K (Windows/Linux)' # Use feature flags to return which projects versions are available. -projects_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.projects_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_boards %}{% endif %}{% else %}{% data variables.projects.projects_v1_boards %}{% endif %}' -project_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.project_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_board %}{% endif %}{% else %}{% data variables.projects.projects_v1_board %}{% endif %}' +projects_v2_and_v1: '{% data variables.projects.projects_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_boards %}{% endif %}' +project_v2_and_v1: '{% data variables.projects.project_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_board %}{% endif %}' projects_v2_and_v1_if_create: '{% data variables.projects.projects_v2 %}{% ifversion projects-v1-can-create %} and {% data variables.projects.projects_v1_boards %}{% endif %}' # Limits From 4ad473e46e21896f837aca532b83172c7d7047e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:42:24 +0000 Subject: [PATCH 09/10] Bump vite from 5.4.6 to 5.4.14 in the npm_and_yarn group (#54038) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0662b993919..cfda878e98f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14932,10 +14932,11 @@ } }, "node_modules/vite": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.6.tgz", - "integrity": "sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==", + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", From 62fbf68d160de3f6fb13878e35a574dab9fed8f5 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Tue, 21 Jan 2025 13:00:08 -0800 Subject: [PATCH 10/10] Remove deprecated staging pattern & update README.md for new pattern (#54007) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kevin Heis --- src/deployments/staging/.env.example | 27 ---- .../workflows/deploy-on-repo-dispatch.yml | 76 ---------- .../staging/.github/workflows/moda-ci.yaml | 95 ------------ src/deployments/staging/Dockerfile | 137 ------------------ src/deployments/staging/README.md | 127 ++-------------- src/deployments/staging/README.staging.md | 38 ----- .../build-scripts/clone-or-use-cached-repo.sh | 63 -------- .../determine-early-access-branch.sh | 30 ---- .../staging/build-scripts/fetch-repos.sh | 49 ------- .../staging/build-scripts/read-dot-env.sh | 6 - .../build-scripts/server-entrypoint.sh | 16 -- src/deployments/staging/config.json | 13 -- .../staging/deployments/webapp.yaml | 54 ------- .../kubernetes/staging/services/webapp.yaml | 18 --- .../staging/config/moda/build_options.yaml | 10 -- .../staging/config/moda/deployment.yaml | 33 ----- src/deployments/staging/ownership.yaml | 25 ---- 17 files changed, 12 insertions(+), 805 deletions(-) delete mode 100644 src/deployments/staging/.env.example delete mode 100644 src/deployments/staging/.github/workflows/deploy-on-repo-dispatch.yml delete mode 100644 src/deployments/staging/.github/workflows/moda-ci.yaml delete mode 100644 src/deployments/staging/Dockerfile delete mode 100644 src/deployments/staging/README.staging.md delete mode 100644 src/deployments/staging/build-scripts/clone-or-use-cached-repo.sh delete mode 100755 src/deployments/staging/build-scripts/determine-early-access-branch.sh delete mode 100644 src/deployments/staging/build-scripts/fetch-repos.sh delete mode 100755 src/deployments/staging/build-scripts/read-dot-env.sh delete mode 100755 src/deployments/staging/build-scripts/server-entrypoint.sh delete mode 100644 src/deployments/staging/config.json delete mode 100644 src/deployments/staging/config/kubernetes/staging/deployments/webapp.yaml delete mode 100644 src/deployments/staging/config/kubernetes/staging/services/webapp.yaml delete mode 100644 src/deployments/staging/config/moda/build_options.yaml delete mode 100644 src/deployments/staging/config/moda/deployment.yaml delete mode 100644 src/deployments/staging/ownership.yaml diff --git a/src/deployments/staging/.env.example b/src/deployments/staging/.env.example deleted file mode 100644 index fedee045f613..000000000000 --- a/src/deployments/staging/.env.example +++ /dev/null @@ -1,27 +0,0 @@ -# The .env file in every docs-staging-X repo can be adjusted freely and is not synchronized - -# - - - -# Unique per staging server -# - - - -# The name of the staging branch (should be the same as the repo name except for the review server) -STAGING_BRANCH=docs-staging-{{x}} -# Required for identifing image in datadog metrics -MODA_APP_NAME=docs-staging-{{x}} -# The most recent SHA of the STAGING_BRANCH -SHA={{sha}} - -# - - - -# Unique per review server -# - - - -# Empty for regular staging servers, 'internal' or 'external' for review server -REVIEW_SERVER= - -# - - - -# Shared defaults -# - - - -NODE_ENV=production -PORT=4000 -ENABLED_LANGUAGES='en,zh,es,pt,ru,ja,fr,de,ko' -RATE_LIMIT_MAX='21' -# Moda uses a non-default port for sending datadog metrics -DD_DOGSTATSD_PORT='28125' diff --git a/src/deployments/staging/.github/workflows/deploy-on-repo-dispatch.yml b/src/deployments/staging/.github/workflows/deploy-on-repo-dispatch.yml deleted file mode 100644 index 72e8dbfb8ac6..000000000000 --- a/src/deployments/staging/.github/workflows/deploy-on-repo-dispatch.yml +++ /dev/null @@ -1,76 +0,0 @@ -# This file is the source of truth for all `docs-staging-X` repos. The copy of this workflow should be synchronized with each staging repo. -# It triggers on the update-sha repository dispatch event, which is dispatched whenever a `docs-staging-X` branch is pushed to in `docs-intenal`. -# This workflow updates the SHA in the staging repo's `.env` using the SHA sent in the dispatch event to the latest commit in the `docs-staging-X` branch -# The merge should trigger an automatic Moda deploy using the contents pulled from the SHA pointing to a branch in `docs-internal`. - -name: Deploy on repo dispatch - -on: - repository_dispatch: - # This event is dispatched whenever a `docs-staging-X` branch is pushed to - types: [update-sha] - -permissions: - contents: write - pull-requests: write - -jobs: - update-sha: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 2 - - # Extract SHA from the dispatch payload and set it as an output - - name: Set SHA from Payload - id: set_sha - run: echo "SHA=${{ github.event.client_payload.SHA }}" >> $GITHUB_OUTPUT - - # Update the .env file with the new SHA - - name: Update .env File - run: | - SHA=${{ steps.set_sha.outputs.SHA }} - if grep -q "^SHA=" .env; then - sed -i "s/^SHA=.*/SHA=${SHA}/" .env - else - echo "SHA=${SHA}" >> .env - fi - - - name: Commit Changes to new branch - id: commit_changes - run: | - BRANCH_NAME=update-sha-${{ github.run_id }} - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git checkout -b $BRANCH_NAME - git add .env - git commit -m "Update SHA to ${{ steps.set_sha.outputs.SHA }}" - echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT - - - name: Push Branch - run: git push origin ${{ steps.commit_changes.outputs.BRANCH_NAME }} - - # Create a Pull Request and set the PR URL as an output - - name: Create Pull Request - id: create_pr - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_URL=$(gh pr create \ - --title "Update SHA to ${{ steps.set_sha.outputs.SHA }}" \ - --body "This PR updates the SHA in the \`.env\` file to \`${{ steps.set_sha.outputs.SHA }}\`." \ - --base main \ - --head ${{ steps.commit_changes.outputs.BRANCH_NAME }} \ - ) - echo "PR_URL=${PR_URL}" >> $GITHUB_OUTPUT - - # Merge the Pull Request - - name: Merge Pull Request - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_NUMBER=$(gh pr view ${{ steps.create_pr.outputs.PR_URL }} --json number --jq .number) - gh pr merge $PR_NUMBER --auto --squash diff --git a/src/deployments/staging/.github/workflows/moda-ci.yaml b/src/deployments/staging/.github/workflows/moda-ci.yaml deleted file mode 100644 index c7c0dc462d9c..000000000000 --- a/src/deployments/staging/.github/workflows/moda-ci.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: docs-staging-{{x}} Moda CI - -# More info on CI actions setup can be found here: -# https://github.com/github/ops/blob/master/docs/playbooks/build-systems/moving-moda-apps-from-bp-to-actions.md - -on: - workflow_dispatch: - push: - branches-ignore: - - 'gh-readonly-queue/**' - merge_group: - types: [checks_requested] - -jobs: - ########################## - # Add DOCS_BOT_PAT_READPUBLICKEY to vault-keys - ########################## - set-vault-keys: - runs-on: ubuntu-latest - outputs: - modified_vault_keys: ${{ steps.modify_vault_keys.outputs.modified }} - steps: - - name: Set vault-keys output - id: modify_vault_keys - run: | - if [ -z "${{ vars.VAULT_KEYS }}" ]; then - echo "modified=DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT - else - echo "modified=${{ vars.VAULT_KEYS }},DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT - fi - - ############# - # Moda jobs - ############# - moda-config-bundle: - name: ${{ matrix.ci_job.job }} - needs: set-vault-keys - strategy: - fail-fast: false - matrix: - ci_job: [{ 'job': 'docs-staging-{{x}}-moda-config-bundle' }] - uses: github/internal-actions/.github/workflows/moda.yml@main - with: - ci-formatted-job-name: ${{ matrix.ci_job.job }} - vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} - secrets: - dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} - datadog-api-key: ${{ secrets.DATADOG_API_KEY }} - - ############# - # Docker Image jobs - ############# - docker-image: - name: ${{ matrix.ci_job.job }} - needs: set-vault-keys - strategy: - fail-fast: false - matrix: - ci_job: [{ 'job': 'docs-staging-{{x}}-docker-image' }] - uses: github/internal-actions/.github/workflows/kube.yml@main - with: - ci-formatted-job-name: ${{ matrix.ci_job.job }} - # Fetches the 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to pass to the docker build environment as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=$(cat DOCS_BOT_PAT_READPUBLICKEY) - vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} - docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY' - secrets: - dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} - datadog-api-key: ${{ secrets.DATADOG_API_KEY }} - - ############# - # Docker Security jobs - ############# - docker-security: - name: ${{ matrix.ci_job.job }} - needs: set-vault-keys - strategy: - fail-fast: false - matrix: - ci_job: [{ 'job': 'docs-staging-{{x}}-docker-security' }] - uses: github/internal-actions/.github/workflows/docker_security.yml@main - with: - ci-formatted-job-name: ${{ matrix.ci_job.job }} - # Fetches the 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to pass to the docker build environment as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=$(cat DOCS_BOT_PAT_READPUBLICKEY) - vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }} - docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY' - secrets: - dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }} - datadog-api-key: ${{ secrets.DATADOG_API_KEY }} - -permissions: - actions: read - checks: read - contents: read - statuses: read - id-token: write diff --git a/src/deployments/staging/Dockerfile b/src/deployments/staging/Dockerfile deleted file mode 100644 index dba2321b7ea5..000000000000 --- a/src/deployments/staging/Dockerfile +++ /dev/null @@ -1,137 +0,0 @@ -# -------------------------------------------------------------------------------- -# BASE IMAGE -# -------------------------------------------------------------------------------- -# To update the sha: -# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble -FROM ghcr.io/github/gh-base-image/gh-base-noble:20250108-185521-gcd4825276 AS base - -# Install git for cloning docs-early-access & translations repos -# Install curl for determining the early access branch -RUN apt-get -qq update && apt-get -qq install --no-install-recommends git curl - -# Install Node.js latest LTS -# https://github.com/nodejs/release#release-schedule -# Ubuntu's apt-get install nodejs is _very_ outdated -RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - -RUN apt-get install -y nodejs -RUN node --version - -# This directory is owned by the node user -RUN useradd -ms /bin/bash node -ARG APP_HOME=/home/node/app -RUN mkdir -p $APP_HOME && chown -R node:node $APP_HOME -WORKDIR $APP_HOME - -# Switch to root to ensure we have permissions to copy, chmod, and install -USER root - -# Copy in scripts and .env -COPY .env . -COPY build-scripts/*.sh ./build-scripts/ - -# Make scripts executable -RUN chmod +x build-scripts/*.sh - -# Use the mounted --secret to: -# - 1. Fetch the docs-internal repo -# - 2. Fetch the docs-early-access repo & override docs-internal with early access content -# - 3. Fetch each translations repo to the repo/translations directory -# We use --mount-type=secret to avoid the secret being copied into the image layers for security -# The secret passed via --secret can only be used in this RUN command -RUN --mount=type=secret,id=DOCS_BOT_PAT_READPUBLICKEY \ - # We don't cache because Docker can't know if we need to fetch new content from remote repos - echo "Don't cache this step by printing date: $(date)" && \ - . ./build-scripts/fetch-repos.sh - -# Give node user access to the cloned repo & scripts -RUN chown -R node:node $APP_HOME/repo -RUN chown -R node:node $APP_HOME/build-scripts -RUN chown -R node:node $APP_HOME/.env - -# Change back to node to make sure we don't run anything as the root user -USER node - -# --------------- -# ALL DEPS Image -# --------------- -FROM node:22-alpine@sha256:c13b26e7e602ef2f1074aef304ce6e9b7dd284c419b35d89fcf3cc8e44a8def9 AS all_deps - -ARG APP_HOME=/home/node/app -WORKDIR $APP_HOME - -# Copy what is needed to run npm ci -COPY --from=base $APP_HOME/repo/package.json $APP_HOME/repo/package-lock.json ./ - -RUN npm ci --no-optional --registry https://registry.npmjs.org/ - -# Sharp requires optional deps: https://github.com/lovell/sharp/issues/4001 -RUN npm install --cpu=x64 --os=linux --include=optional sharp - -# --------------- -# BUILDER Image -# --------------- -FROM all_deps AS builder - -ARG APP_HOME=/home/node/app -WORKDIR $APP_HOME - -# Copy what is needed to: -# 1. Build the app -# 2. run warmup-remotejson script -# 3. run precompute-pageinfo script -# Dependencies -COPY --from=all_deps $APP_HOME/package.json ./ -COPY --from=all_deps $APP_HOME/node_modules ./node_modules -# Content with merged early-access content -COPY --from=base $APP_HOME/repo/content ./content -COPY --from=base $APP_HOME/repo/data ./data -COPY --from=base $APP_HOME/repo/assets ./assets -# Source code -COPY --from=base $APP_HOME/repo/src ./src -COPY --from=base $APP_HOME/repo/next.config.js ./ -COPY --from=base $APP_HOME/repo/tsconfig.json ./ - -# 1. Build -RUN npm run build - -# 2. Warm up the remotejson cache -RUN npm run warmup-remotejson - -# 3. Precompute the pageinfo cache -RUN npm run precompute-pageinfo -- --max-versions 2 - -# Prune deps for prod image -RUN npm prune --production - -# -------------------------------------------------------------------------------- -# STAGING IMAGE -# -------------------------------------------------------------------------------- -FROM base AS staging - -ARG APP_HOME=/home/node/app -WORKDIR $APP_HOME - -# Copy translations and build scripts from base image -COPY --from=base $APP_HOME/repo/translations ./translations -COPY --from=base $APP_HOME/build-scripts ./build-scripts -COPY --from=base $APP_HOME/.env ./ -# Copy prod dependencies from deps image -COPY --from=all_deps $APP_HOME/node_modules ./node_modules -# Copy built artifacts from builder image -COPY --from=builder $APP_HOME/.next ./.next -COPY --from=builder $APP_HOME/.remotejson-cache ./.remotejson-cache -COPY --from=builder $APP_HOME/.pageinfo-cache.json.br* ./.pageinfo-cache.json.br - -# Copy source code needed to run the server -COPY --from=builder $APP_HOME/package.json ./ -## Content -COPY --from=builder $APP_HOME/content ./content -COPY --from=builder $APP_HOME/data ./data -COPY --from=builder $APP_HOME/assets ./assets -## Code -COPY --from=builder $APP_HOME/src ./src -## Config -COPY --from=builder $APP_HOME/next.config.js ./ -COPY --from=builder $APP_HOME/tsconfig.json ./ - -CMD ["./build-scripts/server-entrypoint.sh"] diff --git a/src/deployments/staging/README.md b/src/deployments/staging/README.md index 7c2f967ff4c9..e2006e4620ed 100644 --- a/src/deployments/staging/README.md +++ b/src/deployments/staging/README.md @@ -1,124 +1,21 @@ # Staging Servers -This directory contains the build tools, workflows, and files used to build and deploy our staging (and dedicated review) servers. - -For internal documentation, please see the Moda directory in the internal Docs Engineering repo. - -1. [Why staging servers?](#why-staging-servers) -1. [What are staging servers?](#what-are-staging-servers) -1. [How do staging deploys work from docs-internal?](#how-do-staging-deploys-work-from-docs-internal) -1. [How do review server deploys work from docs-internal?](#how-do-review-server-deploys-work-from-docs-internal) -1. [Keeping build configurations in sync](#keeping-build-configurations-in-sync) - -## Why staging servers? - -Previously, Docs had automatic preview deploys for each branch. When a PR was opened, a dedicated server was spun up from the contents of that branch. - -In the future, we may be able to accomplish automatic branch deploys again if Moda's features are expanded. - -Until then, we have staging servers that we manually push changes from a branch to spin up. - -We have 8 dedicated staging servers that developers can use to test their code changes. For purely content changes we use the [review server](../review-server/README.md) which automatically previews content changes on a remote branch. - -The dedicated review servers are deployed in a similar fashion that the staging servers are. The difference is that review servers have different environment variables set in `.env` and two additional secrets, like a PAT for reading from remote repos and an access token. - -## What are staging servers? - -Each staging server requires its own `github/` repo in order to deploy to Moda in the form of `github/docs-staging-X` where X is the number of that staging server e.g. `github/docs-staging-0` or `github/docs-staging-1`. - -The URLs of the staging servers also follow this pattern, `https://docs-staging-{{x}}.service.iad.github.net`, e.g. `https://docs-staging-2.service.iad.github.net` - -With the exception of the first 2 which are our review servers: - -- `docs-staging-0` -> https://docs-review.github.com -- `docs-staging-1` -> https://os-docs-review.github.com - -Ideally there should always be enough staging servers for each developer on the team to have a dedicated server to deploy to while they are on the team. - -So we have 8 dedicated staging servers, `docs-staging-{2-9}`: - -- `docs-staging-2` -> https://docs-staging-2.service.iad.github.net -- `docs-staging-3` -> https://docs-staging-3.service.iad.github.net -- etc -- `docs-staging-9` -> https://docs-staging-9.service.iad.github.net - > [!NOTE] -> [Developer VPN](https://thehub.github.com/security/security-operations/developer-vpn-access/) access is required to view a staging server. Initial set up takes some work, but connecting to it after it's configured is rather simple. - -## How do staging deploys work from docs-internal? - -```mermaid -sequenceDiagram - autonumber - participant DI as docs-internal - participant WF1 as docs-internal/dispatch-sha-on-staging-push.yml - participant WF2 as docs-staging-X/deploy-on-repo-dispatch.yml - participant MD as Moda - - DI->DI: Developer pushes code to `docs-staging-X` branch
OR Developer adds `docs-staging-X` label to a PR - DI->WF1: Workflow trigger - WF1->WF1: Extract latest SHA from docs-staging-X branch that triggered event - WF1->WF2: Sends `repository_dispatch` event with SHA - note over WF2: Now we are working out of the docs-staging-X repo - WF2->WF2: 1. Extracts SHA from `repository_dispatch` event
2. Updates `.env` in docs-staging-x with SHA value
3. Auto-merges the PR into docs-staging-x - WF2->MD: Auto-merge kicks off Moda deploy - MD->MD: Dockerfile build clones docs-internal code from SHA target set in `.env` - note over MD: Deployed to
`https://docs-staging-{{x}}.service.iad.github.net` -``` - -Whenever a developer pushes code to a staging branch in `docs-internal`, e.g. `docs-staging-2`, a pipeline begins with the final result being a staging server running with the latest changes from that branch. See the above diagram, or read below for a textual explanation. +> For internal documentation, please see the `Moda` directory in the internal Docs Engineering repo. -The pipeline is as follows: +When you make a code change and want to preview it in a live environment, you can use a staging server. If your change only touches content files e.g. `content/` and `data/` directories, please use the [review server](../../review-server/README.md) instead. -1. Pushing to a `docs-staging-X` branch on `docs-internal` triggers the [dispatch-sha-on-staging-push.yml](../../.github/workflows/dispatch-sha-on-staging-push.yml) workflow in `docs-internal` that fires a [repository_dispatch](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#repository_dispatch) event to the `docs-staging-X` repo corresponding to the `docs-staging-X` branch that was pushed to. +To preview code changes on a staging server: -1. The `repository_dispatch` event will include the latest `SHA` from the `docs-staging-X` branch in its payload. +1. If your changes aren't already in remote, push your branch to `docs-internal` . +2. Open a draft PR with your changes. +3. Wait until all of the `docs-internal Moda CI` checks pass. +4. In the `#docs-ops` Slack channel, enter the following command to begin a staging deploy: -1. The repo receiving the `repository_dispatch` event, `docs-staging-X` has a `deploy-on-repo-dispatch.yml` workflow that triggers whenever a `repository_dispatch` event is received. - -1. `deploy-on-repo-dispatch.yml`: - - 1. Extracts the `SHA` from the `repository_dispatch` payload - 2. Opens a PR replacing the existing `SHA` in the `.env` file in the repo with the new `SHA` - 3. Automatically merges the PR - -1. The PR merge kicks off an automatic Moda deploy for the `docs-staging-X` server. - -1. At build time, the [Dockerfile](./Dockerfile) clones the `SHA` from `docs-internal` and builds, runs, and deploys it to `https://docs-staging-{{x}}.service.iad.github.net` which is only accessible behind the [Developer VPN](https://thehub.github.com/security/security-operations/developer-vpn-access/). - -## How do review server deploys work from docs-internal? - -The process is very similar to the process in the previous section for staging servers. The differences are as follows: - -1. Review servers live in: - - 1. Repo [docs-staging-0](https://github.com/github/doc-staging-0) (internal) @ https://docs-review.github.com - 1. Repo [docs-staging-1](https://gthub.com/github/doc-staging-1) (external) @ https://os-docs-review.github.com - -1. When a _code_ change happens in `main` e.g. `.ts` or `.js` file is changed, the `update-review-servers-on-code-push.yml` runs instead of `update-docs-staging-x-repo.yml` in the docs-internal repo. -1. The `STAGING_BRANCH` in the these repos is set to `main` since they pull and run the latest code from `main` -1. The `SHA=` is set to the latest commit in `main` using the same process that staging servers use to deploy (repo dispatch from `docs-internal` to `docs-staging-X`) - -The primary reason for this is that the review servers need to be up to date with the latest _code_ changes with `docs-internal:main` so that they can accurately live preview content changes on branch targets. They don't need to be deployed each time just to preview content changes. They only need to be deployed when code changes, hence the separate process. - -Additionally, the review server is running the code from `main` instead of a staging branch, like `docs-staging-0`. - -## Keeping build configurations in sync - -Since we may increase or decrease the number of staging servers, repos, and branches e.g. `docs-staging-X+1`, we centralize all of the build config in the `src/deployments/staging` directory of this repo. - -Each of the following files & directories are synced when changed between each of the `docs-staging-X` repos using the [sync-staging-repo-files.yml](../../.github/workflows/sync-staging-repo-files.yml) workflow. - -The source of truth for the number of staging repos is in [src/deployments/staging/config.json](./config.json) along with other data like the domain names of each server. - -- The [Dockerfile](./Dockerfile) in `src/deployments/staging/Dockerfile` is the same Dockerfile that lives in each of the `docs-staging-X` repos. - -- The [src/deployments/staging/workflows](./workflows/) workflows are the same workflows that live in each of the `docs-staging-X` repo's `.github/.workflows/` directory. +``` +.deploy docs-internal/ to staging- +``` -- The [build-scripts/](./build-scripts) directory live in the staging repo's `build-scripts` directory +If the command was accepted, you will see a reply from `Hubot`, notifying you if your deploy request is valid. -> [!NOTE] -> The `.env` in each repo is unique to that repo since it stores that repo's `SHA` and in the case of the dedicated review server, `REVIEW_SERVER=`. The Dockerfile reads the `.env` file at build time and extracts the env variables into its environment. - -> [!NOTE] -> Each `docs-staging-X` repo must have `docs-bot` as a member with `write` access to enable syncing +5. After the deploy is completed, you can view your changes at `https://docs-staging-.service.iad.github.net` if you are behind the [Developer VPN](https://thehub.github.com/security/security-operations/developer-vpn-access/). diff --git a/src/deployments/staging/README.staging.md b/src/deployments/staging/README.staging.md deleted file mode 100644 index e8c6df4911dd..000000000000 --- a/src/deployments/staging/README.staging.md +++ /dev/null @@ -1,38 +0,0 @@ -# docs-staging-{{x}} - -This is the staging repo and corresponding Moda deployment for the GitHub Docs {{x}} staging server. - -The contents of this repo are kept in a one-directional sync with the contents of `src/deployments/staging` in the [docs-internal](https://github.com/github/docs-internal) repo, where `src/deployments/staging` from `docs-internal` is the source and this repo is the destination. - -> [!NOTE] -> Do not change any file other than `.env` in this repo. Instead, change the files in [src/deployments/staging of docs-internal](https://github.com/github/docs-internal/tree/main/src/staging/deployments/README.md) which will cascade update the files in each `docs-staging-X` repo (except `.env`). - -**URL:** https://docs-staging-{{x}}.service.iad.github.net (can only be accessed behind [Developer VPN](https://thehub.github.com/security/security-operations/developer-vpn-access/)) - -**Docs**: [src/deployments/staging of docs-internal](https://github.com/github/docs-internal/tree/main/src/deployments/staging/README.md) - -## Speed up automatic deploys - -When you push to the `docs-staging-{{x}}` branch or add the `docs-staging-{{x}}` label on an open PR, it will kick off an automated process that will open a PR in this repo, and then merge it via the merge queue which will trigger an automatic deployment. - -If you begin the above process, and don't want to wait for the slow merge queue process, you can bypass the merge queue and force merge the PR, then in the `#docs-ops` Slack channel you can write, - -``` -.deploy docs-staging-{{x}}/main to staging --ignore-required-pipeline -``` - -To trigger a staging deploy. - -## Manually deploy any docs-internal branch - -Adjust the `STAGING_BRANCH` and `SHA` to match a branch + SHA in `docs-internal`. Make sure _both_ values are set. - -Make the change to `.env` in a new branch, say `manual-deploy-docs-staging-{{x}}` - -Then in the `#docs-ops` Slack channel, - -``` -.deploy docs-staging-{{x}}/manual-deploy-docs-staging-{{x}} to staging --ignore-required-pipeline -``` - -However, make sure not to merge your `manual-deploy-docs-staging-{{x}}` branch into `main` since it will break automatic staging deploys. Instead, keep it separate and update the `STAGING_BRANCH` and `SHA` as needed. \ No newline at end of file diff --git a/src/deployments/staging/build-scripts/clone-or-use-cached-repo.sh b/src/deployments/staging/build-scripts/clone-or-use-cached-repo.sh deleted file mode 100644 index 600de379bd98..000000000000 --- a/src/deployments/staging/build-scripts/clone-or-use-cached-repo.sh +++ /dev/null @@ -1,63 +0,0 @@ -set -e - -# We use this function to use the cached version of the repo if it exists from -# a previous Dockerfile build. Otherwise, we clone the repo and check out the -# specified branch/SHA. -# Arguments: -# $1 - Repository name (for directory naming) -# $2 - Repository URL -# $3 - Branch to clone -# $4 - Specific SHA to check out (optional) -clone_or_use_cached_repo() { - repo_name="$1" - repo_url="$2" - branch="$3" - sha="$4" - - echo "Processing repository '$repo_name'..." - - if [ -d "$repo_name/.git" ]; then - echo "Repository '$repo_name' already exists. Fetching updates..." - cd "$repo_name" - - # Fetch latest changes - git fetch origin "$branch" - - # If a specific SHA is provided, check it out - if [ -n "$sha" ]; then - echo "Checking out SHA: $sha" - git checkout "$sha" - else - echo "Checking out branch: $branch" - git checkout "$branch" - git pull origin "$branch" - fi - - cd .. - else - echo "Cloning repository '$repo_name' from branch '$branch'..." - - # We use --depth 5 for the docs-internal branch we are checking out as a bit of a gamble for performace optimization. - # We assume that the latest changes are within the last few commits. - # Which should always be the case with how our staging servers are built via actions - # If someone manually sets `.env` this may break the build - if [ -n "$sha" ]; then - depth=5 - else - depth=1 - fi - - git clone --depth "$depth" --branch "$branch" "https://${GITHUB_TOKEN}@github.com/github/$repo_url.git" "$repo_name" - - cd "$repo_name" - - if [ -n "$sha" ]; then - echo "Checking out SHA: $sha" - git checkout "$sha" - fi - - cd .. - fi - - echo "Repository '$repo_name' is up to date." -} \ No newline at end of file diff --git a/src/deployments/staging/build-scripts/determine-early-access-branch.sh b/src/deployments/staging/build-scripts/determine-early-access-branch.sh deleted file mode 100755 index 5630064506fc..000000000000 --- a/src/deployments/staging/build-scripts/determine-early-access-branch.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -# These should be set already in the Dockerfile's env -if [ -z "$GITHUB_TOKEN" ] || [ -z "$STAGING_BRANCH" ]; then - echo "Error: GITHUB_TOKEN and STAGING_BRANCH environment variables must be set." - exit 1 -fi - -OWNER="github" -REPO="docs-early-access" -BRANCH_NAME="$STAGING_BRANCH" -API_URL="https://api.github.com/repos/${OWNER}/${REPO}/branches/${BRANCH_NAME}" - -fetch_branch() { - curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITHUB_TOKEN" "$API_URL" -} - -# Check branch using curl -STATUS=$(fetch_branch) - -if [ "$STATUS" -eq 200 ]; then - EARLY_ACCESS_BRANCH="$BRANCH_NAME" - echo "Using docs-early-access branch '${EARLY_ACCESS_BRANCH}'" -else - EARLY_ACCESS_BRANCH="main" - echo "Failed to get docs-early-access branch '${BRANCH_NAME}', 'main' will be used instead." -fi - -# Export the branch name to be consumed by the Dockerfile -export EARLY_ACCESS_BRANCH diff --git a/src/deployments/staging/build-scripts/fetch-repos.sh b/src/deployments/staging/build-scripts/fetch-repos.sh deleted file mode 100644 index 877d13d0a21f..000000000000 --- a/src/deployments/staging/build-scripts/fetch-repos.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env sh - -# Fetches and resolves docs-internal, early-access, and translations repos -echo "Fetching and resolving docs-internal, early-access, and translations repos" - -# Don't show advice logging about checking out a SHA with git -git config --global advice.detachedHead false - -# Exit immediately if a command exits with a non-zero status -set -e - -# Import the clone_or_use_cached_repo function -. ./build-scripts/clone-or-use-cached-repo.sh - -# - - - - - - - - - - -# Read variables from .env -# - - - - - - - - - - -. ./build-scripts/read-dot-env.sh - -GITHUB_TOKEN=$(cat /run/secrets/DOCS_BOT_PAT_READPUBLICKEY) - -# - - - - - - - - - - -# Get docs-internal contents -# - - - - - - - - - - -clone_or_use_cached_repo "repo" "docs-internal" "$STAGING_BRANCH" "$SHA" -# Clone other repo from the root of docs-internal -cd repo - -# - - - - - - - - - - -# Clone the translations repos -# - - - - - - - - - - -mkdir -p translations -cd translations - -# Iterate over each language -for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr" -do - translations_repo="docs-internal.$lang" - clone_or_use_cached_repo "$lang" "$translations_repo" "main" "" -done - -# Go back to the root of the docs-internal repo -cd .. - -# - - - - - - - - - - -# Cleanup -# - - - - - - - - - - -# Delete GITHUB_TOKEN from the environment -unset GITHUB_TOKEN \ No newline at end of file diff --git a/src/deployments/staging/build-scripts/read-dot-env.sh b/src/deployments/staging/build-scripts/read-dot-env.sh deleted file mode 100755 index fbae81db2873..000000000000 --- a/src/deployments/staging/build-scripts/read-dot-env.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh -set -e - -if [ -f ".env" ]; then - export $(grep -v '^#' .env | xargs) -fi \ No newline at end of file diff --git a/src/deployments/staging/build-scripts/server-entrypoint.sh b/src/deployments/staging/build-scripts/server-entrypoint.sh deleted file mode 100755 index 84bb2130b031..000000000000 --- a/src/deployments/staging/build-scripts/server-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -# We require a server-entrypoint to set environment variables that can't be set via Docker ENV -# This is a workaround to set vars from the .env file - -. ./build-scripts/read-dot-env.sh - -# We keep these logs here to make it clear what env vars are set in server logs -echo "MODA_APP_NAME: $MODA_APP_NAME" -echo "Using port: $PORT" -echo "Using branch: $STAGING_BRANCH" -echo "Using SHA: $SHA" -echo "Is review server?, $REVIEW_SERVER" - -# Start the server -exec ./node_modules/.bin/tsx src/frame/server.ts diff --git a/src/deployments/staging/config.json b/src/deployments/staging/config.json deleted file mode 100644 index 14032004171e..000000000000 --- a/src/deployments/staging/config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "number_of_staging_repos": 10, - "server_domain_name": { - "internal": "docs-review.github.com", - "external": "os-docs-review.github.com", - "docs-staging-x": "docs-staging-2.service.%region%.github.net" - }, - "load_balancer_type": { - "internal": "public-external-http", - "external": "public-external-http", - "docs-staging-x": "internal-http" - } -} diff --git a/src/deployments/staging/config/kubernetes/staging/deployments/webapp.yaml b/src/deployments/staging/config/kubernetes/staging/deployments/webapp.yaml deleted file mode 100644 index 125551530bc9..000000000000 --- a/src/deployments/staging/config/kubernetes/staging/deployments/webapp.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: webapp -spec: - replicas: 2 - selector: - matchLabels: - app: webapp - template: - metadata: - labels: - app: webapp - annotations: - # Our internal logs aren't structured so we use logfmt_sloppy to just log stdout and error - # See https://thehub.github.com/epd/engineering/dev-practicals/observability/logging/ for more details - fluentbit.io/parser: logfmt_sloppy - observability.github.com/splunk_index: docs-internal - spec: - dnsPolicy: Default - containers: - - name: webapp - image: docs-staging-{{x}} - ports: - - name: http - containerPort: 4000 - protocol: TCP - envFrom: - - configMapRef: - name: kube-cluster-metadata - - secretRef: - name: vault-secrets - # Zero-downtime deploys - # https://thehub.github.com/engineering/products-and-services/internal/moda/feature-documentation/pod-lifecycle/#required-prestop-hook - # https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - lifecycle: - preStop: - exec: - command: ['sleep', '5'] - readinessProbe: - # Add delay to allow the app to initialize - initialDelaySeconds: 5 - # See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes - httpGet: - path: /healthz - port: http - resources: - # These values should match the production values to ensure parity when testing - requests: - cpu: 8000m - memory: 10Gi - limits: - cpu: 16000m - memory: 14Gi diff --git a/src/deployments/staging/config/kubernetes/staging/services/webapp.yaml b/src/deployments/staging/config/kubernetes/staging/services/webapp.yaml deleted file mode 100644 index 167014f23bb2..000000000000 --- a/src/deployments/staging/config/kubernetes/staging/services/webapp.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: webapp - labels: - service: webapp - annotations: - moda.github.net/domain-name: '{{server_domain_name}}' - moda.github.net/load-balancer-type: '{{load_balancer_type}}' -spec: - ports: - - name: http - port: 4000 - protocol: TCP - targetPort: http - selector: - app: webapp - type: LoadBalancer diff --git a/src/deployments/staging/config/moda/build_options.yaml b/src/deployments/staging/config/moda/build_options.yaml deleted file mode 100644 index 1d3695874e45..000000000000 --- a/src/deployments/staging/config/moda/build_options.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# Array of rules to ignore -ignored_rules: [] -# Array of files for kubeconform to ignore -ignored_files: [] -# Array of directories to be ignored under `config/kubernetes` -ignored_dirs: [] -# Array of fragment paths of the deployment config for schema validations to ignore -ignored_deployment_config_fragments: [] -# Set to true to enable auto-commits for the generation of kubernetes resources from kustomize -enable_kustomize_auto_commit: false diff --git a/src/deployments/staging/config/moda/deployment.yaml b/src/deployments/staging/config/moda/deployment.yaml deleted file mode 100644 index 0e9f488cfd5a..000000000000 --- a/src/deployments/staging/config/moda/deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Deploy configuration reference: https://thehub.github.com/epd/engineering/products-and-services/internal/moda/reference/deployment-yaml/ - -environments: - - name: staging - require_pipeline: true - cluster_selector: - profile: general - region: iad - -required_builds: - - docs-staging-{{x}}-moda-config-bundle / docs-staging-{{x}}-moda-config-bundle - - docs-staging-{{x}}-docker-image / docs-staging-{{x}}-docker-image - - docs-staging-{{x}}-docker-security / docs-staging-{{x}}-docker-security - -# Make the pipeline start automatically when a PR is enqueued -auto_start_pipeline: staging_rollout - -pipelines: - staging_rollout: - thread_notifications: true - notify_users_via_dm: false - timeout: 1200 - stages: - - name: full_staging - kind: deployment - start_message: We are now going to deploy {{app}}/{{ref}}! Please pause or cancel the pipeline after the deploy if you want more time before auto-merging your pull request(s). - config: - environment: staging - timeout: 1200 - -notifications: - slack_channels: - - '#docs-ops' diff --git a/src/deployments/staging/ownership.yaml b/src/deployments/staging/ownership.yaml deleted file mode 100644 index 942f703ba39b..000000000000 --- a/src/deployments/staging/ownership.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -version: 1 -ownership: - # ownership.yaml describes who is responsible for a service, and how to contact them. If your service is made up - # of multiple components, you can define multiple entries in this file. - # - # Additional documentation on ownership.yaml fields is available at: https://thehub.github.com/engineering/products/service-catalog/service-ownership/#attributes-of-durable-ownership - - team: github/docs-engineering - repo: https://github.com/github/docs-staging-{{x}} - name: docs-staging-{{x}} - kind: moda - long_name: Docs Staging {{x}} - description: The \#{{x}} staging app for GitHub Docs. - exec_sponsor: nerdneha - maintainer: ebonsignori - qos: best_effort - tier: 3 - sev2: - issue: https://github.com/github/docs-engineering/issues/ - tta: 1w - sev3: - slack: docs-alerts - tta: 1d - dependencies: - - docs