From 6d56712d42b23c32dc91362a861bead34bcb48d8 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Tue, 10 Nov 2020 08:33:37 +0000 Subject: [PATCH 01/11] Add note that secret scanning endpoints should be able to handle large number of matches without timing out --- content/developers/overview/secret-scanning.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/developers/overview/secret-scanning.md b/content/developers/overview/secret-scanning.md index 576d3f42ec..054637e2a5 100644 --- a/content/developers/overview/secret-scanning.md +++ b/content/developers/overview/secret-scanning.md @@ -79,7 +79,7 @@ Content-Length: 0123 ] ``` -The message body is a JSON array that contains one or more objects with the following contents. When multiple matches are found, {% data variables.product.prodname_dotcom %} may send a single message with more than one secret match. +The message body is a JSON array that contains one or more objects with the following contents. When multiple matches are found, {% data variables.product.prodname_dotcom %} may send a single message with more than one secret match. Your endpoint should be able to handle requests with a large number of matches without timing out. * **Token**: The value of the secret match. * **Type**: The unique name you provided to identify your regular expression. @@ -139,7 +139,7 @@ func main() { fmt.Printf("Error preparing request: %s\n", err) os.Exit(1) } - + if len(os.Getenv("GITHUB_PRODUCTION_TOKEN")) == 0 { fmt.Println("Need to define environment variable GITHUB_PRODUCTION_TOKEN") os.Exit(1) From b6f68472b520458b8d5468b792320b12b4ff9f73 Mon Sep 17 00:00:00 2001 From: Janice Date: Fri, 13 Nov 2020 09:47:39 -0700 Subject: [PATCH 02/11] update contributing.md --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d169bcc08b..e92e1f047e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,8 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. -- The [`good-first-issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners. +- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted) is for problems or updates anyone in the community can start working on. +- The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners. - The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown. - The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix. From b03cb4b5cb90c559d1d91acf63468d111c9248a0 Mon Sep 17 00:00:00 2001 From: Janice Date: Fri, 13 Nov 2020 09:49:48 -0700 Subject: [PATCH 03/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e92e1f047e..7aca75c728 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,7 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. -- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted) is for problems or updates anyone in the community can start working on. +- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted) is for problems or updates that anyone in the community can start working on. - The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners. - The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown. - The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix. From e4c2c9e32a2ef77701ca579d29fa89761a9d6af7 Mon Sep 17 00:00:00 2001 From: Janice Date: Fri, 13 Nov 2020 10:08:53 -0700 Subject: [PATCH 04/11] Update CONTRIBUTING.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7aca75c728..8d0c4285d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,7 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. -- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted) is for problems or updates that anyone in the community can start working on. +- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is for problems or updates that anyone in the community can start working on. - The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners. - The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown. - The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix. From 7b0915c564c0e9e2821354354fd7057b41ef3ce7 Mon Sep 17 00:00:00 2001 From: Janice Date: Fri, 13 Nov 2020 10:09:03 -0700 Subject: [PATCH 05/11] Update CONTRIBUTING.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d0c4285d2..0480575521 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,7 +115,7 @@ You can browse existing issues to find something that needs help! ### Labels Labels can help you find an issue you'd like to help with. - The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is for problems or updates that anyone in the community can start working on. -- The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners. +- The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) is for problems or updates we think are ideal for beginners. - The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown. - The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix. From a6f2e68b5396138b7a930b628304dadc1312a372 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Mon, 16 Nov 2020 06:29:08 +0100 Subject: [PATCH 06/11] Avoid use branch for example workflows (#1231) --- .../actions/reference/workflow-syntax-for-github-actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 2d4d9a44df..18956f0b50 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -446,7 +446,7 @@ steps: uses: monacorp/action-name@main - name: My backup step if: {% raw %}${{ failure() }}{% endraw %} - uses: actions/heroku@master + uses: actions/heroku@1.0.0 ``` #### **`jobs..steps.name`** @@ -492,7 +492,7 @@ jobs: steps: - name: My first step # Uses the default branch of a public repository - uses: actions/heroku@master + uses: actions/heroku@1.0.0 - name: My second step # Uses a specific version tag of a public repository uses: actions/aws@v2.0.1 From d61493f46bf0a45b57ca2eb0d08c41523237aa42 Mon Sep 17 00:00:00 2001 From: JBryceOrtiz <72474245+JBryceOrtiz@users.noreply.github.com> Date: Sun, 15 Nov 2020 22:45:13 -0700 Subject: [PATCH 07/11] Update workflow-syntax-for-github-actions.md (#1132) --- .../actions/reference/workflow-syntax-for-github-actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 18956f0b50..43713a7546 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -659,7 +659,7 @@ For built-in shell keywords, we provide the following defaults that are executed - `cmd` - There doesn't seem to be a way to fully opt into fail-fast behavior other than writing your script to check each error code and respond accordingly. Because we can't actually provide that behavior by default, you need to write this behavior into your script. - - `cmd.exe` will exit with the error level of the last program it executed, and it will and return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact. + - `cmd.exe` will exit with the error level of the last program it executed, and it will return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact. #### **`jobs..steps.with`** @@ -718,7 +718,7 @@ steps: entrypoint: /a/different/executable ``` -The `entrypoint` keyword is meant to use with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs. +The `entrypoint` keyword is meant to be used with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs. #### **`jobs..steps.env`** From 8f08c3b58471dbd7c19dea8921f48d9b96f4ec36 Mon Sep 17 00:00:00 2001 From: Deborah Gertrude Digges Date: Mon, 16 Nov 2020 00:58:36 -0500 Subject: [PATCH 08/11] Make description of step more accurate (#1108) Co-authored-by: Nick Schonning Co-authored-by: Lucas Costi --- .../learn-github-actions/introduction-to-github-actions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/actions/learn-github-actions/introduction-to-github-actions.md b/content/actions/learn-github-actions/introduction-to-github-actions.md index 6643445733..eecfa6589a 100644 --- a/content/actions/learn-github-actions/introduction-to-github-actions.md +++ b/content/actions/learn-github-actions/introduction-to-github-actions.md @@ -42,7 +42,7 @@ A job is a set of steps that execute on the same runner. By default, a workflow #### Steps -A step is an individual task that can run commands (known as _actions_). Each step in a job executes on the same runner, allowing the actions in that job to share data with each other. +A step is an individual task that can run commands in a job. A step can be either an _action_ or a shell command. Each step in a job executes on the same runner, allowing the actions in that job to share data with each other. #### Actions @@ -50,7 +50,7 @@ _Actions_ are standalone commands that are combined into _steps_ to create a _jo #### Runners -A runner is a server that has the {% data variables.product.prodname_actions %} runner application installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment. +A runner is a server that has the [{% data variables.product.prodname_actions %} runner application](https://github.com/actions/runner) installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment. {% data variables.product.prodname_dotcom %}-hosted runners are based on Ubuntu Linux, Microsoft Windows, and macOS. For information on {% data variables.product.prodname_dotcom %}-hosted runners, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/virtual-environments-for-github-hosted-runners)." If you need a different operating system or require a specific hardware configuration, you can host your own runners. For information on self-hosted runners, see "[Hosting your own runners](/actions/hosting-your-own-runners)." @@ -197,7 +197,7 @@ To help you understand how YAML syntax is used to create a workflow file, this s #### Visualizing the workflow file -In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action. Steps 1 and 2 use prebuilt community actions. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)." +In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell command. Steps 1 and 2 use prebuilt community actions. Steps 3 and 4 run shell commands directly on the runner. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)." ![Workflow overview](/assets/images/help/images/overview-actions-event.png) From ef1184d72d2b2c9cef0f0eeb0cad2e056647c100 Mon Sep 17 00:00:00 2001 From: Lucas Costi Date: Mon, 16 Nov 2020 16:21:32 +1000 Subject: [PATCH 09/11] Add raw tags for issue_comment example (#1373) --- content/actions/reference/events-that-trigger-workflows.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index f4d23c9cae..e4ad44df1f 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -327,6 +327,7 @@ The `issue_comment` event occurs for comments on both issues and pull requests. For example, you can choose to run the `pr_commented` job when comment events occur in a pull request, and the `issue_commented` job when comment events occur in an issue. +{% raw %} ```yaml on: issue_comment @@ -349,6 +350,7 @@ jobs: - run: | echo "Comment on issue #${{ github.event.issue.number }}" ``` +{% endraw %} #### `issues` From 790928cb84018f76b49e2b4f0ced7e8c6231d891 Mon Sep 17 00:00:00 2001 From: Chiedo Date: Mon, 16 Nov 2020 08:46:48 -0500 Subject: [PATCH 10/11] Add the option to exempt issues and prs from staleness --- .github/workflows/60-days-stale-check.yml | 2 ++ .github/workflows/triage-stale-check.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/60-days-stale-check.yml b/.github/workflows/60-days-stale-check.yml index 498ddde4c0..1070b13115 100644 --- a/.github/workflows/60-days-stale-check.yml +++ b/.github/workflows/60-days-stale-check.yml @@ -17,4 +17,6 @@ jobs: only-labels: 'engineering' stale-issue-label: 'stale' stale-pr-label: 'stale' + exempt-pr-labels: 'never-stale' + exempt-issue-labels: 'never-stale' diff --git a/.github/workflows/triage-stale-check.yml b/.github/workflows/triage-stale-check.yml index 93a595ab03..35d4047c24 100644 --- a/.github/workflows/triage-stale-check.yml +++ b/.github/workflows/triage-stale-check.yml @@ -16,3 +16,5 @@ jobs: days-before-stale: 7 days-before-close: 10 stale-pr-label: 'stale' + exempt-pr-labels: 'never-stale' + exempt-issue-labels: 'never-stale' From 5e6c30a4a832f92096848b4be5bdb80bdbaedb70 Mon Sep 17 00:00:00 2001 From: Chiedo Date: Mon, 16 Nov 2020 09:07:00 -0500 Subject: [PATCH 11/11] Revert "chore: flatten ifs for fkirc/skip-duplicate-actions" This reverts commit d9d17364e334fb33974836a44aea8fe7702fc381. --- .github/workflows/browser-test.yml | 12 ++++++++---- .github/workflows/test.yml | 24 ++++++++++++++++-------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index aaf41978b3..18e0166879 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -20,18 +20,22 @@ jobs: paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]' build: needs: see_if_should_skip - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - - name: Checkout + # Each of these ifs needs to be repeated at each step to make sure the required check still runs + # Even if if doesn't do anything + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Checkout uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - - name: Install + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Install uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb with: args: npm ci - - name: Test + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Test uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb with: args: npm run browser-test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f52a3930c..eaec563ed5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,6 @@ jobs: test: needs: see_if_should_skip - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} runs-on: ubuntu-latest timeout-minutes: 60 strategy: @@ -39,20 +38,26 @@ jobs: matrix: test-group: [content, meta, rendering, routing, unit, links-and-images] steps: - - name: Check out repo + # Each of these ifs needs to be repeated at each step to make sure the required check still runs + # Even if if doesn't do anything + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Check out repo uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - - name: Setup node + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Setup node uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d with: node-version: 14.x - - name: Get npm cache directory + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Get npm cache directory id: npm-cache run: | echo "::set-output name=dir::$(npm config get cache)" - - name: Cache node modules + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Cache node modules uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a with: path: ${{ steps.npm-cache.outputs.dir }} @@ -60,13 +65,16 @@ jobs: restore-keys: | ${{ runner.os }}-node- - - name: Install dependencies + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Install dependencies run: npm ci - - name: Run build script + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Run build script run: npm run build - - name: Run tests + - if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }} + name: Run tests run: npx jest tests/${{ matrix.test-group }}/ env: NODE_OPTIONS: "--max_old_space_size=4096"