Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorsector authored Jan 22, 2025
2 parents 1651aff + e6215fb commit 08fb998
Show file tree
Hide file tree
Showing 550 changed files with 96,776 additions and 12,754 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/code-changes-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Code changes comment

# **What it does**: When a PR is opened in docs-internal or docs containing code, it comments with instructions on how to deploy and preview the changes.
# **Why we have it**: To help Docs contributors understand how to preview their changes.
# **Who does it impact**: docs-internal and docs maintainers and contributors

on:
# Required in lieu of `pull_request` so that the comment can be posted to PRs opened from a fork.
pull_request_target:
types:
- opened
- synchronize
# this applies to any non-content files, this workflow will run for all changed files unless it's ONLY these content-related changes
paths-ignore:
- 'content/**'
- 'data/reusables/**'
- 'assets/images/**'

permissions:
contents: read
pull-requests: write

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
postOnCodeChanges:
if: ${{ github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: check out repo content
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Find code changes comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: findComment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- CODE_CHANGES_COMMENT -->'

# TODO: We'll update this comment at a later time with permament-ish links to deployment instructions.
- name: Comment on code changes
if: ${{ !steps.findComment.outputs.comment-id }}
run: |
if [[ "${{ github.repository }}" == "github/docs" ]]; then
COMMENT_BODY="<!-- CODE_CHANGES_COMMENT -->
## 🚀 Manual Deployment Required
It looks like this pull request contains code changes. To preview these changes, an internal Hubber will need to manually deploy the changes to one of our staging servers.
Thank you for your contribution!"
else
COMMENT_BODY="<!-- CODE_CHANGES_COMMENT -->
## 🚀 Manual Deployment Required
It looks like this pull request contains code changes. To preview these changes, you will need to deploy them manually.
Thank you for your contribution!"
fi
gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT_BODY"
34 changes: 0 additions & 34 deletions .github/workflows/codeowners-content-systems.yml

This file was deleted.

29 changes: 18 additions & 11 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
paths:
- 'content/**'
- 'data/reusables/**'
- 'assets/images/**'

permissions:
contents: read
Expand All @@ -48,21 +49,28 @@ jobs:
- name: check out repo content
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Get preview app info
env:
APP_NAME_SEED: ${{ secrets.PREVIEW_ENV_NAME_SEED }}
run: src/workflows/get-preview-app-info.sh

- uses: ./.github/actions/node-npm-setup

# We're setting the URLs manually until we merge in-progress work. We can utilize review server and its helper functions in a later iteration.
- name: Set APP_URL
run: |
if [[ "${{ github.repository }}" == "github/docs-internal" ]]; then
echo "APP_URL=https://docs-review.github.com" >> $GITHUB_ENV
elif [[ "${{ github.repository }}" == "github/docs" ]]; then
echo "APP_URL=https://os-docs-review.github.com" >> $GITHUB_ENV
fi
- name: Get changes table
id: changes
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REVIEW_SERVER_ACCESS_TOKEN: ${{ secrets.REVIEW_SERVER_ACCESS_TOKEN }}
APP_URL: ${{ env.APP_URL }}
BASE_SHA: ${{ github.event.pull_request.base.sha || inputs.BASE_SHA }}
HEAD_SHA: ${{ github.event.pull_request.head.sha || inputs.HEAD_SHA }}
# HEAD_BRANCH isn't necessary for the table comment, but lets us list the branch in the review server menu bar
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
run: npm run content-changes-table-comment

- name: Find content directory changes comment
Expand All @@ -81,10 +89,10 @@ jobs:
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
body: |
<!-- MODIFIED_CONTENT_LINKING_COMMENT -->
## Automatically generated comment ℹ️
**This comment is automatically generated and will be overwritten every time changes are committed to this branch.**
## 👓 Previews for changed content
**This comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch.**
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the `data` directory will not show up in this table.
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the review server. Please note that changes to the `data` directory will not show up in this table.
---
Expand All @@ -93,7 +101,6 @@ jobs:
${{ steps.changes.outputs.changesTable }}
---
fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server
Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server
_This table is posted from the [${{ github.workflow }}](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/content-changes-table-comment.yml) workflow._
edit-mode: replace
2 changes: 1 addition & 1 deletion .github/workflows/no-response.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/reviewers-content-systems.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 19 additions & 11 deletions .github/workflows/reviewers-dependabot.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,37 +23,36 @@ on:
- '!src/**.json' # So that Docs Engineering isn't reviewing automated pipeline data PRs
- '!src/**.yml' # So that Docs Engineering isn't reviewing automated pipeline data PRs
- '.github/**'
- 'config/**'
- '**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
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,7 +15,7 @@ on:
- synchronize
paths:
- 'content/**'
- .github/workflows/codeowners-legal.yml
- .github/workflows/reviewers-legal.yml

permissions:
contents: read
Expand All @@ -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:
Expand Down Expand Up @@ -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')
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/copilot/custom-instructions-vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/help/copilot/indexed-repo.png
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,32 @@ shortTitle: Add an email address
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.user-settings.add_and_verify_email %}
{% data reusables.user-settings.select_primary_email %}
1. If you'd like to associate the email address with your web-based Git operations, select it from the "Primary email address" dropdown menu.

![Screenshot of the "Email" settings page. Under "Primary email address," a dropdown menu, labeled with Octocat's email address, is outlined in orange.](/assets/images/help/settings/email-primary.png)

## Troubleshooting adding an email

If you see an error message when you try to add an email address to your account, you may be experiencing one of the following issues.

### Email already in use

If you see the error message `Error adding EMAIL: email is already in use`, it means the email address is already linked to another {% data variables.product.prodname_dotcom %} account. An email address can only be associated with one {% data variables.product.prodname_dotcom %} account at a time.

To use this email with a different account, follow these steps:

1. Sign in to the account currently linked to the email address and remove it from that account.
1. If you don’t have access to the account, request a password reset email to recover it. See [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials).

### Email linked to a {% data variables.enterprise.prodname_managed_user %}

If the email address that you are trying to add is provided to you by your organization, you may see the `Error adding EMAIL: email is already in use` error when your organization has created a {% data variables.enterprise.prodname_managed_user %} for you in their {% data variables.enterprise.prodname_emu_enterprise %}.

Reach out to your site administrator or internal IT helpdesk to learn about their deployment of {% data variables.product.prodname_ghe_cloud %} and how to access the account. You may be able to sign into the {% data variables.product.prodname_ghe_cloud %} application via the organization's identity provider (IdP).

If you want to use your email address with a personal account, you must sign in to your {% data variables.enterprise.prodname_managed_user %} and unverify the email in your account settings. The email will remain linked to your {% data variables.enterprise.prodname_managed_user %}, allowing you to access the account through your organization's IdP.

However, some third-party apps or services may not function properly with a {% data variables.enterprise.prodname_managed_user %} that has an unverified email address.

## Further reading

Expand Down
Loading

0 comments on commit 08fb998

Please sign in to comment.