Skip to content

Commit

Permalink
Merge branch 'main' into issue-14713
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwilson21 authored Oct 25, 2022
2 parents 1c03485 + 11ae1b0 commit 9f8be6d
Show file tree
Hide file tree
Showing 1,002 changed files with 20,894 additions and 20,761 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
- [ ] Get the megabranch green with passing tests as soon as possible. This typically involves fixing broken links and working with engineering to address other unexpected test failures.

This comment was marked as spam.

Copy link
@janaftab

janaftab Nov 2, 2022

                if (state->head != Z_NULL &&
                    state->head->extra != Z_NULL) {
                    len = state->head->extra_len - state->length;
- [ ] In `github/github`, to create a new GHES release follow these steps (some of these steps may have already been done):
- [ ] Copy the previous release's root document to a new root document for this release `cp app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/ghes-<NEXT RELEASE NUMBER>.yaml`.
- [ ] Update the `externalDocs.url` property in that file to use the new GHES release number.
- [ ] In `github/github`, use a Codespace to create a pull request that adds a new GHES release. Follow these steps (some of these steps may have already been done):
- [ ] Copy the previous release's configuration file to a new configuration file for this release `cp app/api/description/config/releases/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`.
- [ ] Update the `variables.externalDocsUrl`, `variables.ghesVersion`, and `patch.[].value.url` in that file to use the new GHES release number.
- [ ] Update all references to the old GHES release number in that file to use the new GHES release number. There are about 4 occurrences at the time of this writing: `variables.externalDocsUrl`, `variables.ghesVersion`, and two keys under `patch` for the paths `/info/x-github-release` and `/externalDocs`.
- [ ] Update `published` in that file to `false`. **Note:** This is important to ensure that changes for the next version of the OpenAPI schema changes are not made public until the new version is released.
- [ ] Run `./bin/openapi generate-root-files` to generate the `app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml` file and merge the changes.
- [ ] Create a PR with the two file changes `app/api/description/ghes-<NEW RELEASE NUMBER>.yaml` and `app/api/description/config/releases/ghes-<NEW RELEASE NUMBER>.yaml`
- [ ] Create a second PR based on the PR created ☝️ that toggles `published` to `true` in the `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml` file. When this PR merges it will publish the new release to the `github/rest-api-description` repo and will trigger a pull request in the `github/docs-internal` repo with the schemas for the next GHES release. There is a step in this list to merge that PR in the "Before shipping the release branch" section.
- [ ] At least once a day until release, merge `main` into the megabranch and resolve any conflicts or failing tests.
Expand Down
19 changes: 19 additions & 0 deletions .github/actions/lib/get-env-inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,22 @@ export function getEnvInputs(options) {
})
)
}

/*
* Given an environment variable key, return `true` or `false` if the
* value is recognizable.
* Turn 'true' or '1' into `true`. And '', '0', or 'false' into `false`.
* All other values are invalid.
* Now you can't accidentally set `export FOO=falsee` which as string `'falsee'`
* could have been interpreted as a truthy value.
*
* @param {string} key - name of the environment variable
*
* @returns {boolean}
*/
export function boolEnvVar(key) {
const value = process.env[key] || ''
if (value === '' || value === 'false' || value === '0') return false
if (value === 'true' || value === '1') return true
throw new Error(`Invalid value for set environment variable ${key}: '${value}'`)
}
50 changes: 25 additions & 25 deletions .github/actions/rendered-content-link-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import warmServer from '../../lib/warm-server.js'
import renderContent from '../../lib/render-content/index.js'
import { deprecated } from '../../lib/enterprise-server-releases.js'
import excludedLinks from '../../lib/excluded-links.js'
import { getEnvInputs } from './lib/get-env-inputs.js'
import { getEnvInputs, boolEnvVar } from './lib/get-env-inputs.js'
import { debugTimeEnd, debugTimeStart } from './lib/debug-time-taken.js'
import { uploadArtifact as uploadArtifactLib } from './lib/upload-artifact.js'
import github from '../../script/helpers/github.js'
Expand Down Expand Up @@ -51,23 +51,9 @@ const deprecatedVersionPrefixesRegex = new RegExp(

// When this file is invoked directly from action as opposed to being imported
if (import.meta.url.endsWith(process.argv[1])) {
// Validate that required action inputs are present
getEnvInputs(['GITHUB_TOKEN'])

// Optional env vars
const {
ACTION_RUN_URL,
CREATE_REPORT,
CHECK_EXTERNAL_LINKS,
LEVEL,
SHOULD_COMMENT,
COMMENT_LIMIT_TO_EXTERNAL_LINKS,
FAIL_ON_FLAW,
FILES_CHANGED,
REPORT_REPOSITORY,
REPORT_AUTHOR,
REPORT_LABEL,
} = process.env
const { ACTION_RUN_URL, LEVEL, FILES_CHANGED, REPORT_REPOSITORY, REPORT_AUTHOR, REPORT_LABEL } =
process.env

const octokit = github()

Expand All @@ -89,21 +75,27 @@ if (import.meta.url.endsWith(process.argv[1])) {
verbose: true,
linkReports: true,
checkImages: true,
patient: true,
patient: boolEnvVar('PATIENT'),
random: false,
language: 'en',
actionUrl: ACTION_RUN_URL,
checkExternalLinks: CHECK_EXTERNAL_LINKS === 'true',
shouldComment: SHOULD_COMMENT === 'true',
commentLimitToExternalLinks: COMMENT_LIMIT_TO_EXTERNAL_LINKS === 'true',
failOnFlaw: FAIL_ON_FLAW === 'true',
createReport: CREATE_REPORT === 'true',
checkExternalLinks: boolEnvVar('CHECK_EXTERNAL_LINKS'),
shouldComment: boolEnvVar('SHOULD_COMMENT'),
commentLimitToExternalLinks: boolEnvVar('COMMENT_LIMIT_TO_EXTERNAL_LINKS'),
failOnFlaw: boolEnvVar('FAIL_ON_FLAW'),
createReport: boolEnvVar('CREATE_REPORT'),
reportRepository: REPORT_REPOSITORY,
reportLabel: REPORT_LABEL,
reportAuthor: REPORT_AUTHOR,
actionContext: getActionContext(),
}

if (opts.shouldComment || opts.createReport) {
// `GITHUB_TOKEN` is optional. If you need the token to post a comment
// or open an issue report, you might get cryptic error messages from Octokit.
getEnvInputs(['GITHUB_TOKEN'])
}

main(coreLib, octokit, uploadArtifactLib, opts, {})
}

Expand Down Expand Up @@ -137,6 +129,7 @@ if (import.meta.url.endsWith(process.argv[1])) {
* verbose {boolean} - Set to true for more verbose logging
* random {boolean} - Randomize page order for debugging when true
* patient {boolean} - Wait longer and retry more times for rate-limited external URLS
* bail {boolean} - Throw an error on the first page (not permalink) that has >0 flaws
*
*/
async function main(core, octokit, uploadArtifact, opts = {}) {
Expand Down Expand Up @@ -526,7 +519,7 @@ function getPages(pageList, languages, filters, files, max) {
}

async function processPage(core, page, pageMap, redirects, opts) {
const { verbose, verboseUrl } = opts
const { verbose, verboseUrl, bail } = opts

const allFlawsEach = await Promise.all(
page.permalinks.map((permalink) => {
Expand All @@ -540,6 +533,13 @@ async function processPage(core, page, pageMap, redirects, opts) {
if (verbose) {
printFlaws(core, allFlaws, { verboseUrl })
}

if (bail) {
if (!verbose) {
console.warn('Use --verbose to see the flaws before it exits')
}
throw new Error(`More than one flaw in ${page.relativePath}`)
}
}

return allFlaws
Expand Down Expand Up @@ -828,7 +828,7 @@ async function innerFetch(core, url, config = {}) {
// So there's no point in trying more attempts than 3 because it would
// just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000)
const retry = {
limit: patient ? 5 : 2,
limit: patient ? 6 : 2,
}
const timeout = { request: patient ? 10000 : 2000 }

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/link-check-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
REPORT_REPOSITORY: github/docs-content
CREATE_REPORT: true
CHECK_EXTERNAL_LINKS: true
PATIENT: true
timeout-minutes: 30
run: node .github/actions/rendered-content-link-checker.js

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
LEVEL: 'critical'
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_FR }}
SHOULD_COMMENT: true
SHOULD_COMMENT: ${{ secrets.DOCS_BOT_FR != '' }}
CHECK_EXTERNAL_LINKS: false
CREATE_REPORT: false
run: node .github/actions/rendered-content-link-checker.js
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/orphaned-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: 'Orphaned assets check'
on:
workflow_dispatch:
schedule:
- cron: '13 10 * * *' # Once a day at 10:13 UTC
- cron: '20 11 * * 1' # run every Monday at 11:20AM UTC

permissions:
contents: read
Expand All @@ -17,13 +17,46 @@ jobs:
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout English repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
# Using a PAT is necessary so that the new commit will trigger the
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
token: ${{ secrets.DOCUBOT_REPO_PAT }}

# TODO: Can be removed after we no longer keep translations in-repo
- name: Remove existing language translations
run: |
rm -rf translations
- name: Checkout the es-es repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
repository: github/docs-internal.es-es
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
path: translations/es-ES

- name: Checkout the pt-br repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
repository: github/docs-internal.pt-br
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
path: translations/pt-BR

- name: Checkout the zh-cn repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
repository: github/docs-internal.zh-cn
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
path: translations/zh-CN

- name: Checkout the ja-jp repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
repository: github/docs-internal.ja-jp
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
path: translations/ja-JP

- name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
Expand All @@ -43,7 +76,7 @@ jobs:
./script/find-orphaned-assets.js | xargs git rm
# If nothing to commit, exit now. It's fine. No orphans.
git status | grep 'nothing to commit' && exit 0
git status -- ':!translations*' | grep 'nothing to commit' && exit 0
# Replicated from the translation pipeline PR-maker Action
git config --global user.name "docubot"
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/remove-unused-assets.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Figure out which docs-early-access branch to checkout, if internal repo
if: ${{ github.repository == 'github/docs-internal' }}
id: check-early-access
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
with:
Expand All @@ -92,7 +92,7 @@ jobs:
// example, the value becomes 'main'.
const { BRANCH_NAME } = process.env
try {
const response = await github.repos.getBranch({
const response = await github.rest.repos.getBranch({
owner: 'github',
repo: 'docs-early-access',
branch: BRANCH_NAME,
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# skip installing optional dependencies to avoid issues with troublesome `fsevents` module
optional=false
omit=optional
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.
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.
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.
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/profile/set-status-on-profile.png
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/help/repository/lock-branch.png
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.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ When you set your status, you can also let people know that you have limited ava

If you select the "Busy" option, when people @mention your username, assign you an issue or pull request, or request a pull request review from you, a note next to your username will show that you're busy. You will also be excluded from automatic review assignment for pull requests assigned to any teams you belong to. For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."

1. In the top right corner of {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_name %}{% endif %}, click your profile photo, then click **Set your status** or, if you already have a status set, click your current status.
1. In the top right corner of {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_name %}{% endif %}, click your profile photo, then click **Set status** or, if you already have a status set, click your current status.
![Button on profile to set your status](/assets/images/help/profile/set-status-on-profile.png)
2. To add custom text to your status, click in the text field and type a status message.
![Field to type a status message](/assets/images/help/profile/type-a-status-message.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To ensure that commits are attributed to you and appear in your contributions gr

{% note %}

**Note:** If you created your account on {% data variables.location.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is a seven-digit ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.location.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.
**Note:** If you created your account on {% data variables.location.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is an ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.location.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.

{% endnote %}

Expand Down
3 changes: 0 additions & 3 deletions content/actions/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ versions:
ghec: '*'
learningTracks:
- getting_started
- continuous_integration
- continuous_deployment
- deploy_to_the_cloud
- adopting_github_actions_for_your_enterprise_ghec
- adopting_github_actions_for_your_enterprise_ghes_and_ghae
- hosting_your_own_runners
Expand Down
10 changes: 2 additions & 8 deletions content/actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ featuredLinks:
- /actions/learn-github-actions/expressions
- /actions/learn-github-actions/environment-variables
- /actions/security-guides/encrypted-secrets
videos:
- title: 'Inside GitHub: How we use GitHub Actions – Brian Douglas'
href: 'https://www.youtube-nocookie.com/embed/MW0V5Q9WJu4'
- title: Advanced GitHub Actions – Jennifer Schelkopf
href: 'https://www.youtube-nocookie.com/embed/wWOH44Lscoc'
- title: GitHub Actions in action – Karan MV
href: 'https://www.youtube-nocookie.com/embed/4SWO0Pc76CU'
videosHeading: GitHub Universe 2021 videos
changelog:
label: actions
product_video: 'https://www.youtube-nocookie.com/embed/cP0I9w2coGU'
redirect_from:
- /articles/automating-your-workflow-with-github-actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ versions:

In addition to the [standard {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources), {% data variables.product.prodname_dotcom %} also offers customers on {% data variables.product.prodname_team %} and {% data variables.product.prodname_ghe_cloud %} plans a range of {% data variables.actions.hosted_runner %}s with more RAM and CPU. These runners are hosted by {% data variables.product.prodname_dotcom %} and have the runner application and other tools preinstalled.

When {% data variables.actions.hosted_runner %}s are enabled for your organization, a default runner group is automatically created for you with a set of four pre-configured {% data variables.actions.hosted_runner %}s.

When you add a {% data variables.actions.hosted_runner %} to an organization, you are defining a type of machine from a selection of available hardware specifications and operating system images. {% data variables.product.prodname_dotcom %} will then create multiple instances of this runner that scale up and down to match the job demands of your organization, based on the autoscaling limits you define.

## Machine specs for {% data variables.actions.hosted_runner %}s
Expand Down
Loading

0 comments on commit 9f8be6d

Please sign in to comment.