diff --git a/.all-contributorsrc b/.all-contributorsrc index 6a608ccc2052..e341d7a9bb7c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -285,6 +285,77 @@ "bug", "code" ] + }, + { + "login": "BenJam", + "name": "Benjamin Nickolls", + "avatar_url": "https://avatars2.githubusercontent.com/u/158833?v=4", + "profile": "https://github.com/BenJam", + "contributions": [ + "doc" + ] + }, + { + "login": "jeffmcaffer", + "name": "Jeff McAffer", + "avatar_url": "https://avatars2.githubusercontent.com/u/10070956?v=4", + "profile": "https://mcaffer.com", + "contributions": [ + "doc" + ] + }, + { + "login": "tjenkinson", + "name": "Tom Jenkinson", + "avatar_url": "https://avatars0.githubusercontent.com/u/3259993?v=4", + "profile": "https://tjenkinson.me", + "contributions": [ + "code" + ] + }, + { + "login": "casals", + "name": "Arthur Casals", + "avatar_url": "https://avatars0.githubusercontent.com/u/785860?v=4", + "profile": "https://github.com/casals", + "contributions": [ + "content", + "doc" + ] + }, + { + "login": "Simran-B", + "name": "Simran", + "avatar_url": "https://avatars3.githubusercontent.com/u/7819991?v=4", + "profile": "https://www.arangodb.com/", + ] + }, + { + "login": "Ruth", + "name": "Ruth", + "avatar_url": "https://avatars0.githubusercontent.com/u/85029?v=4", + "profile": "https://github.com/ruth", + "contributions": [ + "content" + ] + }, + { + "login": "wi5nia", + "name": "Tomasz Wisniewski", + "avatar_url": "https://avatars2.githubusercontent.com/u/12593852?v=4", + "profile": "http://tomaszwisniewski.com", + "contributions": [ + "doc" + ] + }, + { + "login": "chiedo", + "name": "Chiedo John", + "avatar_url": "https://avatars2.githubusercontent.com/u/2156688?v=4", + "profile": "https://chiedojohn.com/", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, @@ -294,4 +365,4 @@ "repoHost": "https://github.com", "skipCi": true, "commitConvention": "none" -} \ No newline at end of file +} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bebc3f7218c9..eb71a6edef7a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,3 +14,7 @@ package-lock.json @github/docs-engineering package.json @github/docs-engineering /content/github/site-policy/ @github/site-policy-admins + +# Make sure that Octokit maintainers get notified about changes +# relevant to the Octokit libraries (https://github.com/octokit) +/content/rest/reference @github/octokit-maintainers diff --git a/.github/allowed-actions.js b/.github/allowed-actions.js index f9ce4ab37005..66c06473dce2 100644 --- a/.github/allowed-actions.js +++ b/.github/allowed-actions.js @@ -8,6 +8,7 @@ module.exports = [ 'actions/cache@v2', 'actions/checkout@v2', 'actions/github-script@0.9.0', + 'actions/github-script@v2.0.0', 'actions/github-script@v2', 'actions/github-script@v3', 'actions/labeler@v2', @@ -22,11 +23,14 @@ module.exports = [ 'juliangruber/approve-pull-request-action@v1', 'juliangruber/find-pull-request-action@v1', 'juliangruber/read-file-action@v1', - 'pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a', + 'pascalgn/automerge-action@c9bd182', 'peter-evans/create-issue-from-file@v2', 'peter-evans/create-pull-request@v2', + 'rachmari/actions-add-new-issue-to-column@v1.1.1', + 'rachmari/labeler@v1.0.4', 'repo-sync/github-sync@v2', 'repo-sync/pull-request@v2', 'rtCamp/action-slack-notify@master', - 'rtCamp/action-slack-notify@v2.1.0' -] \ No newline at end of file + 'rtCamp/action-slack-notify@v2.1.0', + 'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0' +] diff --git a/.github/workflows/automerge-dependencies.yml b/.github/workflows/automerge-dependencies.yml new file mode 100644 index 000000000000..9650706fce12 --- /dev/null +++ b/.github/workflows/automerge-dependencies.yml @@ -0,0 +1,14 @@ +name: Auto Merge Dependency Updates + +on: + - pull_request + - pull_request_review + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + allowed-actors: dependabot[bot] diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index be58649fc820..a581bfb68fe3 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -20,18 +20,17 @@ on: jobs: automerge: runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'automerge') + if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash') steps: - name: automerge - uses: "pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a" + uses: "pascalgn/automerge-action@c9bd182" env: GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}" - MERGE_LABELS: "automerge" - MERGE_REMOVE_LABELS: "" + MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash" MERGE_COMMIT_MESSAGE: "pull-request-title" MERGE_METHOD: "merge" MERGE_FORKS: "true" MERGE_RETRIES: "50" - MERGE_RETRY_SLEEP: "10000" - UPDATE_LABELS: "automerge" + MERGE_RETRY_SLEEP: "10000" # ten seconds + UPDATE_LABELS: "automerge,autosquash" UPDATE_METHOD: "merge" diff --git a/.github/workflows/autosquash.yml b/.github/workflows/autosquash.yml deleted file mode 100644 index 2ff83b152fc2..000000000000 --- a/.github/workflows/autosquash.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: autosquash -on: - pull_request: - types: - - labeled - - unlabeled - - synchronize - - opened - - edited - - ready_for_review - - reopened - - unlocked - pull_request_review: - types: - - submitted - check_suite: - types: - - completed - status: {} -jobs: - automerge: - runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'autosquash') - steps: - - name: autosquash - uses: "pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a" - env: - GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}" - MERGE_LABELS: "autosquash" - MERGE_REMOVE_LABELS: "" - MERGE_COMMIT_MESSAGE: "pull-request-title" - MERGE_METHOD: "squash" - MERGE_FORKS: "true" - MERGE_RETRIES: "50" - MERGE_RETRY_SLEEP: "10000" - UPDATE_LABELS: "automerge" - UPDATE_METHOD: "merge" diff --git a/.github/workflows/merged-notification.yml b/.github/workflows/merged-notification.yml index 7cc62bc58b4a..2251541a639e 100644 --- a/.github/workflows/merged-notification.yml +++ b/.github/workflows/merged-notification.yml @@ -13,11 +13,7 @@ jobs: github.issues.createComment({ ...context.repo, issue_number: context.payload.pull_request.number, - body: `Thanks very much for contributing! Your pull request has been merged ๐ŸŽ‰ You should see your changes appear on the site in approximately 24 hours. To add your โœจ contribution to the README.md, create a new comment in this PR with: - - ``` - @all-contributors please add @${context.payload.pull_request.user.login} for docs - ``` - - If you want to, you can use the [emoji key](https://allcontributors.org/docs/en/emoji-key) to replace docs with a different contribution type.` + body: `Thanks very much for contributing! Your pull request has been merged ๐ŸŽ‰ You should see your changes appear on the site in approximately 24 hours. + + If you haven't already, you can add yourself to [the list of contributors](https://github.com/github/docs#contributors-) by creating a new comment in this PR using [these instructions](https://allcontributors.org/docs/en/bot/usage#commands). Thanks again! :sparkles:` }) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 000000000000..861e37239f22 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,47 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/start-new-engineering-pr-workflow.yml b/.github/workflows/start-new-engineering-pr-workflow.yml index 29f076d5044f..03d75ccda9e8 100644 --- a/.github/workflows/start-new-engineering-pr-workflow.yml +++ b/.github/workflows/start-new-engineering-pr-workflow.yml @@ -6,7 +6,6 @@ on: jobs: triage: - if: github.repository == 'github/docs-internal' runs-on: ubuntu-latest continue-on-error: true env: @@ -15,6 +14,7 @@ jobs: steps: - name: uses: actions/github-script@v2 + continue-on-error: true with: github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }} script: | diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 649df7a1c31a..f2d845b30e23 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -3,6 +3,7 @@ name: Node.js Tests - Windows on: + workflow_dispatch: schedule: - cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST @@ -11,7 +12,6 @@ env: jobs: lint: - if: github.repository == 'github/docs-internal' runs-on: windows-latest steps: - name: Check out repo @@ -45,7 +45,6 @@ jobs: run: npm run check-deps test: - if: github.repository == 'github/docs-internal' runs-on: windows-latest strategy: fail-fast: false diff --git a/.github/workflows/triage-issue-comments.yml b/.github/workflows/triage-issue-comments.yml index f14b7128e77a..ac1e4494134c 100644 --- a/.github/workflows/triage-issue-comments.yml +++ b/.github/workflows/triage-issue-comments.yml @@ -33,13 +33,13 @@ jobs: return 'false' } - name: Label issues with new comments with 'triage' - uses: andymckay/labeler@1.0.2 + uses: rachmari/labeler@v1.0.4 if: (steps.is-internal-contributor.outputs.result == 'false') with: repo-token: "${{ secrets.GITHUB_TOKEN }}" add-labels: "triage" - name: Triage to project board - uses: konradpabjan/actions-add-new-issue-to-column@v1.1 + uses: rachmari/actions-add-new-issue-to-column@v1.1.1 with: action-token: ${{ secrets.GITHUB_TOKEN }} project-url: "https://github.com/github/docs/projects/1" diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml index 070f59891ce5..6bf0888eec6e 100644 --- a/.github/workflows/triage-issues.yml +++ b/.github/workflows/triage-issues.yml @@ -10,12 +10,12 @@ jobs: steps: - name: Label new issues with 'triage' - uses: andymckay/labeler@1.0.2 + uses: rachmari/labeler@v1.0.4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" add-labels: "triage" - name: Triage to project board - uses: konradpabjan/actions-add-new-issue-to-column@v1.1 + uses: rachmari/actions-add-new-issue-to-column@v1.1.1 with: action-token: ${{ secrets.GITHUB_TOKEN }} project-url: "https://github.com/github/docs/projects/1" diff --git a/.github/workflows/triage-pull-requests.yml b/.github/workflows/triage-pull-requests.yml index 71d6d343dab7..778d6a111071 100644 --- a/.github/workflows/triage-pull-requests.yml +++ b/.github/workflows/triage-pull-requests.yml @@ -4,18 +4,18 @@ on: types: [reopened, opened] jobs: - triage_issues: + triage_pulls: if: github.repository == 'github/docs' runs-on: ubuntu-latest steps: - name: Label new pull requests with 'triage' - uses: andymckay/labeler@1.0.2 + uses: rachmari/labeler@v1.0.4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" add-labels: "triage" - name: Triage to project board - uses: konradpabjan/actions-add-new-issue-to-column@v1.1 + uses: rachmari/actions-add-new-issue-to-column@v1.1.1 with: action-token: ${{ secrets.GITHUB_TOKEN }} project-url: "https://github.com/github/docs/projects/1" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a15ad19a29c..673610d48848 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ Fork using the command line: ### Make your update: Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository). - Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md). - - Are you contributing to markdown? We use [GitHub Markdown](contributing/content-markup-reference). + - Are you contributing to markdown? We use [GitHub Markdown](contributing/content-markup-reference.md). ### Open a pull request When you're done making changes and you'd like to propose them for review, use the [pull request template](#pull-request-template) to open your PR (pull request). @@ -63,8 +63,6 @@ Now that you're a part of the GitHub Docs community, you can keep participating - [Starting with an issue](#starting-with-an-issue) - [Labels](#labels) - [Opening a pull request](#opening-a-pull-request) - - [Fork using GitHub Desktop](#fork-using-github-desktop) - - [Fork using the command line](#fork-using-the-command-line) - [Working in the github/docs repository](#working-in-the-githubdocs-repository) - [Resolving merge conflicts](#resolving-merge-conflicts) - [In the GitHub user interface](#in-the-github-user-interface) @@ -156,7 +154,7 @@ You should always review your own PR first. For content changes, make sure that you: - [ ] Confirm that the changes address every part of the content strategy plan from your issue (if there are differences, explain them). - [ ] Review the content for technical accuracy. -- [ ] Review the entire pull request using the [localization checklist](contribution/localization-checklist.md). +- [ ] Review the entire pull request using the [localization checklist](contributing/localization-checklist.md). - [ ] Copy-edit the changes for grammar, spelling, and adherence to the style guide. - [ ] Check new or updated Liquid statements to confirm that versioning is correct. - [ ] Check that all of your changes render correctly in staging. Remember, that lists and tables can be tricky. diff --git a/LICENSE b/LICENSE index b50625eb6394..9238c8f93880 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,386 @@ -MIT License - -Copyright (c) 2020 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the โ€œLicensor.โ€ The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSE-CODE b/LICENSE-CODE new file mode 100644 index 000000000000..b50625eb6394 --- /dev/null +++ b/LICENSE-CODE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index b0d43312450d..6f1b4d644c0c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## GitHub Docs -This repository contains the documentation website code and Markdown source files for docs.github.com. +This repository contains the documentation website code and Markdown source files for [docs.github.com](https://docs.github.com). GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo. @@ -26,6 +26,10 @@ As you're using the GitHub Docs, you may find something in an article that you'd If you've found a problem, you can open an issue using a [template](https://github.com/github/docs/issues/new/choose). +#### Solve an issue + +If you have a solution to one of the open issues, you will need to fork the repository and submit a PR using the [template](https://github.com/github/docs/blob/main/CONTRIBUTING.md#pull-request-template) that is visible automatically in the pull request body. For more details about this process, please check out [Getting Started with Contributing](/CONTRIBUTING.md). + #### Join us in discussions We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions). @@ -61,9 +65,9 @@ In addition to the README you're reading right now, this repo includes other REA ## License -The GitHub product documentation in the assets, content, and data folders are licensed under a [CC-BY license](content/LICENSE). +The GitHub product documentation in the assets, content, and data folders are licensed under a [CC-BY license](LICENSE). -All other code in this repository is licensed under a [MIT license](LICENSE). +All other code in this repository is licensed under a [MIT license](LICENSE-CODE). When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos). @@ -111,10 +115,29 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Vanessa Yuen

๐Ÿ› ๐Ÿ’ป
Zeke Sikelianos

๐Ÿ› ๐Ÿ’ป + +
Benjamin Nickolls

๐Ÿ“– +
Jeff McAffer

๐Ÿ“– +
Tom Jenkinson

๐Ÿ’ป +
Arthur Casals

๐Ÿ–‹ ๐Ÿ“– +
Ruth

๐Ÿ–‹ +
Tomasz Wisniewski

๐Ÿ“– +
Chiedo John

๐Ÿ’ป + + +
Benjamin Nickolls

๐Ÿ“– +
Jeff McAffer

๐Ÿ“– +
Tom Jenkinson

๐Ÿ’ป +
Arthur Casals

๐Ÿ–‹ ๐Ÿ“– +
Simran

๐Ÿ“– +
Ruth

๐Ÿ–‹ +
Tomasz Wisniewski

๐Ÿ“– + + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/assets/images/commit-workflow-file.png b/assets/images/commit-workflow-file.png index 3a358304b718..d17769ff418c 100644 Binary files a/assets/images/commit-workflow-file.png and b/assets/images/commit-workflow-file.png differ diff --git a/assets/images/contribution_cta.png b/assets/images/contribution_cta.png index 59bb7374de13..eb02fe6ca354 100644 Binary files a/assets/images/contribution_cta.png and b/assets/images/contribution_cta.png differ diff --git a/assets/images/help/branch/branch-rename-edit.png b/assets/images/help/branch/branch-rename-edit.png index 72862bdcb270..7f21862c390a 100644 Binary files a/assets/images/help/branch/branch-rename-edit.png and b/assets/images/help/branch/branch-rename-edit.png differ diff --git a/assets/images/help/branch/branch-rename-rename.png b/assets/images/help/branch/branch-rename-rename.png index 1f5bef6f809c..5d870c27a012 100644 Binary files a/assets/images/help/branch/branch-rename-rename.png and b/assets/images/help/branch/branch-rename-rename.png differ diff --git a/assets/images/help/branch/branch-rename-type.png b/assets/images/help/branch/branch-rename-type.png index 1265f6674e75..cac66ee45bf4 100644 Binary files a/assets/images/help/branch/branch-rename-type.png and b/assets/images/help/branch/branch-rename-type.png differ diff --git a/assets/images/help/business-accounts/billing-license-info.png b/assets/images/help/business-accounts/billing-license-info.png index 2e3c119f948b..a5c10f33ddca 100644 Binary files a/assets/images/help/business-accounts/billing-license-info.png and b/assets/images/help/business-accounts/billing-license-info.png differ diff --git a/assets/images/help/codespaces/connect-to-github-codespaces-preview-feature.png b/assets/images/help/codespaces/connect-to-github-codespaces-preview-feature.png index 54fa46956f5c..7c3be5c4b01a 100644 Binary files a/assets/images/help/codespaces/connect-to-github-codespaces-preview-feature.png and b/assets/images/help/codespaces/connect-to-github-codespaces-preview-feature.png differ diff --git a/assets/images/help/codespaces/visual-studio-codespace-details.png b/assets/images/help/codespaces/visual-studio-codespace-details.png index 33da0db17f63..302cd1ce3ec6 100644 Binary files a/assets/images/help/codespaces/visual-studio-codespace-details.png and b/assets/images/help/codespaces/visual-studio-codespace-details.png differ diff --git a/assets/images/help/codespaces/visual-studio-connect-codespace.png b/assets/images/help/codespaces/visual-studio-connect-codespace.png index 3181a5ae6c88..db365d24fc72 100644 Binary files a/assets/images/help/codespaces/visual-studio-connect-codespace.png and b/assets/images/help/codespaces/visual-studio-connect-codespace.png differ diff --git a/assets/images/help/codespaces/visual-studio-eshoponweb-codespace.png b/assets/images/help/codespaces/visual-studio-eshoponweb-codespace.png index 3f1a7f288a87..ada5429ebf20 100644 Binary files a/assets/images/help/codespaces/visual-studio-eshoponweb-codespace.png and b/assets/images/help/codespaces/visual-studio-eshoponweb-codespace.png differ diff --git a/assets/images/help/codespaces/visual-studio-file-connect-to-codespace.png b/assets/images/help/codespaces/visual-studio-file-connect-to-codespace.png index 16d85ebfcfb5..f8286d970344 100644 Binary files a/assets/images/help/codespaces/visual-studio-file-connect-to-codespace.png and b/assets/images/help/codespaces/visual-studio-file-connect-to-codespace.png differ diff --git a/assets/images/help/codespaces/visual-studio-sign-in-to-github.png b/assets/images/help/codespaces/visual-studio-sign-in-to-github.png index 75d86ead8c0f..f88108965cb9 100644 Binary files a/assets/images/help/codespaces/visual-studio-sign-in-to-github.png and b/assets/images/help/codespaces/visual-studio-sign-in-to-github.png differ diff --git a/assets/images/help/codespaces/visual-studio-start-window.png b/assets/images/help/codespaces/visual-studio-start-window.png index a17388e15bb3..55d9d29bc2b2 100644 Binary files a/assets/images/help/codespaces/visual-studio-start-window.png and b/assets/images/help/codespaces/visual-studio-start-window.png differ diff --git a/assets/images/help/enterprises/administrators-pending.png b/assets/images/help/enterprises/administrators-pending.png index 72fc8bf6a433..5461fa840c60 100644 Binary files a/assets/images/help/enterprises/administrators-pending.png and b/assets/images/help/enterprises/administrators-pending.png differ diff --git a/assets/images/help/enterprises/members-pending.png b/assets/images/help/enterprises/members-pending.png index 8717cd130703..30fca5396547 100644 Binary files a/assets/images/help/enterprises/members-pending.png and b/assets/images/help/enterprises/members-pending.png differ diff --git a/assets/images/help/enterprises/your-enterprises-list.png b/assets/images/help/enterprises/your-enterprises-list.png index a30d5a8b31fc..4229f6fd0933 100644 Binary files a/assets/images/help/enterprises/your-enterprises-list.png and b/assets/images/help/enterprises/your-enterprises-list.png differ diff --git a/assets/images/help/enterprises/your-enterprises.png b/assets/images/help/enterprises/your-enterprises.png index 39010150b4c2..6b9339836c04 100644 Binary files a/assets/images/help/enterprises/your-enterprises.png and b/assets/images/help/enterprises/your-enterprises.png differ diff --git a/assets/images/help/images/learn-github-actions-repository.png b/assets/images/help/images/learn-github-actions-repository.png index 75efec19ed65..2ecc7d126de1 100644 Binary files a/assets/images/help/images/learn-github-actions-repository.png and b/assets/images/help/images/learn-github-actions-repository.png differ diff --git a/assets/images/help/images/learn-github-actions-run.png b/assets/images/help/images/learn-github-actions-run.png index 0ab2b6f5770f..f2bc2ff7cb83 100644 Binary files a/assets/images/help/images/learn-github-actions-run.png and b/assets/images/help/images/learn-github-actions-run.png differ diff --git a/assets/images/help/images/learn-github-actions-workflow.png b/assets/images/help/images/learn-github-actions-workflow.png index 5966062104c3..df9eba64d40a 100644 Binary files a/assets/images/help/images/learn-github-actions-workflow.png and b/assets/images/help/images/learn-github-actions-workflow.png differ diff --git a/assets/images/help/images/overview-actions-design.png b/assets/images/help/images/overview-actions-design.png index 4e844ddf3bf4..67ed2a6d8b29 100644 Binary files a/assets/images/help/images/overview-actions-design.png and b/assets/images/help/images/overview-actions-design.png differ diff --git a/assets/images/help/images/overview-actions-event.png b/assets/images/help/images/overview-actions-event.png index 7f632c016f7f..fe837bf2f301 100644 Binary files a/assets/images/help/images/overview-actions-event.png and b/assets/images/help/images/overview-actions-event.png differ diff --git a/assets/images/help/images/overview-actions-result.png b/assets/images/help/images/overview-actions-result.png index 43026f1fbe7e..d469642450f7 100644 Binary files a/assets/images/help/images/overview-actions-result.png and b/assets/images/help/images/overview-actions-result.png differ diff --git a/assets/images/help/images/overview-actions-simple.png b/assets/images/help/images/overview-actions-simple.png index 421e790f646f..b468bbd80ed4 100644 Binary files a/assets/images/help/images/overview-actions-simple.png and b/assets/images/help/images/overview-actions-simple.png differ diff --git a/assets/images/help/organizations/actions-policy-allow-list.png b/assets/images/help/organizations/actions-policy-allow-list.png index 0acf374032b3..4783ef62b607 100644 Binary files a/assets/images/help/organizations/actions-policy-allow-list.png and b/assets/images/help/organizations/actions-policy-allow-list.png differ diff --git a/assets/images/help/organizations/actions-policy.png b/assets/images/help/organizations/actions-policy.png index ef2c6c507168..a88ca70a35ca 100644 Binary files a/assets/images/help/organizations/actions-policy.png and b/assets/images/help/organizations/actions-policy.png differ diff --git a/assets/images/help/organizations/enterprise-actions-policy-allow-list.png b/assets/images/help/organizations/enterprise-actions-policy-allow-list.png index 3eadd8452f78..a6d29fe3bff3 100644 Binary files a/assets/images/help/organizations/enterprise-actions-policy-allow-list.png and b/assets/images/help/organizations/enterprise-actions-policy-allow-list.png differ diff --git a/assets/images/help/organizations/enterprise-actions-policy.png b/assets/images/help/organizations/enterprise-actions-policy.png index c59c2d4930b1..edb2fa913797 100644 Binary files a/assets/images/help/organizations/enterprise-actions-policy.png and b/assets/images/help/organizations/enterprise-actions-policy.png differ diff --git a/assets/images/help/organizations/org-settings-pages-disable-publication-checkbox.png b/assets/images/help/organizations/org-settings-pages-disable-publication-checkbox.png index 2a3b984e63cd..66359c006431 100644 Binary files a/assets/images/help/organizations/org-settings-pages-disable-publication-checkbox.png and b/assets/images/help/organizations/org-settings-pages-disable-publication-checkbox.png differ diff --git a/assets/images/help/organizations/org-settings-pages-disable-publication-save-button.png b/assets/images/help/organizations/org-settings-pages-disable-publication-save-button.png index 037c5504784c..9f63bff9053c 100644 Binary files a/assets/images/help/organizations/org-settings-pages-disable-publication-save-button.png and b/assets/images/help/organizations/org-settings-pages-disable-publication-save-button.png differ diff --git a/assets/images/help/repository/actions-delete-artifact.png b/assets/images/help/repository/actions-delete-artifact.png index c461f3bbeb73..7f8d11549269 100644 Binary files a/assets/images/help/repository/actions-delete-artifact.png and b/assets/images/help/repository/actions-delete-artifact.png differ diff --git a/assets/images/help/repository/actions-disable-workflow.png b/assets/images/help/repository/actions-disable-workflow.png index 1e45776a9a03..c62f19e9b3a2 100644 Binary files a/assets/images/help/repository/actions-disable-workflow.png and b/assets/images/help/repository/actions-disable-workflow.png differ diff --git a/assets/images/help/repository/actions-enable-workflow.png b/assets/images/help/repository/actions-enable-workflow.png index 3d356e4fe120..ab79895ce42b 100644 Binary files a/assets/images/help/repository/actions-enable-workflow.png and b/assets/images/help/repository/actions-enable-workflow.png differ diff --git a/assets/images/help/repository/actions-find-disabled-workflow.png b/assets/images/help/repository/actions-find-disabled-workflow.png index 131c910e6133..a1b5ea4fdec1 100644 Binary files a/assets/images/help/repository/actions-find-disabled-workflow.png and b/assets/images/help/repository/actions-find-disabled-workflow.png differ diff --git a/assets/images/help/repository/actions-policy-allow-list.png b/assets/images/help/repository/actions-policy-allow-list.png index a06ae226b4d6..9ae09297eb86 100644 Binary files a/assets/images/help/repository/actions-policy-allow-list.png and b/assets/images/help/repository/actions-policy-allow-list.png differ diff --git a/assets/images/help/repository/actions-policy.png b/assets/images/help/repository/actions-policy.png index c29cd3b832d8..69d1a9ca4107 100644 Binary files a/assets/images/help/repository/actions-policy.png and b/assets/images/help/repository/actions-policy.png differ diff --git a/assets/images/help/repository/actions-select-disabled-workflow.png b/assets/images/help/repository/actions-select-disabled-workflow.png index 2f274fed70f5..78fcaf652faf 100644 Binary files a/assets/images/help/repository/actions-select-disabled-workflow.png and b/assets/images/help/repository/actions-select-disabled-workflow.png differ diff --git a/assets/images/help/repository/actions-workflow-menu-kebab.png b/assets/images/help/repository/actions-workflow-menu-kebab.png index fc7876a6e6f0..823514d35cb6 100644 Binary files a/assets/images/help/repository/actions-workflow-menu-kebab.png and b/assets/images/help/repository/actions-workflow-menu-kebab.png differ diff --git a/assets/images/help/repository/artifact-drop-down.png b/assets/images/help/repository/artifact-drop-down.png index cf12247c4c56..8ea00c17b946 100644 Binary files a/assets/images/help/repository/artifact-drop-down.png and b/assets/images/help/repository/artifact-drop-down.png differ diff --git a/assets/images/help/repository/cancel-check-suite.png b/assets/images/help/repository/cancel-check-suite.png index cf6513c04f13..3db1bbaadeb7 100644 Binary files a/assets/images/help/repository/cancel-check-suite.png and b/assets/images/help/repository/cancel-check-suite.png differ diff --git a/assets/images/help/repository/code-scanning-actions-list.png b/assets/images/help/repository/code-scanning-actions-list.png index 04446c8c97a2..cbd7cb8bb929 100644 Binary files a/assets/images/help/repository/code-scanning-actions-list.png and b/assets/images/help/repository/code-scanning-actions-list.png differ diff --git a/assets/images/help/repository/code-scanning-alert-close-drop-down.png b/assets/images/help/repository/code-scanning-alert-close-drop-down.png index a8356bb7e282..92ee682e1c21 100644 Binary files a/assets/images/help/repository/code-scanning-alert-close-drop-down.png and b/assets/images/help/repository/code-scanning-alert-close-drop-down.png differ diff --git a/assets/images/help/repository/code-scanning-alert.png b/assets/images/help/repository/code-scanning-alert.png index 07c156777d4a..f2a5b70715fc 100644 Binary files a/assets/images/help/repository/code-scanning-alert.png and b/assets/images/help/repository/code-scanning-alert.png differ diff --git a/assets/images/help/repository/code-scanning-alerts-found-link.png b/assets/images/help/repository/code-scanning-alerts-found-link.png index b72d268f23e7..3f6622117c18 100644 Binary files a/assets/images/help/repository/code-scanning-alerts-found-link.png and b/assets/images/help/repository/code-scanning-alerts-found-link.png differ diff --git a/assets/images/help/repository/code-scanning-branch-dropdown.png b/assets/images/help/repository/code-scanning-branch-dropdown.png index 91db8bdd1847..d7c7e8914a9a 100644 Binary files a/assets/images/help/repository/code-scanning-branch-dropdown.png and b/assets/images/help/repository/code-scanning-branch-dropdown.png differ diff --git a/assets/images/help/repository/code-scanning-check-failure.png b/assets/images/help/repository/code-scanning-check-failure.png index 46488c5bb39f..ec3a5b2928c2 100644 Binary files a/assets/images/help/repository/code-scanning-check-failure.png and b/assets/images/help/repository/code-scanning-check-failure.png differ diff --git a/assets/images/help/repository/code-scanning-click-alert.png b/assets/images/help/repository/code-scanning-click-alert.png index fc9f29a2c686..fb52df3b16b2 100644 Binary files a/assets/images/help/repository/code-scanning-click-alert.png and b/assets/images/help/repository/code-scanning-click-alert.png differ diff --git a/assets/images/help/repository/code-scanning-logging-analyze-action.png b/assets/images/help/repository/code-scanning-logging-analyze-action.png index 2ce67716e207..d18c217e6479 100644 Binary files a/assets/images/help/repository/code-scanning-logging-analyze-action.png and b/assets/images/help/repository/code-scanning-logging-analyze-action.png differ diff --git a/assets/images/help/repository/code-scanning-missing-analysis.png b/assets/images/help/repository/code-scanning-missing-analysis.png index 026134a7d93a..38b9d5b1e612 100644 Binary files a/assets/images/help/repository/code-scanning-missing-analysis.png and b/assets/images/help/repository/code-scanning-missing-analysis.png differ diff --git a/assets/images/help/repository/code-scanning-pr-alert.png b/assets/images/help/repository/code-scanning-pr-alert.png index e7057845ce8f..df30d24ae8eb 100644 Binary files a/assets/images/help/repository/code-scanning-pr-alert.png and b/assets/images/help/repository/code-scanning-pr-alert.png differ diff --git a/assets/images/help/repository/code-scanning-pr-annotation.png b/assets/images/help/repository/code-scanning-pr-annotation.png index fc15573141ea..400f1c049de7 100644 Binary files a/assets/images/help/repository/code-scanning-pr-annotation.png and b/assets/images/help/repository/code-scanning-pr-annotation.png differ diff --git a/assets/images/help/repository/code-scanning-pr-checks.png b/assets/images/help/repository/code-scanning-pr-checks.png index bb2045ac2f8b..cb001e0d2d43 100644 Binary files a/assets/images/help/repository/code-scanning-pr-checks.png and b/assets/images/help/repository/code-scanning-pr-checks.png differ diff --git a/assets/images/help/repository/code-scanning-set-up-this-workflow.png b/assets/images/help/repository/code-scanning-set-up-this-workflow.png index f2b0af3b1190..655cbb9d3bd8 100644 Binary files a/assets/images/help/repository/code-scanning-set-up-this-workflow.png and b/assets/images/help/repository/code-scanning-set-up-this-workflow.png differ diff --git a/assets/images/help/repository/code-scanning-show-paths.png b/assets/images/help/repository/code-scanning-show-paths.png index 67a0cd5db690..6829ef0e7f7e 100644 Binary files a/assets/images/help/repository/code-scanning-show-paths.png and b/assets/images/help/repository/code-scanning-show-paths.png differ diff --git a/assets/images/help/repository/delete-all-logs.png b/assets/images/help/repository/delete-all-logs.png index 5e9046b4da27..dc609c5cd062 100644 Binary files a/assets/images/help/repository/delete-all-logs.png and b/assets/images/help/repository/delete-all-logs.png differ diff --git a/assets/images/help/repository/download-logs-drop-down.png b/assets/images/help/repository/download-logs-drop-down.png index cebea7f16fa7..dbba06095b0b 100644 Binary files a/assets/images/help/repository/download-logs-drop-down.png and b/assets/images/help/repository/download-logs-drop-down.png differ diff --git a/assets/images/help/repository/https-url-clone-cli.png b/assets/images/help/repository/https-url-clone-cli.png index 2a75b97ac34d..c456ca5075e5 100644 Binary files a/assets/images/help/repository/https-url-clone-cli.png and b/assets/images/help/repository/https-url-clone-cli.png differ diff --git a/assets/images/help/repository/repository-options-branch.png b/assets/images/help/repository/repository-options-branch.png index edd292327ef0..6dd4b77af3ec 100644 Binary files a/assets/images/help/repository/repository-options-branch.png and b/assets/images/help/repository/repository-options-branch.png differ diff --git a/assets/images/help/repository/repository-options-defaultbranch-change.png b/assets/images/help/repository/repository-options-defaultbranch-change.png index 03fcd0d1f7bb..8fe9624a6997 100644 Binary files a/assets/images/help/repository/repository-options-defaultbranch-change.png and b/assets/images/help/repository/repository-options-defaultbranch-change.png differ diff --git a/assets/images/help/repository/repository-options-defaultbranch-drop-down.png b/assets/images/help/repository/repository-options-defaultbranch-drop-down.png index d03ff4b17c14..82600a01712a 100644 Binary files a/assets/images/help/repository/repository-options-defaultbranch-drop-down.png and b/assets/images/help/repository/repository-options-defaultbranch-drop-down.png differ diff --git a/assets/images/help/repository/repository-options-defaultbranch-i-understand.png b/assets/images/help/repository/repository-options-defaultbranch-i-understand.png index ee7ba995adee..7f5793f92c99 100644 Binary files a/assets/images/help/repository/repository-options-defaultbranch-i-understand.png and b/assets/images/help/repository/repository-options-defaultbranch-i-understand.png differ diff --git a/assets/images/help/repository/repository-options-defaultbranch-update.png b/assets/images/help/repository/repository-options-defaultbranch-update.png index b6c948174ea8..1b2b15f909ce 100644 Binary files a/assets/images/help/repository/repository-options-defaultbranch-update.png and b/assets/images/help/repository/repository-options-defaultbranch-update.png differ diff --git a/assets/images/help/repository/rerun-checks-drop-down.png b/assets/images/help/repository/rerun-checks-drop-down.png index e23d91fa477a..3aa271bba265 100644 Binary files a/assets/images/help/repository/rerun-checks-drop-down.png and b/assets/images/help/repository/rerun-checks-drop-down.png differ diff --git a/assets/images/help/repository/run-name.png b/assets/images/help/repository/run-name.png index 2f8313adb847..5398fbc6aac9 100644 Binary files a/assets/images/help/repository/run-name.png and b/assets/images/help/repository/run-name.png differ diff --git a/assets/images/help/repository/super-linter-workflow-results.png b/assets/images/help/repository/super-linter-workflow-results.png index 2823fd5f7593..fd99dbeb670a 100644 Binary files a/assets/images/help/repository/super-linter-workflow-results.png and b/assets/images/help/repository/super-linter-workflow-results.png differ diff --git a/assets/images/help/repository/superlinter-lint-code-base-job.png b/assets/images/help/repository/superlinter-lint-code-base-job.png index 11829cef240a..b24c3c06b7f9 100644 Binary files a/assets/images/help/repository/superlinter-lint-code-base-job.png and b/assets/images/help/repository/superlinter-lint-code-base-job.png differ diff --git a/assets/images/help/repository/superlinter-run-name.png b/assets/images/help/repository/superlinter-run-name.png index 7a9413df60e4..7e5fdfd4fdbe 100644 Binary files a/assets/images/help/repository/superlinter-run-name.png and b/assets/images/help/repository/superlinter-run-name.png differ diff --git a/assets/images/help/repository/superlinter-workflow-sidebar.png b/assets/images/help/repository/superlinter-workflow-sidebar.png index 0593891c41c1..d120147e0964 100644 Binary files a/assets/images/help/repository/superlinter-workflow-sidebar.png and b/assets/images/help/repository/superlinter-workflow-sidebar.png differ diff --git a/assets/images/help/repository/view-run-billable-time.png b/assets/images/help/repository/view-run-billable-time.png index 4f6b38ad9a98..9f1b8643f928 100644 Binary files a/assets/images/help/repository/view-run-billable-time.png and b/assets/images/help/repository/view-run-billable-time.png differ diff --git a/assets/images/help/repository/workflow-job.png b/assets/images/help/repository/workflow-job.png index 920e17bde662..65ecd382930a 100644 Binary files a/assets/images/help/repository/workflow-job.png and b/assets/images/help/repository/workflow-job.png differ diff --git a/assets/images/help/repository/workflow-run-kebab-horizontal-icon.png b/assets/images/help/repository/workflow-run-kebab-horizontal-icon.png index 117c87659a27..b35c5fa6ab0f 100644 Binary files a/assets/images/help/repository/workflow-run-kebab-horizontal-icon.png and b/assets/images/help/repository/workflow-run-kebab-horizontal-icon.png differ diff --git a/assets/images/help/repository/workflow-sidebar.png b/assets/images/help/repository/workflow-sidebar.png index c9421ba6cf3a..4888815882c9 100644 Binary files a/assets/images/help/repository/workflow-sidebar.png and b/assets/images/help/repository/workflow-sidebar.png differ diff --git a/assets/images/help/settings/settings-sidebar-ssh-keys.png b/assets/images/help/settings/settings-sidebar-ssh-keys.png index 1ad509a2cf4e..1a52c894b2c8 100644 Binary files a/assets/images/help/settings/settings-sidebar-ssh-keys.png and b/assets/images/help/settings/settings-sidebar-ssh-keys.png differ diff --git a/assets/images/help/settings/settings-ssh-key-review.png b/assets/images/help/settings/settings-ssh-key-review.png index 765c760227ac..1c6c5f278336 100644 Binary files a/assets/images/help/settings/settings-ssh-key-review.png and b/assets/images/help/settings/settings-ssh-key-review.png differ diff --git a/assets/images/help/settings/ssh-sso-authorize.png b/assets/images/help/settings/ssh-sso-authorize.png index 45fda14956eb..a9bb79aee511 100644 Binary files a/assets/images/help/settings/ssh-sso-authorize.png and b/assets/images/help/settings/ssh-sso-authorize.png differ diff --git a/assets/images/help/settings/ssh-sso-button.png b/assets/images/help/settings/ssh-sso-button.png index 61bdbcd4e07d..314c9585a75b 100644 Binary files a/assets/images/help/settings/ssh-sso-button.png and b/assets/images/help/settings/ssh-sso-button.png differ diff --git a/assets/images/help/settings/userbar-account-settings.png b/assets/images/help/settings/userbar-account-settings.png index 8594e68400b1..aa4ddfcee842 100644 Binary files a/assets/images/help/settings/userbar-account-settings.png and b/assets/images/help/settings/userbar-account-settings.png differ diff --git a/assets/images/octocat-books.png b/assets/images/octocat-books.png index 1586da406746..6ef8e109c76f 100644 Binary files a/assets/images/octocat-books.png and b/assets/images/octocat-books.png differ diff --git a/content/LICENSE b/content/LICENSE deleted file mode 100644 index 9238c8f93880..000000000000 --- a/content/LICENSE +++ /dev/null @@ -1,386 +0,0 @@ -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the โ€œLicensor.โ€ The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/content/actions/guides/caching-dependencies-to-speed-up-workflows.md b/content/actions/guides/caching-dependencies-to-speed-up-workflows.md index 36c25cb0946d..497bcad57e58 100644 --- a/content/actions/guides/caching-dependencies-to-speed-up-workflows.md +++ b/content/actions/guides/caching-dependencies-to-speed-up-workflows.md @@ -184,8 +184,8 @@ For example, if a pull request contains a `feature` branch (the current scope) a 1. Key `npm-feature-` in the `feature` branch scope 2. Key `npm-` in the `feature` branch scope 1. Key `npm-feature-d5ea0750` in the `main` branch scope -3. Key `npm-d5ea0750` in the `main` branch scope -4. Key `npm` in the `main` branch scope +3. Key `npm-feature-` in the `main` branch scope +4. Key `npm-` in the `main` branch scope ### Usage limits and eviction policy diff --git a/content/actions/guides/storing-workflow-data-as-artifacts.md b/content/actions/guides/storing-workflow-data-as-artifacts.md index 6da23f063a6d..a069551e1333 100644 --- a/content/actions/guides/storing-workflow-data-as-artifacts.md +++ b/content/actions/guides/storing-workflow-data-as-artifacts.md @@ -18,7 +18,9 @@ versions: ### About workflow artifacts -Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. For pushes and pull requests, {% data variables.product.product_name %} stores artifacts for 90 days. The retention period for a pull request restarts each time someone pushes a new commit to the pull request. +Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. + +{% data reusables.github-actions.artifact-log-retention-statement %} The retention period for a pull request restarts each time someone pushes a new commit to the pull request. These are some of the common artifacts that you can upload: @@ -48,89 +50,6 @@ To share data between jobs: The steps of a job share the same environment on the runner machine, but run in their own individual processes. To pass data between steps in a job, you can use inputs and outputs. For more information about inputs and outputs, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions)." -### Passing data between jobs in a workflow - -You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% if currentVersion == "free-pro-team@latest" %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.product_location %}{% endif %}. - -Jobs that are dependent on a previous job's artifacts must wait for the dependent job to complete successfully. This workflow uses the `needs` keyword to ensure that `job_1`, `job_2`, and `job_3` run sequentially. For example, `job_2` requires `job_1` using the `needs: job_1` syntax. - -Job 1 performs these steps: -- Performs a math calculation and saves the result to a text file called `math-homework.txt`. -- Uses the `upload-artifact` action to upload the `math-homework.txt` file with the name `homework`. The action places the file in a directory named `homework`. - -Job 2 uses the result in the previous job: -- Downloads the `homework` artifact uploaded in the previous job. By default, the `download-artifact` action downloads artifacts to the workspace directory that the step is executing in. You can use the `path` input parameter to specify a different download directory. -- Reads the value in the `homework/math-homework.txt` file, performs a math calculation, and saves the result to `math-homework.txt`. -- Uploads the `math-homework.txt` file. This upload overwrites the previous upload because both of the uploads share the same name. - -Job 3 displays the result uploaded in the previous job: -- Downloads the `homework` artifact. -- Prints the result of the math equation to the log. - -The full math operation performed in this workflow example is `(3 + 7) x 9 = 90`. - -```yaml -name: Share data between jobs - -on: [push] - -jobs: - job_1: - name: Add 3 and 7 - runs-on: ubuntu-latest - steps: - - shell: bash - run: | - expr 3 + 7 > math-homework.txt - - name: Upload math result for job 1 - uses: actions/upload-artifact@v2 - with: - name: homework - path: math-homework.txt - - job_2: - name: Multiply by 9 - needs: job_1 - runs-on: windows-latest - steps: - - name: Download math result for job 1 - uses: actions/download-artifact@v2 - with: - name: homework - - shell: bash - run: | - value=`cat math-homework.txt` - expr $value \* 9 > math-homework.txt - - name: Upload math result for job 2 - uses: actions/upload-artifact@v2 - with: - name: homework - path: math-homework.txt - - job_3: - name: Display results - needs: job_2 - runs-on: macOS-latest - steps: - - name: Download math result for job 2 - uses: actions/download-artifact@v2 - with: - name: homework - - name: Print the final result - shell: bash - run: | - value=`cat math-homework.txt` - echo The result is $value -``` - -![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow.png) - -### Sharing data between workflow runs - -After a workflow ends, you can download a compressed file of the uploaded artifacts on {% data variables.product.product_name %} by finding the workflow run in the **Actions** tab. You can also use the {% data variables.product.prodname_dotcom %} REST API to download artifacts. For more information, see "[Artifacts](/v3/actions/artifacts/)." - -If you need to access artifacts from a previous workflow run, you can use the {% data variables.product.product_name %} REST API to retrieve artifacts. For more information, see "[Get an artifact](/rest/reference/actions#artifacts)." - ### Uploading build and test artifacts You can create a continuous integration (CI) workflow to build and test your code. For more information about using {% data variables.product.prodname_actions %} to perform CI, see "[About continuous integration](/articles/about-continuous-integration)." @@ -191,13 +110,32 @@ jobs: ![Image of workflow upload artifact workflow run](/assets/images/help/repository/upload-build-test-artifact.png) +{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} +### Configuring a custom artifact retention period + +You can define a custom retention period for individual artifacts created by a workflow. When using a workflow to create a new artifact, you can use `retention-days` with the `upload-artifact` action. This example demonstrates how to set a custom retention period of 5 days for the artifact named `my-artifact`: + +``` + - name: 'Upload Artifact' + uses: actions/upload-artifact@v2 + with: + name: my-artifact + path: my_file.txt + retention-days: 5 +``` + +The `retention-days` value cannot exceed the retention limit set by the repository, organization, or enterprise. +{% endif %} + ### Downloading or deleting artifacts -During a workflow run, you can download artifacts that were previously uploaded in the same workflow run. After a workflow run has been completed, you can download or delete artifacts on GitHub using the workflow run history. +During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact)action to download artifacts that were previously uploaded in the same workflow run. + +After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)," "[Removing workflow artifacts](/actions/managing-workflow-runs/removing-workflow-artifacts)," and the "[Artifacts REST API](/v3/actions/artifacts/)." #### Downloading artifacts during a workflow run -The [actions/download-artifact](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run. +The [`actions/download-artifact`](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run. {% note %} @@ -225,24 +163,82 @@ If you download all a workflow run's artifacts, a directory for each artifact is For more information on syntax, see the {% if currentVersion == "free-pro-team@latest" %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.product.product_location %}{% endif %}. -#### Downloading and deleting artifacts after a workflow run is complete +### Passing data between jobs in a workflow + +You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% if currentVersion == "free-pro-team@latest" %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.product_location %}{% endif %}. + +Jobs that are dependent on a previous job's artifacts must wait for the dependent job to complete successfully. This workflow uses the `needs` keyword to ensure that `job_1`, `job_2`, and `job_3` run sequentially. For example, `job_2` requires `job_1` using the `needs: job_1` syntax. + +Job 1 performs these steps: +- Performs a math calculation and saves the result to a text file called `math-homework.txt`. +- Uses the `upload-artifact` action to upload the `math-homework.txt` file with the name `homework`. The action places the file in a directory named `homework`. + +Job 2 uses the result in the previous job: +- Downloads the `homework` artifact uploaded in the previous job. By default, the `download-artifact` action downloads artifacts to the workspace directory that the step is executing in. You can use the `path` input parameter to specify a different download directory. +- Reads the value in the `homework/math-homework.txt` file, performs a math calculation, and saves the result to `math-homework.txt`. +- Uploads the `math-homework.txt` file. This upload overwrites the previous upload because both of the uploads share the same name. + +Job 3 displays the result uploaded in the previous job: +- Downloads the `homework` artifact. +- Prints the result of the math equation to the log. + +The full math operation performed in this workflow example is `(3 + 7) x 9 = 90`. + +```yaml +name: Share data between jobs -Artifacts automatically expire after 90 days, but you can always reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}. +on: [push] -{% warning %} +jobs: + job_1: + name: Add 3 and 7 + runs-on: ubuntu-latest + steps: + - shell: bash + run: | + expr 3 + 7 > math-homework.txt + - name: Upload math result for job 1 + uses: actions/upload-artifact@v2 + with: + name: homework + path: math-homework.txt -**Warning:** Once you delete an artifact, it can not be restored. + job_2: + name: Multiply by 9 + needs: job_1 + runs-on: windows-latest + steps: + - name: Download math result for job 1 + uses: actions/download-artifact@v2 + with: + name: homework + - shell: bash + run: | + value=`cat math-homework.txt` + expr $value \* 9 > math-homework.txt + - name: Upload math result for job 2 + uses: actions/upload-artifact@v2 + with: + name: homework + path: math-homework.txt -{% endwarning %} + job_3: + name: Display results + needs: job_2 + runs-on: macOS-latest + steps: + - name: Download math result for job 2 + uses: actions/download-artifact@v2 + with: + name: homework + - name: Print the final result + shell: bash + run: | + value=`cat math-homework.txt` + echo The result is $value +``` -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -1. To download artifacts, use the **Artifacts** drop-down menu, and select the artifact you want to download. - ![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down.png) -1. To delete artifacts, use the **Artifacts** drop-down menu, and click {% octicon "trashcan" aria-label="The trashcan icon" %}. - ![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact.png) +![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow.png) {% if currentVersion == "free-pro-team@latest" %} diff --git a/content/actions/learn-github-actions/index.md b/content/actions/learn-github-actions/index.md index 9329c5bac2e2..8bc97d038f8e 100644 --- a/content/actions/learn-github-actions/index.md +++ b/content/actions/learn-github-actions/index.md @@ -37,5 +37,6 @@ versions: {% link_with_intro /sharing-workflows-with-your-organization %} {% link_with_intro /security-hardening-for-github-actions %} {% link_with_intro /migrating-from-circleci-to-github-actions %} +{% link_with_intro /migrating-from-gitlab-cicd-to-github-actions %} {% link_with_intro /migrating-from-azure-pipelines-to-github-actions %} {% link_with_intro /migrating-from-jenkins-to-github-actions %} diff --git a/content/actions/learn-github-actions/managing-complex-workflows.md b/content/actions/learn-github-actions/managing-complex-workflows.md index 5c9601e87ad9..38e7e68e94cd 100644 --- a/content/actions/learn-github-actions/managing-complex-workflows.md +++ b/content/actions/learn-github-actions/managing-complex-workflows.md @@ -20,6 +20,7 @@ If your workflows use sensitive data, such as passwords or certificates, you can This example action demonstrates how to reference an existing secret as an environment variable, and send it as a parameter to an example command. +{% raw %} ```yaml jobs: example-job: @@ -30,6 +31,7 @@ jobs: run: | example-command "$SUPER_SECRET" ``` +{% endraw %} For more information, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)." @@ -62,6 +64,7 @@ For more information, see [`jobs..needs`](/actions/reference/workflow-sy You can use a build matrix if you want your workflow to run tests across multiple combinations of operating systems, platforms, and languages. The build matrix is created using the `strategy` keyword, which receives the build options as an array. For example, this build matrix will run the job multiple times, using different versions of Node.js: +{% raw %} ```yaml jobs: build: @@ -74,6 +77,7 @@ jobs: with: node-version: ${{ matrix.node }} ``` +{% endraw %} For more information, see [`jobs..strategy.matrix`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix). @@ -83,6 +87,7 @@ For more information, see [`jobs..strategy.matrix`](/actions/reference/w This example demonstrates how to cache the ` ~/.npm` directory: +{% raw %} ```yaml jobs: example-job: @@ -97,6 +102,7 @@ jobs: restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ``` +{% endraw %} For more information, see "[Caching dependencies to speed up workflows](/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)." diff --git a/content/actions/learn-github-actions/migrating-from-gitlab-cicd-to-github-actions.md b/content/actions/learn-github-actions/migrating-from-gitlab-cicd-to-github-actions.md new file mode 100644 index 000000000000..873144e8fe04 --- /dev/null +++ b/content/actions/learn-github-actions/migrating-from-gitlab-cicd-to-github-actions.md @@ -0,0 +1,476 @@ +--- +title: Migrating from GitLab CI/CD to GitHub Actions +intro: '{% data variables.product.prodname_actions %} and GitLab CI/CD share several configuration similarities, which makes migrating to {% data variables.product.prodname_actions %} relatively straightforward.' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} + +### Introduction + +GitLab CI/CD and {% data variables.product.prodname_actions %} both allow you to create workflows that automatically build, test, publish, release, and deploy code. GitLab CI/CD and {% data variables.product.prodname_actions %} share some similarities in workflow configuration: + +- Workflow configuration files are written in YAML and are stored in the code's repository. +- Workflows include one or more jobs. +- Jobs include one or more steps or individual commands. +- Jobs can run on either managed or self-hosted machines. + +There are a few differences, and this guide will show you the important differences so that you can migrate your workflow to {% data variables.product.prodname_actions %}. + +### Jobs + +Jobs in GitLab CI/CD are very similar to jobs in {% data variables.product.prodname_actions %}. In both systems, jobs have the following characteristics: + +* Jobs contain a series of steps or scripts that run sequentially. +* Jobs can run on separate machines or in separate containers. +* Jobs run in parallel by default, but can be configured to run sequentially. + +You can run a script or a shell command in a job. In GitLab CI/CD, script steps are specified using the `script` key. In {% data variables.product.prodname_actions %}, all scripts are specified using the `run` key. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +job1: + variables: + GIT_CHECKOUT: "true" + script: + - echo "Run your script here" +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + job1: + steps: + - uses: actions/checkout@v2 + - run: echo "Run your script here" +``` +{% endraw %} +
+ +### Runners + +Runners are machines on which the jobs run. Both GitLab CI/CD and {% data variables.product.prodname_actions %} offer managed and self-hosted variants of runners. In GitLab CI/CD, `tags` are used to run jobs on different platforms, while in {% data variables.product.prodname_actions %} it is done with the `runs-on` key. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +windows_job: + tags: + - windows + script: + - echo Hello, %USERNAME%! + +linux_job: + tags: + - linux + script: + - echo "Hello, $USER!" +``` +{% endraw %} + +{% raw %} +```yaml +windows_job: + runs-on : windows-latest + steps: + - run: echo Hello, %USERNAME%! + +linux_job: + runs-on: ubuntu-latest + steps: + - run: echo "Hello, $USER!" +``` +{% endraw %} +
+ +For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)." + +### Docker images + +Both GitLab CI/CD and {% data variables.product.prodname_actions %} support running jobs in a Docker image. In GitLab CI/CD, Docker images are defined with a `image` key, while in {% data variables.product.prodname_actions %} it is done with the `container` key. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +my_job: + image: node:10.16-jessie +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + my_job: + container: node:10.16-jessie +``` +{% endraw %} +
+ +For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer)." + +### Condition and expression syntax + +GitLab CI/CD uses `rules` to determine if a job will run for a specific condition. {% data variables.product.prodname_actions %} uses the `if` keyword to prevent a job from running unless a condition is met. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +deploy_prod: + stage: deploy + script: + - echo "Deply to production server" + rules: + - if: '$CI_COMMIT_BRANCH == "master"' +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + deploy_prod: + if: contains( github.ref, 'master') + runs-on: ubuntu-latest + steps: + - run: echo "Deply to production server" +``` +{% endraw %} +
+ +For more information, see "[Context and expression syntax for {% data variables.product.prodname_actions %}](/actions/reference/context-and-expression-syntax-for-github-actions)." + +### Dependencies between Jobs + +Both GitLab CI/CD and {% data variables.product.prodname_actions %} allow you to set dependencies for a job. In both systems, jobs run in parallel by default, but job dependencies in {% data variables.product.prodname_actions %} can be specified explicitly with the `needs` key. GitLab CI/CD also has a concept of `stages`, where jobs in a stage run concurrently, but the next stage will start when all the jobs in the previous stage have completed. You can recreate this scenario in {% data variables.product.prodname_actions %} with the `needs` key. + +Below is an example of the syntax for each system. The workflows start with two jobs named `build_a` and `build_b` running in parallel, and when those jobs complete, another job called `test_ab` will run. Finally, when `test_ab` completes, the `deploy_ab` job will run. + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +stages: + - build + - test + - deploy + +build_a: + stage: build + script: + - echo "This job will run first." + +build_b: + stage: build + script: + - echo "This job will run first, in parallel with build_a." + +test_ab: + stage: test + script: + - echo "This job will run after build_a and build_b have finished." + +deploy_ab: + stage: deploy + script: + - echo "This job will run after test_ab is complete" +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + build_a: + runs-on: ubuntu-latest + steps: + - run: echo "This job will be run first." + + build_b: + runs-on: ubuntu-latest + steps: + - run: echo "This job will be run first, in parallel with build_a" + + test_ab: + runs-on: ubuntu-latest + needs: [build_a,build_b] + steps: + - run: echo "This job will run after build_a and build_b have finished" + + deploy_ab: + runs-on: ubuntu-latest + needs: [test_ab] + steps: + - run: echo "This job will run after test_ab is complete" +``` +{% endraw %} +
+ +For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds)." + +### Scheduling workflows + +Both GitLab CI/CD and {% data variables.product.prodname_actions %} allow you to run workflows at a specific interval. In GitLab CI/CD, pipeline schedules are configured with the UI, while in {% data variables.product.prodname_actions %} you can trigger a workflow on a scheduled interval with the "on" key. + +For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#scheduled-events)." + +### Variables and secrets + +GitLab CI/CD and {% data variables.product.prodname_actions %} support setting environment variables in the pipeline or workflow configuration file, and creating secrets using the GitLab or {% data variables.product.product_name %} UI. + +For more information, see "[Environment variables](/actions/reference/environment-variables)" and "[Encrypted secrets](/actions/reference/encrypted-secrets)." + +### Caching + +GitLab CI/CD and {% data variables.product.prodname_actions %} provide a method in the configuration file to manually cache workflow files. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +image: node:latest + +cache: + key: $CI_COMMIT_REF_SLUG + paths: + - .npm/ + +before_script: + - npm ci --cache .npm --prefer-offline + +test_async: + script: + - node ./specs/start.js ./specs/async.spec.js +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + test_async: + - name: Cache node modules + uses: actions/cache@v2 + with: + path: ~/.npm + key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }} + restore-keys: v1-npm-deps- +``` +{% endraw %} +
+ +For more information, see "[Caching dependencies to speed up workflows](/actions/guides/caching-dependencies-to-speed-up-workflows)." + +### Artifacts + +Both GitLab CI/CD and {% data variables.product.prodname_actions %} can upload files and directories created by a job as artifacts. In {% data variables.product.prodname_actions %}, artifacts can be used to persist data across multiple jobs. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +script: +artifacts: + paths: + - math-homework.txt +``` +{% endraw %} + +{% raw %} +```yaml +- name: Upload math result for job 1 + uses: actions/upload-artifact@v2 + with: + name: homework + path: math-homework.txt +``` +{% endraw %} +
+ +For more information, see "[Storing workflow data as artifacts](/actions/guides/storing-workflow-data-as-artifacts)." + +### Databases and service containers + +Both systems enable you to include additional containers for databases, caching, or other dependencies. + +In GitLab CI/CD, a container for the job is specified with the `image` key, while {% data variables.product.prodname_actions %} uses the `container` key. In both systems, additional service containers are specified with the `services` key. + +Below is an example of the syntax for each system: + + + + + + + + + + +
+GitLab CI/CD + +{% data variables.product.prodname_actions %} +
+{% raw %} +```yaml +container-job: + variables: + POSTGRES_PASSWORD: postgres + # The hostname used to communicate with the + # PostgreSQL service container + POSTGRES_HOST: postgres + # The default PostgreSQL port + POSTGRES_PORT: 5432 + image: node:10.18-jessie + services: + - postgres + script: + # Performs a clean installation of all dependencies + # in the `package.json` file + - npm ci + # Runs a script that creates a PostgreSQL client, + # populates the client with data, and retrieves data + - node client.js + tags: + - docker +``` +{% endraw %} + +{% raw %} +```yaml +jobs: + container-job: + runs-on: ubuntu-latest + container: node:10.18-jessie + + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + # Performs a clean installation of all dependencies + # in the `package.json` file + - name: Install dependencies + run: npm ci + + - name: Connect to PostgreSQL + # Runs a script that creates a PostgreSQL client, + # populates the client with data, and retrieves data + run: node client.js + env: + # The hostname used to communicate with the + # PostgreSQL service container + POSTGRES_HOST: postgres + # The default PostgreSQL port + POSTGRES_PORT: 5432 +``` +{% endraw %} +
+ +For more information, see "[About service containers](/actions/guides/about-service-containers)." diff --git a/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md b/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md index 167b74d4aa42..d7c662b90dba 100644 --- a/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md +++ b/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md @@ -33,7 +33,7 @@ For more information, see "[Core concepts for {% data variables.product.prodname Jenkins lets you send builds to a single build agent, or you can distribute them across multiple agents. You can also classify these agents according to various attributes, such as operating system types. -Similiarly, {% data variables.product.prodname_actions %} can send jobs to {% data variables.product.prodname_dotcom %}-hosted or self-hosted runners, and you can use labels to classify runners according to various attributes. The following table compares how the distributed build concept is implemented for both Jenkins and {% data variables.product.prodname_actions %}. +Similarly, {% data variables.product.prodname_actions %} can send jobs to {% data variables.product.prodname_dotcom %}-hosted or self-hosted runners, and you can use labels to classify runners according to various attributes. The following table compares how the distributed build concept is implemented for both Jenkins and {% data variables.product.prodname_actions %}. | Jenkins | {% data variables.product.prodname_actions %} | | ------------- | ------------- | @@ -41,7 +41,7 @@ Similiarly, {% data variables.product.prodname_actions %} can send jobs to {% da #### Using sections to organize pipelines -Jenkins splits its Declarative Pipelines into multiple sections. Similiarly, {% data variables.product.prodname_actions %} organizes its workflows into separate sections. The table below compares Jenkins sections with the {% data variables.product.prodname_actions %} workflow. +Jenkins splits its Declarative Pipelines into multiple sections. Similarly, {% data variables.product.prodname_actions %} organizes its workflows into separate sections. The table below compares Jenkins sections with the {% data variables.product.prodname_actions %} workflow. |Jenkins Directives | {% data variables.product.prodname_actions %} | | ------------- | ------------- | diff --git a/content/actions/managing-workflow-runs/downloading-workflow-artifacts.md b/content/actions/managing-workflow-runs/downloading-workflow-artifacts.md index 5b64e0af0d8e..22d5651efe6e 100644 --- a/content/actions/managing-workflow-runs/downloading-workflow-artifacts.md +++ b/content/actions/managing-workflow-runs/downloading-workflow-artifacts.md @@ -1,6 +1,6 @@ --- title: Downloading workflow artifacts -intro: You can download artifacts that were archived during a workflow run. Artifacts automatically expire after 90 days. +intro: You can download archived artifacts before they automatically expire. product: '{% data reusables.gated-features.actions %}' versions: free-pro-team: '*' @@ -10,6 +10,9 @@ versions: {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} +{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} By default, {% data variables.product.product_name %} stores build logs and artifacts for 90 days, and you can customize this retention period, depending on the type of repository. For more information, see "[Configuring the retention period for GitHub Actions artifacts and logs in your repository](/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository)."{% endif %} +{% if currentVersion == "enterprise-server@2.22" %} {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.{% endif %} + {% data reusables.repositories.permissions-statement-read %} {% data reusables.repositories.navigate-to-repo %} diff --git a/content/actions/managing-workflow-runs/removing-workflow-artifacts.md b/content/actions/managing-workflow-runs/removing-workflow-artifacts.md index c0ed87a4b83a..32eb4e4cbba2 100644 --- a/content/actions/managing-workflow-runs/removing-workflow-artifacts.md +++ b/content/actions/managing-workflow-runs/removing-workflow-artifacts.md @@ -1,6 +1,6 @@ --- title: Removing workflow artifacts -intro: 'Artifacts automatically expire after 90 days, but you can always reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}.' +intro: 'You can reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}.' product: '{% data reusables.gated-features.actions %}' versions: free-pro-team: '*' @@ -10,6 +10,8 @@ versions: {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} +### Deleting an artifact + {% warning %} **Warning:** Once you delete an artifact, it can not be restored. @@ -18,9 +20,23 @@ versions: {% data reusables.repositories.permissions-statement-write %} +{% data reusables.github-actions.artifact-log-retention-statement %} + {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} 1. Under **Artifacts**, click {% octicon "trashcan" aria-label="The trashcan icon" %} next to the artifact you want to remove. ![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact.png) + +{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} +### Setting the retention period for an artifact + +Retention periods for artifacts and logs can be configured at the repository, organization, and enterprise level. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy)." + +You can also define a custom retention period for individual artifacts using the `actions/upload-artifact` action in a workflow. For more information, see "[Storing workflow data as artifacts](/actions/guides/storing-workflow-data-as-artifacts#configuring-a-custom-artifact-retention-period)." + +### Finding the expiration date of an artifact + +You can use the API to confirm the date that an artifact is scheduled to be deleted. For more information, see the `expires_at` value returned by "[List artifacts for a repository](/rest/reference/actions#artifacts)." +{% endif %} \ No newline at end of file diff --git a/content/actions/managing-workflow-runs/using-workflow-run-logs.md b/content/actions/managing-workflow-runs/using-workflow-run-logs.md index 70bbe0b7ad59..34a54f88694b 100644 --- a/content/actions/managing-workflow-runs/using-workflow-run-logs.md +++ b/content/actions/managing-workflow-runs/using-workflow-run-logs.md @@ -1,6 +1,6 @@ --- title: Using workflow run logs -intro: 'You can view, search, and download the logs for each job in a workflow run. {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.' +intro: 'You can view, search, and download the logs for each job in a workflow run.' product: '{% data reusables.gated-features.actions %}' versions: free-pro-team: '*' diff --git a/content/actions/reference/context-and-expression-syntax-for-github-actions.md b/content/actions/reference/context-and-expression-syntax-for-github-actions.md index a33f7f34e6ca..8c86fb1bb5f5 100644 --- a/content/actions/reference/context-and-expression-syntax-for-github-actions.md +++ b/content/actions/reference/context-and-expression-syntax-for-github-actions.md @@ -84,24 +84,24 @@ The `github` context contains information about the workflow run and the event t | Property name | Type | Description | |---------------|------|-------------| | `github` | `object` | The top-level context available during any job or step in a workflow. | +| `github.action` | `string` | The name of the action currently running. {% data variables.product.prodname_dotcom %} removes special characters or uses the name `run` when the current step runs a script. If you use the same action more than once in the same job, the name will include a suffix with the sequence number. For example, the first script you run will have the name `run1`, and the second script will be named `run2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. | +| `github.action_path` | `string` | The path where your action is located. You can use this path to easily access files located in the same repository as your action. This attribute is only supported in composite run steps actions. | +| `github.actor` | `string` | The login of the user that initiated the workflow run. | +| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. | | `github.event` | `object` | The full event webhook payload. For more information, see "[Events that trigger workflows](/articles/events-that-trigger-workflows/)." You can access individual properties of the event using this context. | +| `github.event_name` | `string` | The name of the event that triggered the workflow run. | | `github.event_path` | `string` | The path to the full event webhook payload on the runner. | -| `github.workflow` | `string` | The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository. | +| `github.head_ref` | `string` | The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. | | `github.job` | `string` | The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. | -| `github.run_id` | `string` | {% data reusables.github-actions.run_id_description %} | -| `github.run_number` | `string` | {% data reusables.github-actions.run_number_description %} | -| `github.actor` | `string` | The login of the user that initiated the workflow run. | +| `github.ref` | `string` | The branch or tag ref that triggered the workflow run. | | `github.repository` | `string` | The owner and repository name. For example, `Codertocat/Hello-World`. | | `github.repository_owner` | `string` | The repository owner's name. For example, `Codertocat`. | -| `github.event_name` | `string` | The name of the event that triggered the workflow run. | +| `github.run_id` | `string` | {% data reusables.github-actions.run_id_description %} | +| `github.run_number` | `string` | {% data reusables.github-actions.run_number_description %} | | `github.sha` | `string` | The commit SHA that triggered the workflow run. | -| `github.ref` | `string` | The branch or tag ref that triggered the workflow run. | -| `github.head_ref` | `string` | The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. | -| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is a `pull_request`. | | `github.token` | `string` | A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)." | +| `github.workflow` | `string` | The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository. | | `github.workspace` | `string` | The default working directory for steps and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. | -| `github.action` | `string` | The name of the action currently running. {% data variables.product.prodname_dotcom %} removes special characters or uses the name `run` when the current step runs a script. If you use the same action more than once in the same job, the name will include a suffix with the sequence number. For example, the first script you run will have the name `run1`, and the second script will be named `run2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. | -| `github.action_path` | `string` | The path where your action is located. You can use this path to easily access files located in the same repository as your action. This attribute is only supported in composite run steps actions. #### **`env` context** @@ -124,14 +124,14 @@ The `job` context contains information about the currently running job. | Property name | Type | Description | |---------------|------|-------------| | `job` | `object` | This context changes for each job in a workflow run. You can access this context from any step in a job. | -| `job.status` | `string` | The current status of the job. Possible values are `success`, `failure`, or `cancelled`. | | `job.container` | `object` | Information about the job's container. For more information about containers, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#jobsjob_idcontainer)." | -| `job.container.network` | `string` | The id of the container network. The runner creates the network used by all containers in a job. | | `job.container.id` | `string` | The id of the container. | +| `job.container.network` | `string` | The id of the container network. The runner creates the network used by all containers in a job. | | `job.services` | `object` | The service containers created for a job. For more information about service containers, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#jobsjob_idservices)." | | `job.services..id` | `string` | The id of the service container. | -| `job.services..ports` | `object` | The exposed ports of the service container. | | `job.services..network` | `string` | The id of the service container network. The runner creates the network used by all containers in a job. | +| `job.services..ports` | `object` | The exposed ports of the service container. | +| `job.status` | `string` | The current status of the job. Possible values are `success`, `failure`, or `cancelled`. | #### **`steps` context** @@ -141,9 +141,9 @@ The `steps` context contains information about the steps in the current job that |---------------|------|-------------| | `steps` | `object` | This context changes for each step in a job. You can access this context from any step in a job. | | `steps..outputs` | `object` | The set of outputs defined for the step. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs)." | -| `steps..outputs.` | `string` | The value of a specific output. | -| `steps..outcome` | `string` | The result of a completed step before [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. | | `steps..conclusion` | `string` | The result of a completed step after [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. | +| `steps..outcome` | `string` | The result of a completed step before [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) is applied. Possible values are `success`, `failure`, `cancelled`, or `skipped`. When a `continue-on-error` step fails, the `outcome` is `failure`, but the final `conclusion` is `success`. | +| `steps..outputs.` | `string` | The value of a specific output. | #### **`runner` context** @@ -162,9 +162,9 @@ The `needs` context contains outputs from all jobs that are defined as a depende | Property name | Type | Description | |---------------|------|-------------| | `needs.` | `object` | A single job that the current job depends on. | -| `needs..result` | `string` | The result of a job that the current job depends on. Possible values are `success`, `failure`, or `cancelled`. | | `needs..outputs` | `object` | The set of outputs of a job that the current job depends on. | | `needs..outputs.` | `string` | The value of a specific output for a job that the current job depends on. | +| `needs..result` | `string` | The result of a job that the current job depends on. Possible values are `success`, `failure`, or `cancelled`. | #### Example printing context information to the log file diff --git a/content/actions/reference/environment-variables.md b/content/actions/reference/environment-variables.md index 4ace66924b45..c8acb6a91c2a 100644 --- a/content/actions/reference/environment-variables.md +++ b/content/actions/reference/environment-variables.md @@ -49,7 +49,7 @@ We strongly recommend that actions use environment variables to access the files | `GITHUB_REPOSITORY` | The owner and repository name. For example, `octocat/Hello-World`. | | `GITHUB_EVENT_NAME` | The name of the webhook event that triggered the workflow. | | `GITHUB_EVENT_PATH` | The path of the file with the complete webhook event payload. For example, `/github/workflow/event.json`. | -| `GITHUB_WORKSPACE` | The {% data variables.product.prodname_dotcom %} workspace directory path. The workspace directory contains a subdirectory with a copy of your repository if your workflow uses the [actions/checkout](https://github.com/actions/checkout) action. If you don't use the `actions/checkout` action, the directory will be empty. For example, `/home/runner/work/my-repo-name/my-repo-name`. | +| `GITHUB_WORKSPACE` | The {% data variables.product.prodname_dotcom %} workspace directory path. The workspace directory is a copy of your repository if your workflow uses the [actions/checkout](https://github.com/actions/checkout) action. If you don't use the `actions/checkout` action, the directory will be empty. For example, `/home/runner/work/my-repo-name/my-repo-name`. | | `GITHUB_SHA` | The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`. | | `GITHUB_REF` | The branch or tag ref that triggered the workflow. For example, `refs/heads/feature-branch-1`. If neither a branch or tag is available for the event type, the variable will not exist. | | `GITHUB_HEAD_REF` | Only set for forked repositories. The branch of the head repository. diff --git a/content/actions/reference/usage-limits-billing-and-administration.md b/content/actions/reference/usage-limits-billing-and-administration.md index b76f9cb5415f..d457fd8ce1c0 100644 --- a/content/actions/reference/usage-limits-billing-and-administration.md +++ b/content/actions/reference/usage-limits-billing-and-administration.md @@ -53,6 +53,20 @@ Usage limits apply to self-hosted runners. For more information, see "[About sel In addition to the usage limits, you must ensure that you use {% data variables.product.prodname_actions %} within the [GitHub Terms of Service](/articles/github-terms-of-service/). For more information on {% data variables.product.prodname_actions %}-specific terms, see the [GitHub Additional Product Terms](/github/site-policy/github-additional-product-terms#a-actions-usage). {% endif %} +{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} +### Artifact and log retention policy + +You can configure the artifact and log retention period for your repository, organization, or enterprise account. + +{% data reusables.actions.about-artifact-log-retention %} + +For more information, see: + +- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your repository](/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository) +- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your organization](/github/setting-up-and-managing-organizations-and-teams/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization) +- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your enterprise](/github/setting-up-and-managing-your-enterprise-account/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account) +{% endif %} + ### Disabling or limiting {% data variables.product.prodname_actions %} for your repository or organization {% data reusables.github-actions.disabling-github-actions %} diff --git a/content/actions/reference/workflow-commands-for-github-actions.md b/content/actions/reference/workflow-commands-for-github-actions.md index e7c98d0f1155..c864487be949 100644 --- a/content/actions/reference/workflow-commands-for-github-actions.md +++ b/content/actions/reference/workflow-commands-for-github-actions.md @@ -234,7 +234,7 @@ During the execution of a workflow, the runner generates temporary files that ca ``` steps: - - run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 + - run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append ``` {% endwarning %} @@ -254,12 +254,12 @@ echo "action_state=yellow" >> $GITHUB_ENV Running `$action_state` in a future step will now return `yellow` #### Multline strings -For multiline strings, you may use a delimeter with the following syntax. +For multiline strings, you may use a delimiter with the following syntax. ``` -{name}<<{delimeter} +{name}<<{delimiter} {value} -{delimeter} +{delimiter} ``` #### Example diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 9b2cbd41cb7a..c473966194ac 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -595,11 +595,11 @@ You can override the default shell settings in the runner's operating system usi | Supported platform | `shell` parameter | Description | Command run internally | |--------------------|-------------------|-------------|------------------------| | All | `bash` | The default shell on non-Windows platforms with a fallback to `sh`. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. | `bash --noprofile --norc -eo pipefail {0}` | -| All | `pwsh` | The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command "& '{0}'"` | +| All | `pwsh` | The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command ". '{0}'"` | | All | `python` | Executes the python command. | `python {0}` | | Linux / macOS | `sh` | The fallback behavior for non-Windows platforms if no shell is provided and `bash` is not found in the path. | `sh -e {0}` | | Windows | `cmd` | {% data variables.product.prodname_dotcom %} appends the extension `.cmd` to your script name and substitutes for `{0}`. | `%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}""`. | -| Windows | `powershell` | This is the default shell used on Windows. The Desktop PowerShell. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command "& '{0}'"`. | +| Windows | `powershell` | This is the default shell used on Windows. The Desktop PowerShell. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command ". '{0}'"`. | ##### Example running a script using bash diff --git a/content/admin/authentication/using-ldap.md b/content/admin/authentication/using-ldap.md index 0f4cd6799e1c..795cf526d2aa 100644 --- a/content/admin/authentication/using-ldap.md +++ b/content/admin/authentication/using-ldap.md @@ -98,6 +98,12 @@ When this option is selected, the certificate is validated to make sure: #### Enabling LDAP Sync +{% note %} + +**Note:** Teams using LDAP Sync are limited to a maximum 1499 members. + +{% endnote %} + LDAP Sync lets you synchronize {% data variables.product.prodname_ghe_server %} users and team membership against your established LDAP groups. This lets you establish role-based access control for users from your LDAP server instead of manually within {% data variables.product.prodname_ghe_server %}. For more information, see "[Creating teams](/enterprise/{{ currentVersion }}/admin/guides/user-management/creating-teams#creating-teams-with-ldap-sync-enabled)." To enable LDAP Sync, in your LDAP settings, select **Synchronize Emails**, **Synchronize SSH Keys**, or **Synchronize GPG Keys** . diff --git a/content/admin/configuration/configuring-the-ip-address-using-the-virtual-machine-console.md b/content/admin/configuration/configuring-the-ip-address-using-the-virtual-machine-console.md index 55d8aad4267c..c8b25b42dcc7 100644 --- a/content/admin/configuration/configuring-the-ip-address-using-the-virtual-machine-console.md +++ b/content/admin/configuration/configuring-the-ip-address-using-the-virtual-machine-console.md @@ -8,9 +8,17 @@ versions: enterprise-server: '*' --- +{% note %} + +**Note:** We do not support adding additional network adapters to {% data variables.product.prodname_ghe_server %}. + +{% endnote %} + {% data reusables.enterprise_installation.open-vm-console-start %} 3. Choose to configure the `IPv4` or `IPv6` protocol. ![Options to choose the IPv4 or the IPv6 protocol](/assets/images/enterprise/network-configuration/IPv4-or-IPv6-protocol.png) 4. Configure options for the protocol you chose. ![Menu with IP protocol options](/assets/images/enterprise/network-configuration/network-settings-selection.png) {% data reusables.enterprise_installation.vm-console-done %} + + diff --git a/content/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access.md b/content/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access.md index 5b904f661c3b..c51ee1e49215 100644 --- a/content/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access.md +++ b/content/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access.md @@ -69,7 +69,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr path: ${{runner.tool_cache}}/tool_cache.tar.gz ``` {% endraw %} -1. Download the tool cache artifact from the workflow run. For instructions on downloading artifacts, see "[Persisting workflow data using artifacts](/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#downloading-and-deleting-artifacts-after-a-workflow-run-is-complete)." +1. Download the tool cache artifact from the workflow run. For instructions on downloading artifacts, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)." 1. Transfer the tool cache artifact to your self hosted runner and extract it to the local tool cache directory. The default tool cache directory is `RUNNER_DIR/_work/_tool`. If the runner hasn't processed any jobs yet, you might need to create the `_work/_tool` directories. After extracting the tool cache artifact uploaded in the above example, you should have a directory structure on your self-hosted runner that is similar to the following example: diff --git a/content/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository.md b/content/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository.md index 74377ac7f643..468edaaa1c74 100644 --- a/content/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository.md +++ b/content/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository.md @@ -35,9 +35,7 @@ You can filter email notifications you receive for pushes to a repository. For m ![Email address textbox](/assets/images/help/settings/email_services_addresses.png) 6. If you operate your own server, you can verify the integrity of emails via the **Secret** token. This token is sent with the email as the `Approved` header. If the `Approved` header matches the token you sent, you can trust that the email is from {% data variables.product.product_name %}. ![Email secret textbox](/assets/images/help/settings/email_services_token.png) -7. Optionally, select **Send from author** to have emails delivered using the committer's email address. Otherwise, emails are sent from {% data variables.notifications.no_reply_address %}. -![Email author checkbox](/assets/images/help/settings/email_services_author.png) -8. Click **Save settings**. +7. Click **Save settings**. ![Save settings button](/assets/images/help/settings/save_notification_settings.png) ### Further reading diff --git a/content/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository.md b/content/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository.md new file mode 100644 index 000000000000..c759845dad4e --- /dev/null +++ b/content/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository.md @@ -0,0 +1,18 @@ +--- +title: Configuring the retention period for GitHub Actions artifacts and logs in your repository +intro: 'You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository.' +versions: + free-pro-team: '*' + enterprise-server: '>=2.23' +--- + +{% data reusables.actions.about-artifact-log-retention %} + +You can also define a custom retention period for a specific artifact created by a workflow. For more information, see "[Setting the retention period for an artifact](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)." + +## Setting the retention period for a repository + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.sidebar-settings %} +{% data reusables.repositories.settings-sidebar-actions %} +{% data reusables.github-actions.change-retention-period-for-artifacts-logs %} diff --git a/content/github/administering-a-repository/index.md b/content/github/administering-a-repository/index.md index 4f4f78049203..74ba6512fb47 100644 --- a/content/github/administering-a-repository/index.md +++ b/content/github/administering-a-repository/index.md @@ -27,6 +27,7 @@ versions: {% link_in_list /managing-the-forking-policy-for-your-repository %} + {% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository %} {% link_in_list /disabling-or-limiting-github-actions-for-a-repository %} {% link_in_list /managing-git-lfs-objects-in-archives-of-your-repository %} {% link_in_list /enabling-anonymous-git-read-access-for-a-repository %} diff --git a/content/github/committing-changes-to-your-project/changing-a-commit-message.md b/content/github/committing-changes-to-your-project/changing-a-commit-message.md index 91ff84f7f158..7f55accc3eae 100644 --- a/content/github/committing-changes-to-your-project/changing-a-commit-message.md +++ b/content/github/committing-changes-to-your-project/changing-a-commit-message.md @@ -13,13 +13,9 @@ versions: You can change the most recent commit message using the `git commit --amend` command. -{% warning %} - In Git, the text of the commit message is part of the commit. Changing the commit message will change the commit ID--i.e., the SHA1 checksum that names the commit. Effectively, you are creating a new commit that replaces the old one. -{% endwarning %} - -#### Commit has not been pushed online +### Commit has not been pushed online If the commit only exists in your local repository and has not been pushed to {% data variables.product.product_location %}, you can amend the commit message with the `git commit --amend` command. @@ -39,7 +35,7 @@ You can change the default text editor for Git by changing the `core.editor` set {% endtip %} -#### Amending older or multiple commit messages +### Amending older or multiple commit messages If you have already pushed the commit to {% data variables.product.product_location %}, you will have to force push a commit with an amended message. @@ -49,7 +45,7 @@ We strongly discourage force pushing, since this changes the history of your rep {% endwarning %} -**Amending the message of the most recently pushed commit** +**Changing the message of the most recently pushed commit** 1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message. 2. Use the `push --force` command to force push over the old commit. @@ -57,7 +53,7 @@ We strongly discourage force pushing, since this changes the history of your rep $ git push --force example-branch ``` -**Amending the message of older or multiple commit messages** +**Changing the message of older or multiple commit messages** If you need to amend the message for multiple commits or an older commit, you can use interactive rebase, then force push to change the commit history. @@ -93,7 +89,6 @@ If you need to amend the message for multiple commits or an older commit, you ca # # Note that empty commits are commented out ``` - 3. Replace `pick` with `reword` before each commit message you want to change. ```shell pick e499d89 Delete CNAME @@ -102,10 +97,10 @@ If you need to amend the message for multiple commits or an older commit, you ca ``` 4. Save and close the commit list file. 5. In each resulting commit file, type the new commit message, save the file, and close it. -6. Force-push the amended commits. - ```shell - $ git push --force - ``` +6. When you're ready to push your changes to GitHub, use the push --force command to force push over the old commit. +```shell +$ git push --force example-branch +``` For more information on interactive rebase, see "[Interactive mode](https://git-scm.com/docs/git-rebase#_interactive_mode)" in the Git manual. diff --git a/content/github/creating-cloning-and-archiving-repositories/about-archiving-repositories.md b/content/github/creating-cloning-and-archiving-repositories/about-archiving-repositories.md index 3e78220ab3e5..9e87c1f42cf1 100644 --- a/content/github/creating-cloning-and-archiving-repositories/about-archiving-repositories.md +++ b/content/github/creating-cloning-and-archiving-repositories/about-archiving-repositories.md @@ -20,7 +20,7 @@ versions: Once a repository is archived, you cannot add or remove collaborators or teams. Contributors with access to the repository can only fork or star your project. -When a repository is archived, its issues, pull requests, code, labels, milestones, projects, wiki, releases, commits, tags, branches, reactions, and comments become read-only. To make changes in an archived repository, you must unarchive the repository first. +When a repository is archived, its issues, pull requests, code, labels, milestones, projects, wiki, releases, commits, tags, branches, reactions, code scanning alerts, and comments become read-only. To make changes in an archived repository, you must unarchive the repository first. You can search for archived repositories. For more information, see "[Searching for repositories](/articles/searching-for-repositories/#search-based-on-whether-a-repository-is-archived)." You can also search for issues and pull requests within archived repositories. For more information, see "[Searching issues and pull requests](/articles/searching-issues-and-pull-requests/#search-based-on-whether-a-repository-is-archived)." diff --git a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning-in-your-ci-system.md b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning-in-your-ci-system.md index 1565e21ed03b..ea3d32b11671 100644 --- a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning-in-your-ci-system.md +++ b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning-in-your-ci-system.md @@ -79,7 +79,7 @@ $ /path/to-runner/codeql-runner-linux init --config-file .github/codeql/codeql-c ### Configuring {% data variables.product.prodname_code_scanning %} for compiled languages -For the compiled languages C/C++, C#, and Java, {% data variables.product.prodname_codeql %} builds the code before analyzing it. In contrast to the other compiled languages, {% data variables.product.prodname_codeql %} analyzes Go without building the code. +For the compiled languages C/C++, C#, and Java, {% data variables.product.prodname_codeql %} builds the code before analyzing it. {% data reusables.code-scanning.analyze-go %} For many common build systems, the {% data variables.product.prodname_codeql_runner %} can build the code automatically. To attempt to build the code automatically, run `autobuild` between the `init` and `analyze` steps. Note that if your repository requires a specific version of a build tool, you may need to install the build tool manually first. diff --git a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md index 1209930f6ae2..24c2f828503c 100644 --- a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md +++ b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md @@ -222,7 +222,7 @@ You can quickly analyze small portions of a monorepo when you modify code in spe ### Configuring {% data variables.product.prodname_code_scanning %} for compiled languages -{% data reusables.code-scanning.autobuild-compiled-languages %} In contrast to the other compiled languages, CodeQL can successfully analyze Go without building the code. +{% data reusables.code-scanning.autobuild-compiled-languages %} {% data reusables.code-scanning.analyze-go %} {% data reusables.code-scanning.autobuild-add-build-steps %} For more information about how to configure {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} for compiled languages, see "[Configuring the {% data variables.product.prodname_codeql %} workflow for compiled languages](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages)." diff --git a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages.md b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages.md index d5e7d39bb665..62932f450f0d 100644 --- a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages.md +++ b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages.md @@ -24,7 +24,7 @@ For general information about configuring {% data variables.product.prodname_cod ### About autobuild for {% data variables.product.prodname_codeql %} -Code scanning works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository. For the compiled languages C/C++, C#, and Java, the process of populating this database involves building the code and extracting data. In contrast to the other compiled languages, CodeQL can generate a database for Go without building the code. +Code scanning works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository. For the compiled languages C/C++, C#, and Java, the process of populating this database involves building the code and extracting data. {% data reusables.code-scanning.analyze-go %} {% data reusables.code-scanning.autobuild-compiled-languages %} diff --git a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/running-code-scanning-in-your-ci-system.md b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/running-code-scanning-in-your-ci-system.md index 7f75a79ad252..ca6cebabd97b 100644 --- a/content/github/finding-security-vulnerabilities-and-errors-in-your-code/running-code-scanning-in-your-ci-system.md +++ b/content/github/finding-security-vulnerabilities-and-errors-in-your-code/running-code-scanning-in-your-ci-system.md @@ -39,9 +39,18 @@ chmod +x codeql-runner-macos sudo xattr -d com.apple.quarantine codeql-runner-macos ``` +On Windows, the `codeql-runner-win.exe` file usually requires no change to permissions. + ### Adding the {% data variables.product.prodname_codeql_runner %} to your CI system -Once you have downloaded the {% data variables.product.prodname_codeql_runner %} and verified that it can be executed, you should make the runner available to each CI server that you intend to use for {% data variables.product.prodname_code_scanning %}. In addition to this, each CI server also needs: +Once you have downloaded the {% data variables.product.prodname_codeql_runner %} and verified that it can be executed, you should make the runner available to each CI server that you intend to use for {% data variables.product.prodname_code_scanning %}. It is important to notice that each CI server that you intend to use for {% data variables.product.prodname_code_scanning %} needs to have the {% data variables.product.prodname_codeql_runner %}. You might configure each server to copy the runner from a central, internal location, or you could use the REST API to get the runner direct from GitHub, for example: + +```shell +wget https://github.com/github/codeql-action/releases/download/codeql-bundle-20200826/codeql-runner-linux +chmod +x codeql-runner-linux +``` + +In addition to this, each CI server also needs: - A {% data variables.product.prodname_github_apps %} or personal access token for the {% data variables.product.prodname_codeql_runner %} to use. For private repositories the token must have the `repo` scope. For public the token needs only the `public_repo` and `repo:security_events` scopes. For information, see "[Building {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps)" and "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)." - Access to the {% data variables.product.prodname_codeql %} bundle associated with this release of the {% data variables.product.prodname_codeql_runner %}. This package contains the {% data variables.product.prodname_codeql %} CLI, queries, and libraries needed for {% data variables.product.prodname_codeql %} analysis. For information, see "[{% data variables.product.prodname_codeql %} CLI](https://help.semmle.com/codeql/codeql-cli.html)." diff --git a/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md b/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md index ac8aa416a61c..a2caca65584c 100644 --- a/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md +++ b/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md @@ -86,7 +86,7 @@ versions: ``` 9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell - $ git push origin master + $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin ``` @@ -123,7 +123,7 @@ versions: ``` 9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell - $ git push origin master + $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin ``` diff --git a/content/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies.md b/content/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies.md index 73b8dce6840a..0ce617f2fdb2 100644 --- a/content/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies.md +++ b/content/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies.md @@ -77,15 +77,15 @@ We send security alerts to people with admin permissions in the affected reposit ### Configuring notifications for {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %}{% data variables.product.prodname_dependabot_alerts %}{% else %}security alerts{% endif %} {% if currentVersion == "free-pro-team@latest" %} -By default, you will receive {% data variables.product.prodname_dependabot_alerts %} by email, grouped by the specific vulnerability. You can also choose to receive {% data variables.product.prodname_dependabot_alerts %} in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-dependabot-alerts-options)." +By default, you will receive {% data variables.product.prodname_dependabot_alerts %} by email, grouped by the specific vulnerability. You can also choose to receive {% data variables.product.prodname_dependabot_alerts %} in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-dependabot-alerts-notification-options)." {% endif %} {% if currentVersion != "free-pro-team@latest" and currentVersion ver_gt "enterprise-server@2.21" %} -By default, if your site administrator has configured email for notifications on your instance, you will receive {% data variables.product.prodname_dependabot_alerts %} by email. You can also choose to receive {% data variables.product.prodname_dependabot_alerts %} in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-dependabot-alerts-options)." +By default, if your site administrator has configured email for notifications on your instance, you will receive {% data variables.product.prodname_dependabot_alerts %} by email. You can also choose to receive {% data variables.product.prodname_dependabot_alerts %} in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-dependabot-alerts-notification-options)." {% endif %} {% if currentVersion != "free-pro-team@latest" and currentVersion == "enterprise-server@2.21" %} -By default, if your site administrator has configured email for notifications on your instance, you will receive security alerts by email. You can also choose to receive security alerts in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#security-alert-options)." +By default, if your site administrator has configured email for notifications on your instance, you will receive security alerts by email. You can also choose to receive security alerts in a weekly email summarizing alerts for up to 10 of your repositories, in your web notifications, or in the {% data variables.product.product_name %} user interface. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#security-alert-notification-options)." {% endif %} {% if currentVersion != "free-pro-team@latest" and currentVersion ver_lt "enterprise-server@2.21" %} diff --git a/content/github/managing-subscriptions-and-notifications-on-github/configuring-notifications.md b/content/github/managing-subscriptions-and-notifications-on-github/configuring-notifications.md index 35e1284863d2..5c2b46dcb569 100644 --- a/content/github/managing-subscriptions-and-notifications-on-github/configuring-notifications.md +++ b/content/github/managing-subscriptions-and-notifications-on-github/configuring-notifications.md @@ -120,8 +120,8 @@ Email notifications from {% data variables.product.product_name %} contain the f 3. On the notifications settings page, choose how you receive notifications when: - There are updates in repositories or team discussions you're watching or in a conversation you're participating in. For more information, see "[About participating and watching notifications](#about-participating-and-watching-notifications)." - You gain access to a new repository or you've joined a new team. For more information, see "[Automatic watching](#automatic-watching)."{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %} - - There are new {% data variables.product.prodname_dependabot_alerts %} in your repository. For more information, see "[{% data variables.product.prodname_dependabot_alerts %} options](#github-dependabot-alerts-options)." {% endif %}{% if currentVersion == "enterprise-server@2.21" %} - - There are new security alerts in your repository. For more information, see "[Security alert options](#security-alert-options)." {% endif %} {% if currentVersion == "free-pro-team@latest" %} + - There are new {% data variables.product.prodname_dependabot_alerts %} in your repository. For more information, see "[{% data variables.product.prodname_dependabot_alerts %} notification options](#github-dependabot-alerts-notification-options)." {% endif %}{% if currentVersion == "enterprise-server@2.21" %} + - There are new security alerts in your repository. For more information, see "[Security alert notification options](#security-alert-notification-options)." {% endif %} {% if currentVersion == "free-pro-team@latest" %} - There are workflow runs updates on repositories set up with {% data variables.product.prodname_actions %}. For more information, see "[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)."{% endif %} ### Automatic watching @@ -158,9 +158,9 @@ If you are a member of more than one organization, you can configure each one to ![Switching your per-org email address](/assets/images/help/notifications/notifications_switching_org_email.gif) {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %} -### {% data variables.product.prodname_dependabot_alerts %} options +### {% data variables.product.prodname_dependabot_alerts %} notification options {% else %} -### Security alert options +### Security alert notification options {% endif %} {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %}Choose how you want to receive {% data variables.product.prodname_dependabot_alerts %} for repositories that you are watching. You can receive {% data variables.product.prodname_dependabot_alerts %} in your inbox, as a banner on {% data variables.product.product_name %}, on the command line, through email, or some combination of these options. @@ -177,6 +177,12 @@ If you want to receive security alerts by email, choose whether you want a weekl ![Security alerts options](/assets/images/help/notifications-v2/security-alerts-options.png) {% endif %} +{% note %} + +**Note:** You can filter your {% data variables.product.company_short %} inbox notifications by {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %}{% data variables.product.prodname_dependabot_short %}{% else %} security{% endif %} alerts. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#supported-queries-for-custom-filters)." + +{% endnote %} + {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %} ### {% data variables.product.prodname_actions %} notification options diff --git a/content/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox.md b/content/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox.md index c29c808da521..940fb73c593a 100644 --- a/content/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox.md +++ b/content/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox.md @@ -112,7 +112,7 @@ To filter notifications by why you've received an update, you can use the `reaso #### Supported `is:` queries -To filter notifications for specific activity on {% data variables.product.product_name %}, you can use the `is` query. For example, to only see repository invitation updates, use `is:repository-invitation`. +To filter notifications for specific activity on {% data variables.product.product_name %}, you can use the `is` query. For example, to only see repository invitation updates, use `is:repository-invitation`, and to only see {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" %}{% data variables.product.prodname_dependabot_short %}{% else %} security{% endif %} alerts, use `is:repository-vulnerability-alert`. - `is:check-suite` - `is:commit` diff --git a/content/github/managing-your-work-on-github/about-issues.md b/content/github/managing-your-work-on-github/about-issues.md index a768aabe3b83..8d4533765bbc 100644 --- a/content/github/managing-your-work-on-github/about-issues.md +++ b/content/github/managing-your-work-on-github/about-issues.md @@ -3,7 +3,7 @@ title: About issues intro: 'Use issues to track ideas, enhancements, tasks, or bugs for work on {% data variables.product.product_name %}.' redirect_from: - /articles/creating-issues/ - - /articles/about-issues + - /articles/about-issues/ versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests.md b/content/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests.md index 0678a9c9249c..dcf5a01db9b3 100644 --- a/content/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests.md +++ b/content/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests.md @@ -11,15 +11,16 @@ versions: {% tip %} -**Tip:** You can also apply a label in the Labels drop-down menu within an issue or pull request. +**Tip:** You can apply up to a maximum of 100 labels to issues and pull requests. {% endtip %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-issue-pr %} {% data reusables.repositories.select-items-in-issue-or-pr-list %} -4. In the upper-right corner, click **Label**, then start typing the name of an existing label. Click the label's name to associate it with the selected items. +4. In the upper-right corner, click **Label**, then start typing the name of an existing label. Click the label's name to associate it with the selected items. You can also apply a label in the Labels drop-down menu within an issue or pull request. ![Issues Milestone assignment drop-down](/assets/images/help/issues/issues_applying_labels_dropdown.png) + ### Further reading diff --git a/content/github/searching-for-information-on-github/about-searching-on-github.md b/content/github/searching-for-information-on-github/about-searching-on-github.md index 1f6d48bf8e25..5639534bd93c 100644 --- a/content/github/searching-for-information-on-github/about-searching-on-github.md +++ b/content/github/searching-for-information-on-github/about-searching-on-github.md @@ -1,6 +1,6 @@ --- title: About searching on GitHub -intro: 'Use our powerful search tools to find what you''re looking for among the many repositories, users, and lines of code on {% data variables.product.product_name %}.' +intro: 'Our integrated search covers the many repositories, users, and lines of code on {% data variables.product.product_name %}.' redirect_from: - /articles/using-the-command-bar/ - /articles/github-search-basics/ @@ -24,6 +24,8 @@ You can search globally across all of {% data variables.product.product_name %}, - {% data reusables.search.required_login %} - {% data variables.product.prodname_pages %} sites are not searchable on {% data variables.product.product_name %}. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see "[Searching code](/articles/searching-code)." For more information about {% data variables.product.prodname_pages %}, see "[What is GitHub Pages?](/articles/what-is-github-pages/)" +- Currently our search doesn't support exact matching. +- Whenever you are searching in code files, only the first two results in each file will be returned. {% endnote %} diff --git a/content/github/setting-up-and-managing-organizations-and-teams/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization.md b/content/github/setting-up-and-managing-organizations-and-teams/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization.md new file mode 100644 index 000000000000..5934c0738154 --- /dev/null +++ b/content/github/setting-up-and-managing-organizations-and-teams/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization.md @@ -0,0 +1,16 @@ +--- +title: Configuring the retention period for GitHub Actions artifacts and logs in your organization +intro: 'You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your organization.' +versions: + free-pro-team: '*' + enterprise-server: '>=2.23' +--- + +{% data reusables.actions.about-artifact-log-retention %} + +## Setting the retention period for an organization + +{% data reusables.organizations.navigate-to-org %} +{% data reusables.organizations.org_settings %} +{% data reusables.organizations.settings-sidebar-actions %} +{% data reusables.github-actions.change-retention-period-for-artifacts-logs %} diff --git a/content/github/setting-up-and-managing-organizations-and-teams/index.md b/content/github/setting-up-and-managing-organizations-and-teams/index.md index 617d9046007a..771bfe8a8d43 100644 --- a/content/github/setting-up-and-managing-organizations-and-teams/index.md +++ b/content/github/setting-up-and-managing-organizations-and-teams/index.md @@ -100,6 +100,7 @@ versions: {% link_in_list /managing-the-forking-policy-for-your-organization %} {% link_in_list /disabling-or-limiting-github-actions-for-your-organization %} + {% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization %} {% link_in_list /setting-permissions-for-adding-outside-collaborators %} diff --git a/content/github/setting-up-and-managing-your-enterprise-account/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account.md b/content/github/setting-up-and-managing-your-enterprise-account/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account.md new file mode 100644 index 000000000000..7a75d8c7a30d --- /dev/null +++ b/content/github/setting-up-and-managing-your-enterprise-account/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account.md @@ -0,0 +1,19 @@ +--- +title: Configuring the retention period for GitHub Actions artifacts and logs in your enterprise account +intro: 'Enterprise owners can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in an enterprise account.' +product: '{% data reusables.gated-features.enterprise-accounts %}' +miniTocMaxHeadingLevel: 4 +versions: + free-pro-team: '*' + enterprise-server: '>=2.23' +--- + +{% data reusables.actions.about-artifact-log-retention %} + +## Setting the retention period for an enterprise + +{% data reusables.enterprise_site_admin_settings.access-settings %} +{% data reusables.enterprise_site_admin_settings.business %} +{% data reusables.enterprise-accounts.policies-tab %} +{% data reusables.enterprise-accounts.actions-tab %} +{% data reusables.github-actions.change-retention-period-for-artifacts-logs %} diff --git a/content/github/setting-up-and-managing-your-enterprise-account/index.md b/content/github/setting-up-and-managing-your-enterprise-account/index.md index 538e340c8c1f..2eac95839d7b 100644 --- a/content/github/setting-up-and-managing-your-enterprise-account/index.md +++ b/content/github/setting-up-and-managing-your-enterprise-account/index.md @@ -33,3 +33,4 @@ versions: {% link_in_list /configuring-saml-single-sign-on-and-scim-for-your-enterprise-account-using-okta %} {% link_in_list /enforcing-a-policy-on-dependency-insights-in-your-enterprise-account %} {% link_in_list /enforcing-github-actions-policies-in-your-enterprise-account %} + {% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account %} diff --git a/content/github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address.md b/content/github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address.md index 0c78291e6a61..7704249f86b5 100644 --- a/content/github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address.md +++ b/content/github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address.md @@ -7,6 +7,11 @@ versions: free-pro-team: '*' enterprise-server: '*' --- +{% note %} + +**Note:** You cannot change your primary email address to an email that is already set to be your backup email address. + +{% endnote %} {% data reusables.user_settings.access_settings %} {% data reusables.user_settings.emails %} diff --git a/content/github/site-policy/github-subprocessors-and-cookies.md b/content/github/site-policy/github-subprocessors-and-cookies.md index c7bf4961c1d8..d796bcf72373 100644 --- a/content/github/site-policy/github-subprocessors-and-cookies.md +++ b/content/github/site-policy/github-subprocessors-and-cookies.md @@ -82,9 +82,9 @@ Since the number and names of cookies may change,the table below may be updated | Google Analytics** | `_gat` | This cookie is used by Google Analytics. | one minute | | Google Analytics** | `_gid` | This cookie is used by Google Analytics. | one day | -*The **expiration** dates for the cookies listed below generally apply on a rolling basis. +_*_ The **expiration** dates for the cookies listed below generally apply on a rolling basis. -**We use Google Analytics as a third party analytics service to collect information about how our website performs and how our users, in general, navigate through and use GitHub. This helps us evaluate our users' use of GitHub, compile statistical reports on activity, and improve our content and website performance. +_**_ We use **Google Analytics** as a third party analytics service to collect information about how our website performs and how our users, in general, navigate through and use GitHub. This helps us evaluate our users' use of GitHub, compile statistical reports on activity, and improve our content and website performance. You can control your Google Analytics cookie preferences through our cookie preference link located at the footer of our website. In addition, Google provides further information about its own privacy practices and [offers a browser add-on to opt out of Google Analytics tracking](https://tools.google.com/dlpage/gaoptout). diff --git a/content/index.md b/content/index.md index ba3d56935da4..1800e3661d03 100644 --- a/content/index.md +++ b/content/index.md @@ -13,3 +13,4 @@ popularLinks: - /github/working-with-github-pages versions: '*' --- + diff --git a/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md b/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md index f278fee455bb..e4e1db91970c 100644 --- a/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md +++ b/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md @@ -20,7 +20,7 @@ To push and pull container images owned by an organization, an organization admi This example pushes the latest version of `IMAGE-NAME`. ```shell - $ docker push ghcr.io/OWNER/IMAGE_NAME.latest + $ docker push ghcr.io/OWNER/IMAGE_NAME:latest ``` This example pushes the `2.5` version of the image. @@ -42,7 +42,7 @@ To ensure you're always using the same image, you can specify the exact containe ``` 2. Remove image locally as needed. ```shell - $ docker rmi ghcr.io/OWNER/IMAGE_NAME.latest + $ docker rmi ghcr.io/OWNER/IMAGE_NAME:latest ``` 3. Pull the container image with `@YOUR_SHA_VALUE` after the image name. diff --git a/content/packages/publishing-and-managing-packages/about-github-packages.md b/content/packages/publishing-and-managing-packages/about-github-packages.md index 342f5aceb396..2d87941b7427 100644 --- a/content/packages/publishing-and-managing-packages/about-github-packages.md +++ b/content/packages/publishing-and-managing-packages/about-github-packages.md @@ -185,7 +185,7 @@ For more information, see: ### Managing packages -You can a delete a version of a private package on {% data variables.product.product_name %} or using the GraphQL API. When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "[Deleting a package](/packages/publishing-and-managing-packages/deleting-a-package)" and "[Forming calls with GraphQL](/v4/guides/forming-calls/)." +You can delete a version of a private package on {% data variables.product.product_name %} or using the GraphQL API. When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "[Deleting a package](/packages/publishing-and-managing-packages/deleting-a-package)" and "[Forming calls with GraphQL](/v4/guides/forming-calls/)." You can configure webhooks to subscribe to package-related events, such as when a package is published or updated. For more information, see the "[`package` webhook event](/webhooks/event-payloads/#package)." diff --git a/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages.md b/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages.md index 4dda592f46fa..238875ff8ba1 100644 --- a/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages.md +++ b/content/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages.md @@ -120,32 +120,32 @@ publishing { ##### Example using Kotlin DSL for multiple packages in the same repository - ```shell - plugins { - `maven-publish` apply false - } - - subprojects { - apply(plugin = "maven-publish") - configure { - repositories { - maven { - name = "GitHubPackages" - url = uri("https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") - credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") - } - } - } - publications { - register("gpr") { - from(components["java"]) - } - } - } - } - ``` +```shell +plugins { + `maven-publish` apply false +} + +subprojects { + apply(plugin = "maven-publish") + configure { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + credentials { + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + } + } + } + publications { + register("gpr") { + from(components["java"]) + } + } + } +} +``` #### Authenticating with the `GITHUB_TOKEN` @@ -173,31 +173,31 @@ You can install a package by adding the package as a dependency to your project. {% data reusables.package_registry.authenticate-step %} 2. Add the package dependencies to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file. - Example using Grady Groovy: + Example using Gradle Groovy: ```shell dependencies { - implementation 'com.example:package' + implementation 'com.example:package' } ``` Example using Kotlin DSL: ```shell dependencies { - implementation("com.example:package") + implementation("com.example:package") } ``` 3. Add the maven plugin to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file. - Example using Grady Groovy: + Example using Gradle Groovy: ```shell plugins { - id 'maven' + id 'maven' } ``` Example using Kotlin DSL: ```shell plugins { - `maven` + `maven` } ``` diff --git a/content/rest/guides/getting-started-with-the-rest-api.md b/content/rest/guides/getting-started-with-the-rest-api.md index b360321000b2..9edebf89f2a2 100644 --- a/content/rest/guides/getting-started-with-the-rest-api.md +++ b/content/rest/guides/getting-started-with-the-rest-api.md @@ -59,7 +59,6 @@ $ curl -i {% data variables.product.api_url_pre %}/users/defunkt > Server: GitHub.com > Date: Sun, 11 Nov 2012 18:43:28 GMT > Content-Type: application/json; charset=utf-8 -> Connection: keep-alive > Status: 200 OK > ETag: "bfd85cbf23ac0b0c8a29bee02e7117c6" > X-RateLimit-Limit: 60 diff --git a/content/rest/overview/endpoints-available-for-github-apps.md b/content/rest/overview/endpoints-available-for-github-apps.md index 99648a43234a..9ae64ab8c3d2 100644 --- a/content/rest/overview/endpoints-available-for-github-apps.md +++ b/content/rest/overview/endpoints-available-for-github-apps.md @@ -11,7 +11,7 @@ versions: You must use an installation access token to access endpoints using your {% data variables.product.prodname_github_app %}. For more information, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)." -{% for thing in rest.operationsEnabledForApps[currentVersion] %} +{% for thing in rest.operationsEnabledForGitHubApps[currentVersion] %} {% assign category = thing[0] %} {% assign operations = thing[1] %} {% if operations.size > 0 %} diff --git a/content/rest/overview/resources-in-the-rest-api.md b/content/rest/overview/resources-in-the-rest-api.md index 3eddf7101992..ea2573b1ea6c 100644 --- a/content/rest/overview/resources-in-the-rest-api.md +++ b/content/rest/overview/resources-in-the-rest-api.md @@ -36,7 +36,6 @@ $ curl -i {% data variables.product.api_url_pre %}/users/octocat/orgs > Server: nginx > Date: Fri, 12 Oct 2012 23:33:14 GMT > Content-Type: application/json; charset=utf-8 -> Connection: keep-alive > Status: 200 OK > ETag: "a00049ba79152d03380c34652f2cb612" > X-GitHub-Media-Type: github.v3 diff --git a/content/rest/reference/actions.md b/content/rest/reference/actions.md index 2671aaa7af4d..a162cda6f3ad 100644 --- a/content/rest/reference/actions.md +++ b/content/rest/reference/actions.md @@ -24,6 +24,16 @@ The Artifacts API allows you to download, delete, and retrieve information about {% if operation.subcategory == 'artifacts' %}{% include rest_operation %}{% endif %} {% endfor %} +## Permissions + +The Permissions API allows you to set permissions for what organizations and repositories are allowed to run {% data variables.product.prodname_actions %}, and what actions are allowed to run. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#disabling-or-limiting-github-actions-for-your-repository-or-organization)." + +You can also set permissions for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#github-actions)" REST API. + +{% for operation in currentRestOperations %} + {% if operation.subcategory == 'permissions' %}{% include rest_operation %}{% endif %} +{% endfor %} + ## Secrets The Secrets API lets you create, update, delete, and retrieve information about encrypted secrets. {% data reusables.actions.about-secrets %} For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)." @@ -40,7 +50,7 @@ The Self-hosted Runners API allows you to register, view, and delete self-hosted {% data reusables.actions.actions-authentication %} {% data variables.product.prodname_github_app %}s must have the `administration` permission for repositories or the `organization_self_hosted_runners` permission for organizations. Authenticated users must have admin access to the repository or organization to use this API. -You can manage self-hosted runners for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#actions)" REST API. +You can manage self-hosted runners for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#github-actions)" REST API. {% for operation in currentRestOperations %} {% if operation.subcategory == 'self-hosted-runners' %}{% include rest_operation %}{% endif %} @@ -52,7 +62,7 @@ The Self-hosted Runners Groups API allows you manage groups of self-hosted runne {% data reusables.actions.actions-authentication %} {% data variables.product.prodname_github_app %}s must have the `administration` permission for repositories or the `organization_self_hosted_runners` permission for organizations. Authenticated users must have admin access to the repository or organization to use this API. -You can manage self-hosted runner groups for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin#actions)" REST API. +You can manage self-hosted runner groups for an enterprise. For more information, see the "[{% data variables.product.prodname_dotcom %} Enterprise administration](/rest/reference/enterprise-admin##github-actions)" REST API. {% for operation in currentRestOperations %} {% if operation.subcategory == 'self-hosted-runner-groups' %}{% include rest_operation %}{% endif %} diff --git a/content/rest/reference/interactions.md b/content/rest/reference/interactions.md index 75075f17d90d..9ab1cdd10c27 100644 --- a/content/rest/reference/interactions.md +++ b/content/rest/reference/interactions.md @@ -28,9 +28,9 @@ The Organization Interactions API allows organization owners to temporarily rest The Repository Interactions API allows people with owner or admin access to temporarily restrict which users can comment, open issues, or create pull requests in a public repository. {% data reusables.interactions.interactions-detail %} Here's more about the groups of {% data variables.product.product_name %} users: -* {% data reusables.interactions.existing-user-limit-definition %} in the respository. -* {% data reusables.interactions.contributor-user-limit-definition %} in the respository. -* {% data reusables.interactions.collaborator-user-limit-definition %} in the respository. +* {% data reusables.interactions.existing-user-limit-definition %} in the repository. +* {% data reusables.interactions.contributor-user-limit-definition %} in the repository. +* {% data reusables.interactions.collaborator-user-limit-definition %} in the repository. {% for operation in currentRestOperations %} {% if operation.subcategory == 'repos' %}{% include rest_operation %}{% endif %} diff --git a/contributing/content-style-guide.md b/contributing/content-style-guide.md index b7931f1eab45..9019d1244c6f 100644 --- a/contributing/content-style-guide.md +++ b/contributing/content-style-guide.md @@ -336,7 +336,7 @@ When referencing text in the user interface, reproduce the text exactly. Use quo ### More resources GitHub Brand Guide: - [Referring to GitHub features and product elements](https://brand.github.com/content/terminology/#referring-to-github-features-and-product-elements) -- [Page names and UI references](https://brand.github.com/content/grammar-usage/#page-names-and-ui-references) +- [Page names and UI references](https://brand.github.com/content/grammar#page-names-and-ui-references) Microsoft Style Guide: - [Formatting text in instructions](https://docs.microsoft.com/en-us/style-guide/procedures-instructions/formatting-text-in-instructions) @@ -346,7 +346,7 @@ Use clear, simple language thatโ€™s approachable and accessible for a wide range ## Word choice and terminology -For general guidance and GitHub-specific terms, see โ€œ[Terminology](https://brand.github.com/content/terminology) in and โ€œ[Words that can be tricky](https://brand.github.com/content/grammar-usage/#words-that-can-be-tricky)โ€ in GitHubโ€™s Brand Guide. For more detailed guidance, see the โ€œ[A-Z word list](https://docs.microsoft.com/en-us/style-guide)โ€ in Microsoftโ€™s style guide. +For general guidance and GitHub-specific terms, see โ€œ[Terminology](https://brand.github.com/content/terminology) in and โ€œ[Words that can be tricky](https://brand.github.com/content/grammar#words-that-can-be-tricky)โ€ in GitHubโ€™s Brand Guide. For more detailed guidance, see the โ€œ[A-Z word list](https://docs.microsoft.com/en-us/style-guide)โ€ in Microsoftโ€™s style guide. ### Abbreviations diff --git a/contributing/development.md b/contributing/development.md index 000c3dfcec4f..5fa66a72a553 100644 --- a/contributing/development.md +++ b/contributing/development.md @@ -8,7 +8,7 @@ This site is powered by Node.js! :sparkles: :turtle: :rocket: :sparkles: It runs on macOS, Windows, and Linux environments. -You'll need **Node.js v14** to run the site. If you're using [`nodenv`](https://github.com/nodenv/nodenv), read the [`nodenv` docs](#nodenv) for instructions on switching Node.js versions. If you're not using `nodenv`, the best way to install Node.js is to [download the LTS installer from nodejs.org](https://nodejs.org). +You'll need Node.js version 12 or 14 to run the site. To install Node.js, [download the "LTS" installer from nodejs.org](https://nodejs.org). If you're using [`nodenv`](https://github.com/nodenv/nodenv), read the [`nodenv` docs](#nodenv) for instructions on switching Node.js versions. Once you've installed Node.js (which includes the popular `npm` package manager), open Terminal and run the following: @@ -52,4 +52,4 @@ For more info about working with this site, check out these READMEs: - [middleware/README.md](../middleware/README.md) - [script/README.md](../script/README.md) - [stylesheets/README.md](../stylesheets/README.md) -- [tests/README.md](../tests/README.md) \ No newline at end of file +- [tests/README.md](../tests/README.md) diff --git a/contributing/node-versions.md b/contributing/node-versions.md index 60c42b86f1f9..da30ad65768f 100644 --- a/contributing/node-versions.md +++ b/contributing/node-versions.md @@ -1,6 +1,8 @@ # Node Versions -The site currently runs on Node.js v14, the [Active LTS version](https://nodejs.org/en/about/releases/) from 2020-10-27 to 2021-10-26. +In [development](contributing/development.md) enviroments this site will run on Node.js versions `12 - 14`. + +In [staging and production](contributing/deployments.md) environments this site runs on Node.js 14, the [Active LTS version](https://nodejs.org/en/about/releases/) from 2020-10-27 to 2021-10-26). When updating to a new Node.js version, consider the following files: diff --git a/data/reusables/actions/about-artifact-log-retention.md b/data/reusables/actions/about-artifact-log-retention.md new file mode 100644 index 000000000000..aa8a5300359d --- /dev/null +++ b/data/reusables/actions/about-artifact-log-retention.md @@ -0,0 +1,6 @@ +By default, the artifacts and log files generated by workflows are retained for 90 days before they are automatically deleted. You can adjust the retention period, depending on the type of repository: + +- For public repositories: you can change this retention period to anywhere between 1 day or 90 days. +- For private, internal, and {% data variables.product.prodname_enterprise %} repositories: you can change this retention period to anywhere between 1 day or 400 days. + +When you customize the retention period, it only applies to new artifacts and log files, and does not retroactively apply to existing objects. For managed repositories and organizations, the maximum retention period cannot exceed the limit set by the managing organization or enterprise. diff --git a/data/reusables/code-scanning/analyze-go.md b/data/reusables/code-scanning/analyze-go.md new file mode 100644 index 000000000000..56f04cb3de4a --- /dev/null +++ b/data/reusables/code-scanning/analyze-go.md @@ -0,0 +1 @@ +{% data variables.product.prodname_codeql %} also runs a build for Go projects to set up the project. However, in contrast to the other compiled languages, all Go files in the repository are extracted, not just those that are built. Custom build commands are not supported for Go. \ No newline at end of file diff --git a/data/reusables/github-actions/artifact-log-retention-statement.md b/data/reusables/github-actions/artifact-log-retention-statement.md new file mode 100644 index 000000000000..00249ec8d5ae --- /dev/null +++ b/data/reusables/github-actions/artifact-log-retention-statement.md @@ -0,0 +1,2 @@ +{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} By default, {% data variables.product.product_name %} stores build logs and artifacts for 90 days, and this retention period can be customized. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy)".{% endif %} +{% if currentVersion == "enterprise-server@2.22" %} {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.{% endif %} diff --git a/data/reusables/github-actions/change-retention-period-for-artifacts-logs.md b/data/reusables/github-actions/change-retention-period-for-artifacts-logs.md new file mode 100644 index 000000000000..19398bca6ab8 --- /dev/null +++ b/data/reusables/github-actions/change-retention-period-for-artifacts-logs.md @@ -0,0 +1,2 @@ +1. Under **Artifact and log retention duration**, enter a new value. +1. Click **Save** to apply the change. \ No newline at end of file diff --git a/data/reusables/package_registry/package-immutability.md b/data/reusables/package_registry/package-immutability.md index e01c7c9f365c..b681b521909d 100644 --- a/data/reusables/package_registry/package-immutability.md +++ b/data/reusables/package_registry/package-immutability.md @@ -1,3 +1,5 @@ -To prevent confusion and build problems, {% data variables.product.prodname_dotcom %} permanently reserves a package's name and version number. Even if an entire package is deleted, you cannot reuse the deleted package name in any repository owned by the same account. +**Public packages:** To prevent confusion and build problems, {% data variables.product.prodname_dotcom %} permanently reserves a package's name and version number. Even if an entire package is deleted, you cannot reuse the deleted package name in any repository owned by the same account. + +**Private packages:** If all versions of a private package are deleted, you can publish a package with a previously used name and version. To revise or replace a package version, we recommend you publish a new version of your package. diff --git a/includes/support.html b/includes/support.html index 85040ec8bf05..b782f5ec3603 100644 --- a/includes/support.html +++ b/includes/support.html @@ -1,15 +1,15 @@
-

+

{% data ui.support.still_need_help %}

{% if currentVersion contains 'enterprise' %}{% assign isEnterprise = true %}{% else %}{% assign isEnterprise = false %}{% endif %} - + {% octicon "people" width="16" %} {% data ui.support.ask_community %} - + {% octicon "comment-discussion" width="16" %} {% data ui.support.contact_support %} diff --git a/javascripts/events.js b/javascripts/events.js new file mode 100644 index 000000000000..735bb3314612 --- /dev/null +++ b/javascripts/events.js @@ -0,0 +1,118 @@ +/* eslint-disable camelcase */ +import { v4 as uuidv4 } from 'uuid' +import Cookies from 'js-cookie' +import getCsrf from './get-csrf' + +const COOKIE_NAME = '_docs-events' + +let cookieValue + +export function getUserEventsId () { + if (cookieValue) return cookieValue + cookieValue = Cookies.get(COOKIE_NAME) + if (cookieValue) return cookieValue + cookieValue = uuidv4() + Cookies.set(COOKIE_NAME, cookieValue, { + secure: true, + sameSite: 'strict', + expires: 365 + }) + return cookieValue +} + +export async function sendEvent ({ + type, + version = '1.0.0', + page_render_duration, + exit_page_id, + exit_first_paint, + exit_dom_interactive, + exit_dom_complete, + exit_visit_duration, + exit_scroll_length, + link_url, + search_query, + search_context, + navigate_label, + survey_vote, + survey_comment, + survey_email, + experiment_name, + experiment_variation, + experiment_success +}) { + const response = await fetch('/events', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'CSRF-Token': getCsrf() + }, + body: JSON.stringify({ + type, // One of page, exit, link, search, navigate, survey, experiment + + context: { + // Primitives + event_id: uuidv4(), + user: getUserEventsId(), + version, + created: new Date().toISOString(), + + // Content information + path: location.pathname, + referrer: document.referrer, + search: location.search, + href: location.href, + site_language: location.pathname.split('/')[1], + + // Device information + // os: + // os_version: + // browser: + // browser_version: + viewport_width: document.documentElement.clientWidth, + viewport_height: document.documentElement.clientHeight, + + // Location information + timezone: new Date().getTimezoneOffset() / -60, + user_language: navigator.language + }, + + // Page event + page_render_duration, + + // Exit event + exit_page_id, + exit_first_paint, + exit_dom_interactive, + exit_dom_complete, + exit_visit_duration, + exit_scroll_length, + + // Link event + link_url, + + // Search event + search_query, + search_context, + + // Navigate event + navigate_label, + + // Survey event + survey_vote, + survey_comment, + survey_email, + + // Experiment event + experiment_name, + experiment_variation, + experiment_success + }) + }) + const data = response.ok ? await response.json() : {} + return data +} + +export default async function initializeEvents () { + await sendEvent({ type: 'page' }) +} diff --git a/javascripts/index.js b/javascripts/index.js index 7eda77be376a..b9bfb3ee8468 100644 --- a/javascripts/index.js +++ b/javascripts/index.js @@ -14,8 +14,9 @@ import localization from './localization' import helpfulness from './helpfulness' import experiment from './experiment' import { fillCsrf } from './get-csrf' +import initializeEvents from './events' -document.addEventListener('DOMContentLoaded', () => { +document.addEventListener('DOMContentLoaded', async () => { displayPlatformSpecificContent() explorer() search() @@ -27,7 +28,8 @@ document.addEventListener('DOMContentLoaded', () => { wrapCodeTerms() print() localization() - fillCsrf() + await fillCsrf() // this must complete before any POST calls helpfulness() experiment() + initializeEvents() }) diff --git a/lib/all-products.js b/lib/all-products.js index 72edac31fd34..09e9d2070aae 100644 --- a/lib/all-products.js +++ b/lib/all-products.js @@ -1,5 +1,6 @@ const fs = require('fs') const path = require('path') +const slash = require('slash') const assert = require('assert') const { difference } = require('lodash') const yaml = require('js-yaml') @@ -23,11 +24,11 @@ const internalProducts = {} sortedProductIds.forEach(productId => { const relPath = productId - const dir = path.join('content', relPath) - const toc = path.join(dir, 'index.md') + const dir = slash(path.join('content', relPath)) + const toc = slash(path.join(dir, 'index.md')) const { data } = frontmatter(fs.readFileSync(toc, 'utf8')) const applicableVersions = getApplicableVersions(data.versions, toc) - const href = path.join('/', applicableVersions[0], productId) + const href = slash(path.join('/', applicableVersions[0], productId)) internalProducts[productId] = { id: productId, diff --git a/lib/hydro.js b/lib/hydro.js index 48eaa59b0802..df06602ae5f5 100644 --- a/lib/hydro.js +++ b/lib/hydro.js @@ -1,10 +1,21 @@ const crypto = require('crypto') const fetch = require('node-fetch') +const SCHEMAS = { + page: 'docs.v0.PageEvent', + exit: 'docs.v0.ExitEvent', + link: 'docs.v0.LinkEvent', + search: 'docs.v0.SearchEvent', + navigate: 'docs.v0.NavigateEvent', + survey: 'docs.v0.SurveyEvent', + experiment: 'docs.v0.ExperimentEvent' +} + module.exports = class Hydro { - constructor ({ secret, endpoint }) { + constructor ({ secret, endpoint } = {}) { this.secret = secret || process.env.HYDRO_SECRET this.endpoint = endpoint || process.env.HYDRO_ENDPOINT + this.schemas = SCHEMAS } /** @@ -32,7 +43,13 @@ module.exports = class Hydro { * @param {[{ schema: string, value: any }]} events */ async publishMany (events) { - const body = JSON.stringify({ events }) + const body = JSON.stringify({ + events: events.map(({ schema, value }) => ({ + schema, + value: JSON.stringify(value), // We must double-encode the value property + cluster: 'potomac' // We only have ability to publish externally to potomac cluster + })) + }) const token = this.generatePayloadHmac(body) return fetch(this.endpoint, { @@ -41,7 +58,7 @@ module.exports = class Hydro { headers: { Authorization: `Hydro ${token}`, 'Content-Type': 'application/json', - 'X-Hydro-App': 'docs' + 'X-Hydro-App': 'docs-production' } }) } diff --git a/lib/redirects/precompile.js b/lib/redirects/precompile.js index 97cd39cacba5..91f57591efbf 100755 --- a/lib/redirects/precompile.js +++ b/lib/redirects/precompile.js @@ -1,4 +1,5 @@ const path = require('path') +const slash = require('slash') const patterns = require('../patterns') const { latest } = require('../enterprise-server-releases') const getOldPathsFromPermalink = require('../redirects/get-old-paths-from-permalink') @@ -85,7 +86,7 @@ module.exports = async function precompileRedirects (pages) { // add a veriation like `/free-pro-team@latest/v3/gists/comments`; // again, we need to do this because all links in content get rewritten if (!developerRoute.startsWith('/enterprise/')) { - const developerRouteWithVersion = path.join(nonEnterpriseDefaultVersion, developerRoute) + const developerRouteWithVersion = slash(path.join(nonEnterpriseDefaultVersion, developerRoute)) const developerRouteWithVersionAndLanguage = `/en/${developerRouteWithVersion}` allRedirects[developerRouteWithVersion] = newPath allRedirects[developerRouteWithVersionAndLanguage] = newPath diff --git a/lib/rest.js b/lib/rest.js index 04c94f08beb4..923e6177aac6 100644 --- a/lib/rest.js +++ b/lib/rest.js @@ -1,9 +1,8 @@ const { chain, get, union, flatten, groupBy } = require('lodash') const { supported } = require('./enterprise-server-releases') const operations = require('@github/rest-api-operations') -// TODO need to update this to the new versions in coordination with openAPI -const { oldVersions } = require('./old-versions-utils') -const allVersions = oldVersions +const { getOldVersionFromNewVersion } = require('./old-versions-utils') +const allVersions = Object.keys(require('./all-versions')) // This list is generated for use in the tests, // so we can verify that the names of the markdown files @@ -18,16 +17,16 @@ const categories = union(dotcomCategories, enterpriseCategories) // Attach convenience properties to each operation that can't easily be created in Liquid allVersions.forEach(currentVersion => { - operations[currentVersion].forEach(operation => { + operations[getOldVersionFromNewVersion(currentVersion)].forEach(operation => { operation.hasRequiredPreviews = get(operation, 'x-github.previews', []).some(preview => preview.required) }) }) -// This is a collection of operations that have `enabledForApps = true` +// This is a collection of operations that have `enabledForGitHubApps = true` // It's grouped by resource title to make rendering easier -const operationsEnabledForApps = allVersions.reduce((acc, currentVersion) => { - acc[currentVersion] = chain(operations[currentVersion] || []) - .filter(operation => operation['x-github'].enabledForApps) +const operationsEnabledForGitHubApps = allVersions.reduce((acc, currentVersion) => { + acc[currentVersion] = chain(operations[getOldVersionFromNewVersion(currentVersion)] || []) + .filter(operation => operation['x-github'].enabledForGitHubApps) .orderBy('category') .value() acc[currentVersion] = groupBy(acc[currentVersion], 'category') @@ -37,5 +36,5 @@ const operationsEnabledForApps = allVersions.reduce((acc, currentVersion) => { module.exports = { categories, operations, - operationsEnabledForApps + operationsEnabledForGitHubApps } diff --git a/lib/schema-event-2.js b/lib/schema-event-2.js index a3b036b33058..801bf8249cef 100644 --- a/lib/schema-event-2.js +++ b/lib/schema-event-2.js @@ -1,13 +1,14 @@ const languages = require('./languages') -module.exports = { +const context = { + type: 'object', additionalProperties: false, required: [ 'event_id', - 'type', 'user', 'version', - 'created' + 'created', + 'path' ], properties: { // Required of all events @@ -16,11 +17,6 @@ module.exports = { description: 'The unique identifier of the event.', format: 'uuid' }, - type: { - type: 'string', - description: 'The type of the event.', - enum: ['page', 'exit', 'link', 'search', 'navigate', 'survey', 'experiment'] - }, user: { type: 'string', description: 'The unique identifier of the current user performing the event. Please use randomly generated values or hashed values; we don\'t want to be able to look up in a database.', @@ -29,18 +25,13 @@ module.exports = { version: { type: 'string', description: 'The version of the event schema.', - pattern: /^\d+(\.\d+)?(\.\d+)?$/ + pattern: '^\\d+(\\.\\d+)?(\\.\\d+)?$' // eslint-disable-line }, created: { type: 'string', format: 'date-time', description: 'The time we created the event; please reference UTC.' }, - token: { - type: 'string', - description: 'A honeypot.', - maxLength: 0 - }, // Content information path: { @@ -109,162 +100,214 @@ module.exports = { type: 'string', description: 'The browser value of `navigator.language`.' } - }, - oneOf: [{ - // *** type: page *** - required: [ - 'path', - 'href' - ], - properties: { - type: { - type: 'string', - pattern: /^page$/ - }, - page_render_duration: { - type: { - type: 'number', - description: 'How long the server took to render the page content, in seconds.', - minimum: 0.001 - } - } + } +} + +const pageSchema = { + additionalProperties: false, + required: [ + 'type', + 'context' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^page$' + }, + page_render_duration: { + type: 'number', + description: 'How long the server took to render the page content, in seconds.', + minimum: 0.001 } - }, { - // *** type: exit *** - required: [ - 'exit_page_id' - ], - properties: { - type: { - type: 'string', - pattern: /^exit$/ - }, - exit_page_id: { - type: 'string', - format: 'uuid', - description: 'The value of the corresponding `page` event.' - // id of the "page" event - }, - exit_first_paint: { - type: 'number', - minimum: 0.001, - description: 'The duration until `first-contentful-paint`, in seconds. Informs CSS performance.' - }, - exit_dom_interactive: { - type: 'number', - minimum: 0.001, - description: 'The duration until `PerformanceNavigationTiming.domInteractive`, in seconds. Informs JavaScript loading performance.' - }, - exit_dom_complete: { - type: 'number', - minimum: 0.001, - description: 'The duration until `PerformanceNavigationTiming.domComplete`, in seconds. Informs JavaScript execution performance.' - }, - exit_visit_duration: { - type: 'number', - minimum: 0.001, - description: 'The duration of exit.timestamp - page.timestamp, in seconds. Informs bounce rate.' - }, - exit_scroll_length: { - type: 'number', - minimum: 0, - maximum: 1, - description: 'The percentage of how far the user scrolled on the page.' - } + } +} + +const exitSchema = { + additionalProperties: false, + required: [ + 'type', + 'context', + 'exit_page_id' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^exit$' + }, + exit_page_id: { + type: 'string', + format: 'uuid', + description: 'The value of the corresponding `page` event.' + // id of the "page" event + }, + exit_first_paint: { + type: 'number', + minimum: 0.001, + description: 'The duration until `first-contentful-paint`, in seconds. Informs CSS performance.' + }, + exit_dom_interactive: { + type: 'number', + minimum: 0.001, + description: 'The duration until `PerformanceNavigationTiming.domInteractive`, in seconds. Informs JavaScript loading performance.' + }, + exit_dom_complete: { + type: 'number', + minimum: 0.001, + description: 'The duration until `PerformanceNavigationTiming.domComplete`, in seconds. Informs JavaScript execution performance.' + }, + exit_visit_duration: { + type: 'number', + minimum: 0.001, + description: 'The duration of exit.timestamp - page.timestamp, in seconds. Informs bounce rate.' + }, + exit_scroll_length: { + type: 'number', + minimum: 0, + maximum: 1, + description: 'The percentage of how far the user scrolled on the page.' } - }, { - // *** type: link *** - required: [ - 'link_url' - ], - properties: { - type: { - type: 'string', - pattern: /^link$/ - }, - link_url: { - type: 'string', - format: 'uri', - description: 'The href of the anchor tag the user clicked, or the page or object they directed their browser to.' - } + } +} + +const linkSchema = { + additionalProperties: false, + required: [ + 'type', + 'context', + 'link_url' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^link$' + }, + link_url: { + type: 'string', + format: 'uri', + description: 'The href of the anchor tag the user clicked, or the page or object they directed their browser to.' } - }, { - // *** type: search *** - required: [ - 'search_query' - ], - properties: { - type: { - type: 'string', - pattern: /^search$/ - }, - search_query: { - type: 'string', - description: 'The actual text content of the query string the user sent to the service.' - }, - search_context: { - type: 'string', - description: 'Any additional search context, such as component searched.' - } + } +} + +const searchSchema = { + additionalProperties: false, + required: [ + 'type', + 'context', + 'search_query' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^search$' + }, + search_query: { + type: 'string', + description: 'The actual text content of the query string the user sent to the service.' + }, + search_context: { + type: 'string', + description: 'Any additional search context, such as component searched.' } - }, { - // *** type: navigate *** - properties: { - type: { - type: 'string', - pattern: /^navigate$/ - }, - navigate_label: { - type: 'string', - description: 'An identifier for where the user is navigating.' - } + } +} + +const navigateSchema = { + additionalProperties: false, + required: [ + 'type', + 'context' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^navigate$' + }, + navigate_label: { + type: 'string', + description: 'An identifier for where the user is navigating.' } - }, { - // *** type: survey *** - properties: { - type: { - type: 'string', - pattern: /^survey$/ - }, - survey_vote: { - type: 'boolean', - description: 'Whether the user found the page helpful.' - }, - survey_comment: { - type: 'string', - description: 'Any textual comments the user wanted to provide.' - }, - survey_email: { - type: 'string', - format: 'email', - description: 'The user\'s email address, if the user provided and consented.' - } + } +} + +const surveySchema = { + additionalProperties: false, + required: [ + 'type', + 'context', + 'survey_vote' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^survey$' + }, + token: { + type: 'string', + description: 'A honeypot.', + maxLength: 0 + }, + survey_vote: { + type: 'boolean', + description: 'Whether the user found the page helpful.' + }, + survey_comment: { + type: 'string', + description: 'Any textual comments the user wanted to provide.' + }, + survey_email: { + type: 'string', + format: 'email', + description: 'The user\'s email address, if the user provided and consented.' } - }, { - // *** type: experiment *** - required: [ - 'experiment_name', - 'experiment_variation' - ], - properties: { - type: { - type: 'string', - pattern: /^experiment$/ - }, - experiment_name: { - type: 'string', - description: 'The test that this event is part of.' - }, - experiment_variation: { - type: 'string', - enum: ['control', 'treatment'], - description: 'The variation this user we bucketed in, such as control or treatment.' - }, - experiment_success: { - type: 'boolean', - default: true, - description: 'Whether or not the user successfully performed the test goal.' - } + } +} + +const experimentSchema = { + additionalProperties: false, + required: [ + 'type', + 'context', + 'experiment_name', + 'experiment_variation' + ], + properties: { + context, + type: { + type: 'string', + pattern: '^experiment$' + }, + experiment_name: { + type: 'string', + description: 'The test that this event is part of.' + }, + experiment_variation: { + type: 'string', + enum: ['control', 'treatment'], + description: 'The variation this user we bucketed in, such as control or treatment.' + }, + experiment_success: { + type: 'boolean', + default: true, + description: 'Whether or not the user successfully performed the test goal.' } - }] + } +} + +module.exports = { + oneOf: [ + pageSchema, + exitSchema, + linkSchema, + searchSchema, + navigateSchema, + surveySchema, + experimentSchema + ] } diff --git a/middleware/archived-enterprise-versions.js b/middleware/archived-enterprise-versions.js index 9c0d7f68f650..1c533f3c669a 100644 --- a/middleware/archived-enterprise-versions.js +++ b/middleware/archived-enterprise-versions.js @@ -1,4 +1,5 @@ const path = require('path') +const slash = require('slash') const { latest, deprecated, firstVersionDeprecatedOnNewSite, lastVersionWithoutStubbedRedirectFiles } = require('../lib/enterprise-server-releases') const patterns = require('../lib/patterns') const versionSatisfiesRange = require('../lib/version-satisfies-range') @@ -69,7 +70,7 @@ module.exports = async (req, res, next) => { // for <2.13: /2.12/user/articles/viewing-contributions-on-your-profile function getProxyPath (reqPath, requestedVersion) { const proxyPath = versionSatisfiesRange(requestedVersion, `>=${firstVersionDeprecatedOnNewSite}`) - ? path.join('/', requestedVersion, reqPath) + ? slash(path.join('/', requestedVersion, reqPath)) : reqPath.replace(/^\/enterprise/, '') return `https://github.github.com/help-docs-archived-enterprise-versions${proxyPath}` @@ -97,7 +98,7 @@ function getFallbackRedirects (req, requestedVersion) { // ] .filter(oldPath => oldPath.startsWith('/enterprise') && patterns.enterpriseNoVersion.test(oldPath)) // add in the current language and version - .map(oldPath => path.join('/', req.context.currentLanguage, oldPath.replace('/enterprise/', `/enterprise/${requestedVersion}/`))) + .map(oldPath => slash(path.join('/', req.context.currentLanguage, oldPath.replace('/enterprise/', `/enterprise/${requestedVersion}/`)))) // ignore paths that match the requested path .filter(oldPath => oldPath !== req.path) } diff --git a/middleware/events.js b/middleware/events.js index ca2887bbb114..9ded6cd0c214 100644 --- a/middleware/events.js +++ b/middleware/events.js @@ -3,6 +3,7 @@ const Airtable = require('airtable') const { omit } = require('lodash') const Ajv = require('ajv') const schema = require('../lib/schema-event') +const schemaHydro = require('../lib/schema-event-2') const TABLE_NAMES = { HELPFULNESS: 'Helpfulness Survey', @@ -15,7 +16,7 @@ const ajv = new Ajv() const router = express.Router() -router.post('/', async (req, res, next) => { +async function airtablePost (req, res, next) { const { AIRTABLE_API_KEY, AIRTABLE_BASE_KEY } = process.env if (!AIRTABLE_API_KEY || !AIRTABLE_BASE_KEY) { return res.status(501).send({}) @@ -34,7 +35,28 @@ router.post('/', async (req, res, next) => { return res.status(201).send({ id: records[0].getId() }) } catch (err) { console.error('unable to POST event', err) - return res.status(err.statusCode).send(err) + return res.status(502).send({}) + } +} + +router.post('/', async (req, res, next) => { + // All-caps type is an "Airtable" event + if (req.body.type === 'HELPFULNESS' || req.body.type === 'EXPERIMENT') { + return airtablePost(req, res, next) + } + // Remove the condition above when we are no longer sending to Airtable + if (!ajv.validate(schemaHydro, req.body)) { + if (process.env.NODE_ENV === 'development') console.log(ajv.errorsText()) + return res.status(400).json({}) + } + const fields = omit(req.body, OMIT_FIELDS) + try { + const hydroRes = await req.hydro.publish(req.hydro.schemas[req.body.type], fields) + if (!hydroRes.ok) return res.status(502).json({}) + return res.status(201).json(fields) + } catch (err) { + if (process.env.NODE_ENV === 'development') console.log(err) + return res.status(502).json({}) } }) @@ -60,7 +82,7 @@ router.put('/:id', async (req, res, next) => { return res.status(200).send({}) } catch (err) { console.error('unable to PUT event', err) - return res.status(err.statusCode).send(err) + return res.status(502).send({}) } }) diff --git a/middleware/index.js b/middleware/index.js index c98847e67731..b19df343ac4e 100644 --- a/middleware/index.js +++ b/middleware/index.js @@ -24,6 +24,7 @@ module.exports = function (app) { app.use(require('./cors')) app.use(require('./csp')) app.use(require('helmet')()) + app.use(require('./req-utils')) app.use(require('./robots')) app.use(require('./cookie-parser')) app.use(require('./csrf')) diff --git a/middleware/req-utils.js b/middleware/req-utils.js new file mode 100644 index 000000000000..d82bb959ed32 --- /dev/null +++ b/middleware/req-utils.js @@ -0,0 +1,6 @@ +const Hydro = require('../lib/hydro') + +module.exports = (req, res, next) => { + req.hydro = new Hydro() + return next() +} diff --git a/package-lock.json b/package-lock.json index 402075a1ce1b..f3ecdd2c5222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1144,9 +1144,9 @@ } }, "@github/rest-api-operations": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-2.1.0.tgz", - "integrity": "sha512-F9E4WIpe8LtDBI9vD8ZuAiaL6DaKv8wZQ2Qkay3hkbJZB4ehxCcgoDmGQODNQEb1u624gbnAOzTG2hrVSuZNUA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-3.1.0.tgz", + "integrity": "sha512-RszMVxIbGvey7pS1wUZ7yULUGH2SFQFYodsAv5X0oubWoJQSlmw1RGoyc8b2YeD/VD4Ljjrq73y3bhu+6eVOlg==" }, "@hapi/address": { "version": "2.1.4", @@ -7289,7 +7289,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -9907,7 +9907,7 @@ "dependencies": { "mkdirp": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" }, "nopt": { diff --git a/package.json b/package.json index 0a873bd3e0a5..afd316ffc3fb 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "name": "GitHub", "url": "https://github.com/github/docs" }, + "license": "(MIT AND CC-BY-4.0)", "dependencies": { "@babel/core": "^7.8.3", "@babel/plugin-transform-runtime": "^7.11.0", @@ -15,7 +16,7 @@ "@github-docs/data-directory": "^1.2.0", "@github-docs/frontmatter": "^1.3.1", "@github-docs/render-content": "^5.0.0", - "@github/rest-api-operations": "^2.1.0", + "@github/rest-api-operations": "^3.1.0", "@octokit/rest": "^16.38.1", "@primer/css": "^15.1.0", "@primer/octicons": "^11.0.0", diff --git a/script/new-versioning/update-frontmatter.js b/script/new-versioning/update-frontmatter.js index e5d8ef3b8904..f76379fd2064 100755 --- a/script/new-versioning/update-frontmatter.js +++ b/script/new-versioning/update-frontmatter.js @@ -10,7 +10,7 @@ const dirsToProcess = ['content', 'translations'] const allFiles = flatten(dirsToProcess.map(dir => { return walk(path.join(process.cwd(), dir), { includeBasePath: true, directories: false }) .filter(file => !file.endsWith('README.md')) - .filter(file => !file.endsWith('LICENSE')) + .filter(file => !(file.endsWith('LICENSE') || file.endsWith('LICENSE-CODE'))) // we only want to process frontmatter in content files in translations, so skip data files // this is very brittle but works well enough for this script // (note data files are updated in script/new-versioning/update-content.js) diff --git a/script/remove-deprecated-enterprise-version-markup.js b/script/remove-deprecated-enterprise-version-markup.js index 33133949d021..8a746c6d80c9 100755 --- a/script/remove-deprecated-enterprise-version-markup.js +++ b/script/remove-deprecated-enterprise-version-markup.js @@ -52,7 +52,7 @@ console.log(`Next oldest version: ${nextOldestVersion}\n`) // gather content and data files const contentFiles = walk(contentPath, { includeBasePath: true, directories: false }) .filter(file => file.endsWith('.md')) - .filter(file => !(file.endsWith('README.md') || file === 'LICENSE')) + .filter(file => !(file.endsWith('README.md') || file === 'LICENSE' || file === 'LICENSE-CODE')) const dataFiles = walk(dataPath, { includeBasePath: true, directories: false }) .filter(file => file.includes('data/reusables') || file.includes('data/variables')) diff --git a/tests/content/lint-files.js b/tests/content/lint-files.js index 7a918b074731..085a392e4e0c 100644 --- a/tests/content/lint-files.js +++ b/tests/content/lint-files.js @@ -1,4 +1,5 @@ const path = require('path') +const slash = require('slash') const fs = require('fs') const walk = require('walk-sync') const matter = require('@github-docs/frontmatter') @@ -109,11 +110,11 @@ describe('lint-files', () => { } const contentMarkdownAbsPaths = walk(contentDir, mdWalkOptions).sort() - const contentMarkdownRelPaths = contentMarkdownAbsPaths.map(p => path.relative(rootDir, p)) + const contentMarkdownRelPaths = contentMarkdownAbsPaths.map(p => slash(path.relative(rootDir, p))) const contentMarkdownTuples = zip(contentMarkdownRelPaths, contentMarkdownAbsPaths) const reusableMarkdownAbsPaths = walk(reusablesDir, mdWalkOptions).sort() - const reusableMarkdownRelPaths = reusableMarkdownAbsPaths.map(p => path.relative(rootDir, p)) + const reusableMarkdownRelPaths = reusableMarkdownAbsPaths.map(p => slash(path.relative(rootDir, p))) const reusableMarkdownTuples = zip(reusableMarkdownRelPaths, reusableMarkdownAbsPaths) describe.each([...contentMarkdownTuples, ...reusableMarkdownTuples])( diff --git a/tests/rendering/events.js b/tests/rendering/events.js index 0380ca09abe0..7292e79233fc 100644 --- a/tests/rendering/events.js +++ b/tests/rendering/events.js @@ -1,5 +1,6 @@ const request = require('supertest') const Airtable = require('airtable') +const nock = require('nock') const app = require('../../server') jest.mock('airtable') @@ -19,17 +20,33 @@ describe('POST /events', () => { beforeEach(async () => { process.env.AIRTABLE_API_KEY = '$AIRTABLE_API_KEY$' process.env.AIRTABLE_BASE_KEY = '$AIRTABLE_BASE_KEY$' + process.env.HYDRO_SECRET = '$HYDRO_SECRET$' + process.env.HYDRO_ENDPOINT = 'http://example.com/hydro' agent = request.agent(app) const csrfRes = await agent.get('/csrf') csrfToken = csrfRes.body.token + nock('http://example.com') + .post('/hydro') + .reply(200, {}) }) afterEach(() => { delete process.env.AIRTABLE_API_KEY delete process.env.AIRTABLE_BASE_KEY + delete process.env.HYDRO_SECRET + delete process.env.HYDRO_ENDPOINT csrfToken = '' }) + async function checkEvent (data, code) { + return agent + .post('/events') + .send(data) + .set('Accept', 'application/json') + .set('csrf-token', csrfToken) + .expect(code) + } + describe('HELPFULNESS', () => { const example = { type: 'HELPFULNESS', @@ -41,94 +58,43 @@ describe('POST /events', () => { } it('should accept a valid object', () => - agent - .post('/events') - .send(example) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(201) + checkEvent(example, 201) ) it('should reject extra properties', () => - agent - .post('/events') - .send({ ...example, toothpaste: false }) - .set('Accept', 'application/json') - - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, toothpaste: false }, 400) ) it('should not accept if type is missing', () => - agent - .post('/events') - .send({ ...example, type: undefined }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, type: undefined }, 400) ) it('should not accept if url is missing', () => - agent - .post('/events') - .send({ ...example, url: undefined }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, url: undefined }, 400) ) it('should not accept if url is misformatted', () => - agent - .post('/events') - .send({ ...example, url: 'examplecom' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, url: 'examplecom' }, 400) ) it('should not accept if vote is missing', () => - agent - .post('/events') - .send({ ...example, vote: undefined }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, vote: undefined }, 400) ) it('should not accept if vote is not boolean', () => - agent - .post('/events') - .send({ ...example, vote: 'true' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, vote: 'true' }, 400) ) it('should not accept if email is misformatted', () => - agent - .post('/events') - .send({ ...example, email: 'testexample.com' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, email: 'testexample.com' }, 400) ) it('should not accept if comment is not string', () => - agent - .post('/events') - .send({ ...example, comment: [] }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, comment: [] }, 400) ) it('should not accept if category is not an option', () => - agent - .post('/events') - .send({ ...example, category: 'Fabulous' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, category: 'Fabulous' }, 400) ) }) @@ -142,57 +108,401 @@ describe('POST /events', () => { } it('should accept a valid object', () => - agent - .post('/events') - .send(example) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(201) + checkEvent(example, 201) ) it('should reject extra fields', () => - agent - .post('/events') - .send({ ...example, toothpaste: false }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, toothpaste: false }, 400) ) it('should require a long unique user-id', () => - agent - .post('/events') - .send({ ...example, 'user-id': 'short' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, 'user-id': 'short' }, 400) ) it('should require a test', () => - agent - .post('/events') - .send({ ...example, test: undefined }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, test: undefined }, 400) ) it('should require a valid group', () => - agent - .post('/events') - .send({ ...example, group: 'revolution' }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(400) + checkEvent({ ...example, group: 'revolution' }, 400) ) it('should default the success field', () => - agent - .post('/events') - .send({ ...example, success: undefined }) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(201) + checkEvent({ ...example, success: undefined }, 201) + ) + }) + + const baseExample = { + context: { + // Primitives + event_id: 'a35d7f88-3f48-4f36-ad89-5e3c8ebc3df7', + user: '703d32a8-ed0f-45f9-8d78-a913d4dc6f19', + version: '1.0.0', + created: '2020-10-02T17:12:18.620Z', + + // Content information + path: '/github/docs/issues', + referrer: 'https://github.com/github/docs', + search: '?q=is%3Aissue+is%3Aopen+example+', + href: 'https://github.com/github/docs/issues?q=is%3Aissue+is%3Aopen+example+', + site_language: 'en', + + // Device information + os: 'linux', + os_version: '18.04', + browser: 'chrome', + browser_version: '85.0.4183.121', + viewport_width: 1418, + viewport_height: 501, + + // Location information + timezone: -7, + user_language: 'en-US' + } + } + + describe('page', () => { + const pageExample = { ...baseExample, type: 'page' } + + it('should record a page event', () => + checkEvent(pageExample, 201) + ) + + it('should require a type', () => + checkEvent(baseExample, 400) + ) + + it('should require an event_id in uuid', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + event_id: 'asdfghjkl' + } + }, 400) + ) + + it('should require a user in uuid', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + user: 'asdfghjkl' + } + }, 400) + ) + + it('should require a version', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + version: undefined + } + }, 400) + ) + + it('should require created timestamp', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + timestamp: 1234 + } + }, 400) + ) + + it('should not allow a honeypot token', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + token: 'zxcv' + } + }, 400) + ) + + it('should path be uri-reference', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + path: ' ' + } + }, 400) + ) + + it('should referrer be uri-reference', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + referrer: ' ' + } + }, 400) + ) + + it('should search a string', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + search: 1234 + } + }, 400) + ) + + it('should href be uri', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + href: '/example' + } + }, 400) + ) + + it('should site_language is a valid option', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + site_language: 'nl' + } + }, 400) + ) + + it('should a valid os option', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + os: 'ubuntu' + } + }, 400) + ) + + it('should os_version a string', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + os_version: 25 + } + }, 400) + ) + + it('should browser a valid option', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + browser: 'opera' + } + }, 400) + ) + + it('should browser_version a string', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + browser_version: 25 + } + }, 400) + ) + + it('should viewport_width a number', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + viewport_width: -500 + } + }, 400) + ) + + it('should viewport_height a number', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + viewport_height: '53px' + } + }, 400) + ) + + it('should timezone in number', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + timezone: 'GMT-0700' + } + }, 400) + ) + + it('should user_language is a string', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + user_language: true + } + }, 400) + ) + + it('should page_render_duration is a positive number', () => + checkEvent({ + ...pageExample, + page_render_duration: -0.5 + }, 400) + ) + }) + + describe('exit', () => { + const exitExample = { + ...baseExample, + type: 'exit', + exit_page_id: 'c93c2d16-8e07-43d5-bc3c-eacc999c184d', + exit_first_paint: 0.1, + exit_dom_interactive: 0.2, + exit_dom_complete: 0.3, + exit_visit_duration: 5, + exit_scroll_length: 0.5 + } + + it('should record an exit event', () => + checkEvent(exitExample, 201) + ) + + it('should require exit_page_id', () => + checkEvent({ ...exitExample, exit_page_id: undefined }, 400) + ) + + it('should require exit_page_id is a uuid', () => + checkEvent({ ...exitExample, exit_page_id: 'afjdskalj' }, 400) + ) + + it('exit_first_paint is a number', () => + checkEvent({ ...exitExample, exit_first_paint: 'afjdkl' }, 400) + ) + + it('exit_dom_interactive is a number', () => + checkEvent({ ...exitExample, exit_dom_interactive: '202' }, 400) + ) + + it('exit_visit_duration is a number', () => + checkEvent({ ...exitExample, exit_visit_duration: '75' }, 400) + ) + + it('exit_scroll_length is a number between 0 and 1', () => + checkEvent({ ...exitExample, exit_scroll_length: 1.1 }, 400) + ) + }) + + describe('link', () => { + const linkExample = { + ...baseExample, + type: 'link', + link_url: 'https://example.com' + } + + it('should send a link event', () => + checkEvent(linkExample, 201) + ) + + it('link_url is a required uri formatted string', () => + checkEvent({ ...linkExample, link_url: 'foo' }, 400) + ) + }) + + describe('search', () => { + const searchExample = { + ...baseExample, + type: 'search', + search_query: 'github private instances', + search_context: 'private' + } + + it('should record a search event', () => + checkEvent(searchExample, 201) + ) + + it('search_query is required string', () => + checkEvent({ ...searchExample, search_query: undefined }, 400) + ) + + it('search_context is optional string', () => + checkEvent({ ...searchExample, search_context: undefined }, 201) + ) + }) + + describe('navigate', () => { + const navigateExample = { + ...baseExample, + type: 'navigate', + navigate_label: 'drop down' + } + + it('should record a navigate event', () => + checkEvent(navigateExample, 201) + ) + + it('navigate_label is optional string', () => + checkEvent({ ...navigateExample, navigate_label: undefined }, 201) + ) + }) + + describe('survey', () => { + const surveyExample = { + ...baseExample, + type: 'survey', + survey_vote: true, + survey_comment: 'I love this site.', + survey_email: 'daisy@example.com' + } + + it('should record a survey event', () => + checkEvent(surveyExample, 201) + ) + + it('survey_vote is boolean', () => + checkEvent({ ...surveyExample, survey_vote: undefined }, 400) + ) + + it('survey_comment is string', () => { + checkEvent({ ...surveyExample, survey_comment: 1234 }, 400) + }) + + it('survey_email is email', () => { + checkEvent({ ...surveyExample, survey_email: 'daisy' }, 400) + }) + }) + + describe('experiment', () => { + const experimentExample = { + ...baseExample, + type: 'experiment', + experiment_name: 'change-button-copy', + experiment_variation: 'treatment', + experiment_success: true + } + + it('should record an experiment event', () => + checkEvent(experimentExample, 201) + ) + + it('experiment_name is required string', () => + checkEvent({ ...experimentExample, experiment_name: undefined }, 400) + ) + + it('experiment_variation is required string', () => + checkEvent({ ...experimentExample, experiment_variation: undefined }, 400) + ) + + it('experiment_success is optional boolean', () => + checkEvent({ ...experimentExample, experiment_success: undefined }, 201) ) }) }) diff --git a/tests/rendering/rest.js b/tests/rendering/rest.js index 70f2946efa6f..ac43413933fa 100644 --- a/tests/rendering/rest.js +++ b/tests/rendering/rest.js @@ -40,6 +40,12 @@ describe('REST references docs', () => { expect(operation.description).toContain('GitHub Enterprise') }) + test('loads operations enabled for GitHub Apps', async () => { + const operations = await getJSON('/en/free-pro-team@latest/rest/overview/endpoints-available-for-github-apps?json=rest.operationsEnabledForGitHubApps') + expect(operations['free-pro-team@latest'].actions.length).toBeGreaterThan(0) + expect(operations['enterprise-server@2.22'].actions.length).toBeGreaterThan(0) + }) + test('no wrongly detected AppleScript syntax highlighting in schema data', async () => { const { operations } = require('../../lib/rest') expect(JSON.stringify(operations).includes('hljs language-applescript')).toBe(false) diff --git a/tests/unit/actions-workflows.js b/tests/unit/actions-workflows.js index 872e0adf986f..614f558e834f 100644 --- a/tests/unit/actions-workflows.js +++ b/tests/unit/actions-workflows.js @@ -19,17 +19,23 @@ function actionsUsedInWorkflow (workflow) { .map(key => get(workflow, key)) } +const allUsedActions = chain(workflows) + .map(actionsUsedInWorkflow) + .flatten() + .uniq() + .sort() + .value() + describe('GitHub Actions workflows', () => { - test('only use allowed actions from ./github/allow-actions.json', async () => { - const allUsedActions = chain(workflows) - .map(actionsUsedInWorkflow) - .flatten() - .uniq() - .sort() - .value() + test('all used actions are allowed in .github/allowed-actions.js', () => { + expect(allUsedActions.length).toBeGreaterThan(0) + const unusedActions = difference(allowedActions, allUsedActions) + expect(unusedActions).toEqual([]) + }) + test('all allowed actions by .github/allowed-actions.js are used by at least one workflow', () => { expect(allowedActions.length).toBeGreaterThan(0) - expect(allUsedActions.length).toBeGreaterThan(0) - expect(difference(allowedActions, allUsedActions)).toEqual([]) + const disallowedActions = difference(allUsedActions, allowedActions) + expect(disallowedActions).toEqual([]) }) }) diff --git a/tests/unit/hydro.js b/tests/unit/hydro.js index 806d6d1a3e06..6fd5955d2f6f 100644 --- a/tests/unit/hydro.js +++ b/tests/unit/hydro.js @@ -11,18 +11,22 @@ describe('hydro', () => { reqheaders: { Authorization: /^Hydro [\d\w]{64}$/, 'Content-Type': 'application/json', - 'X-Hydro-App': 'docs' + 'X-Hydro-App': 'docs-production' } }) - // Respond with a 201 and store the body we sent - .post('/').reply(201, (_, body) => { params = body }) + // Respond with a 200 and store the body we sent + .post('/').reply(200, (_, body) => { params = body }) }) describe('#publish', () => { it('publishes a single event to Hydro', async () => { await hydro.publish('event-name', { pizza: true }) expect(params).toEqual({ - events: [{ schema: 'event-name', value: { pizza: true } }] + events: [{ + schema: 'event-name', + value: JSON.stringify({ pizza: true }), + cluster: 'potomac' + }] }) }) }) @@ -35,10 +39,15 @@ describe('hydro', () => { ]) expect(params).toEqual({ - events: [ - { schema: 'event-name', value: { pizza: true } }, - { schema: 'other-name', value: { salad: false } } - ] + events: [{ + schema: 'event-name', + value: JSON.stringify({ pizza: true }), + cluster: 'potomac' + }, { + schema: 'other-name', + value: JSON.stringify({ salad: false }), + cluster: 'potomac' + }] }) }) }) diff --git a/translations/ja-JP/content/README.md b/translations/ja-JP/content/README.md deleted file mode 100644 index 4a9324a45843..000000000000 --- a/translations/ja-JP/content/README.md +++ /dev/null @@ -1,279 +0,0 @@ -# Content - -The `/content` directory is where all the site's (English) Markdown content lives! - -See the [Markup Reference Guide](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/markup-reference.md) in the `product-documentation` repo for more info about supported Markdown features. - -See the top-level [README](../README.md) for general info about how the site works. - -- [Frontmatter](#frontmatter) - - [`hidden`](#hidden) - - [`productVersions`](#productversions) - - [`redirect_from`](#redirect_from) - - [`title`](#title) - - [`intro`](#intro) - - [`layout`](#layout) - - [`mapTopic`](#maptopic) - - [Escaping single quotes](#escaping-single-quotes) -- [Index Pages](#index-pages) - - [Dotcom index page](#dotcom-index-page) -- [Hidden Pages](#hidden-pages) -- [Category Pages](#category-pages) -- [Map Topic Pages](#map-topic-pages) -- [Versioning](#versioning) -- [Filenames](#filenames) -- [Whitespace Control](#whitespace-control) -- [Links and image paths](#links-and-image-paths) - -## Frontmatter - -[YAML Frontmatter](https://jekyllrb.com/docs/front-matter/) is an authoring convention popularized by Jekyll that provides a way to add metadata to pages. It is a block of key-value content that lives at the top of every Markdown file. The following frontmatter values have special meanings and requirements for this site: - -### `hidden` - -- Purpose: Indicates whether a page should be excluded from searches, crawlers, TOCs, etc. See [Hidden Pages](#hidden-pages) for more info. -- Type: `Boolean`. Default is `false`. - -### `productVersions` - -- Purpose: Indicates the products and product versions to which a page applies. See [Versioning](#versioning) for more info. -- Type: `Object`. Allowable keys are `dotcom` and `enterprise` -- This frontmatter value is currently **required** for all pages. - -Example that applies to GitHub.com and recent versions of GitHub Enterprise: - -```yml -title: About your personal dashboard -productVersions: - dotcom: '*' - enterprise: '>=2.14' -``` - -Example that applies to all supported versions of GitHub enterprise (but not GitHub.com): - -```yml -title: Downloading your license -productVersions: - enterprise: '*' -``` - -Note: `dotcom` is an evergreen product without versions, so the `*` is used to denote all versions. - -### `redirect_from` - -- Purpose: List URLs that should redirect to this page. -- Type: `Array` (for multiple redirects) or `String` (for just one) -- ไปปๆ„ - -Example with multiple redirects: - -```yml -title: Getting Started with GitHub Desktop -redirect_from: - - /articles/first-launch/ - - /articles/error-github-enterprise-version-is-too-old/ - - /articles/getting-started-with-github-for-windows/ -``` - -Example with a single redirect: - -```yml -title: Denying access to a previously approved OAuth App for your organization -redirect_from: /articles/denying-access-to-a-previously-approved-application-for-your-organization/ -``` - -See [README#redirects](../README#redirects) for more info. - -### `title` - -- Purpose: Set a human-friendly title for use in the rendered page's `` tag and an `h1` element at the top of the page. -- Type: `String` -- Optional. If omitted, the page `<title>` will still be set, albeit with a generic value like `GitHub.com` or `GitHub Entperprise`. - -### `intro` - -- Purpose: Sets the intro for the article. -- Type: `String` -- Optional. - -### `layout` - -- Purpose: Wrap the page in a custom HTML layout. -- Type: `String` that matches the name of the layout file, without an extension. For a layout named `layouts/article.html`, the value would be `article`. -- Optional. If omitted, `layouts/default.html` is used. - -### `mapTopic` - -- Purpose: Indicates whether a page is a map topic. See [Map Topic Pages](#map-topic-pages) for more info. -- Type: `Boolean`. Default is `false`. -- Optional. - -### Escaping single quotes - -If you see two single quotes in a row (`''`) in YML frontmatter where you might expect to see one (`'`), this is the YML-preferred way to escape a single quote. From [the YAML spec](https://yaml.org/spec/history/2001-12-10.html): - -> In single quoted leaves, a single quote character needs to be escaped. This is done by repeating the character. - -As an alternative, you can change the single quotes surrounding the frontmatter field to double quotes and leave interior single quotes unescaped. - -## Index Pages - -Index pages are written in Markdown, and are always named `index.md`. They exist as landing pages dedicated to specific GitHub products or topical groupings of articles. Each index page contains a Table of Contents (TOC) with links to articles. - -Product indexes: - -| Filename | URL Path | ็›ฎ็š„ | -| ---------------------------- | ------------------------------------------------------------- | -------------------------------------------- | -| `/index.md` | [/](https://help.github.com/) | GitHub.com and GitHub Enterprise "User" Docs | -| `/enterprise/index.md` | [/enterprise](https://help.github.com/enterprise) | GitHub Enterprise | -| `/enterprise/admin/index.md` | [/enterprise/admin](https://help.github.com/enterprise/admin) | Enterprise Admin | -| `/desktop/index.md` | [/desktop](https://help.github.com/desktop) | Desktop | - -GitHub Enterprise Admin also has index pages: - -| Filename | URL Path | ็›ฎ็š„ | -| ----------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------ | -| `/enterprise/admin/clustering/index.md` | [/enterprise/admin/clustering](https://help.github.com/enterprise/admin/clustering) | Clustering | -| `/enterprise/admin/developer-workflow/index.md` | [/enterprise/admin/developer-workflow](https://help.github.com/enterprise/admin/developer-workflow) | Developer Workflow | -| `/enterprise/admin/enterprise-support/index.md` | [/enterprise/admin/enterprise-support](https://help.github.com/enterprise/admin/enterprise-support) | Enterprise Support | -| `/enterprise/admin/installation/index.md` | [/enterprise/admin/installation](https://help.github.com/enterprise/admin/installation) | Installation | -| `/enterprise/admin/migrations/index.md` | [/enterprise/admin/migrations](https://help.github.com/enterprise/admin/migrations) | Migrations | -| `/enterprise/admin/user-management/index.md` | [/enterprise/admin/user-management](https://help.github.com/enterprise/admin/user-management) | ใƒฆใƒผใ‚ถ็ฎก็† | - -See <enterprise/admin/README.md> for details on how guides should be written. - -Desktop guides also have index pages: - -| Filename | URL Path | ็›ฎ็š„ | -| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | -| `/desktop/contributing-to-projects` | [/desktop/contributing-to-projects](https://help.github.com/desktop/contributing-to-projects) | Contributing to Projects | -| `/desktop/getting-started-with-github-desktop` | [/desktop/getting-started-with-github-desktop](https://help.github.com/desktop/getting-started-with-github-desktop) | Getting Started with GitHub Desktop | - -**Note**: All links to GitHub Desktop Classic (such as `https://help.github.com/desktop-classic`) now redirect to https://desktop.github.com. - -### Dotcom index page - -The file `content/index.md` is rendered as a long TOC on the https://help.github.com homepage. - -The formatting of this file must adhere to a specific structure in order for the site to render the page properly and create automatic links to articles: - -| Content type | Formatting | ใ‚ตใƒณใƒ—ใƒซ | -| ----------------------------- | ---------- | ------------------------------------ | -| [Category](#category-pages) | `h2` | `## Bootcamp` | -| [Map topic](#map-topic-pages) | `h3` | `### Managing user account settings` | -| Article | List item | `- Set up git` | - -See [Whitespace Control](#whitespace-control) for info on using Liquid conditionals within TOC lists. - -## Hidden Pages - -Hidden pages are publicly accessible but excluded from the search index, and they're not linked to by any other pages. - -In development, you can view a list of all hidden pages by visiting [localhost:4000/hidden](http://localhost:4000/hidden). Note, however, that this page is not available in production. - -To make a page hidden, add `hidden: true` to its YAML frontmatter. - -## Category Pages - -Category pages are only found in Dotcom docs (e.g., https://help.github.com/categories/bootcamp). The content displayed on these pages is autogenerated from the category's parent [index page](#dotcom-index-pages), where the name of the category is an `h2`. - -Every category in the index page must have a corresponding placeholder file in `content/dotcom/categories` ending in `.md`. You can add redirects to the placeholder files. - -## Map Topic Pages - -Map topics are found in Dotcom, Enterprise Admin, and Desktop docs. The content displayed on these pages is autogenerated from each map topic's parent [index page](#index-pages). Map topic files live alongside article files. - -To make a page a map topic, add `mapTopic: true` to its YAML frontmatter and leave the rest of the file empty. - -## Versioning - -Versioning for any content file lives in **two** places: - -- The file's [`productVersions`](#productversions) frontmatter. -- Liquid conditionals in the file's parent [index page](#index-pages). - -For example, an article with this frontmatter: - -```yml -title: About your personal dashboard -productVersions: - dotcom: '*' - enterprise: '>=2.14' -``` - -should be referenced in the parent index page like this: -{%- if page.version == 'dotcom' or page.version ver_gt "2.13" %} -- About your personal dashboard -{%- endif %} -## Filenames - -The site automatically creates links to articles in index pages. For example, this block in `content/index.md`: - - ## Bootcamp - - - Set up git - - Create a repo - - Fork a repo - - Be social - - -renders with links to each article. - -If you're adding a new article, make sure the filename is a [kebab-cased](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) version of the title you use in both the article and the parent index. This can get tricky when a title has punctuation (such as "GitHub's Billing Plans"). If you're not sure what the filename should be based on the title, you can find out by adding the title to the TOC. ไพ‹: - - ## Bootcamp - - - Set up git - - Create a repo - - Fork a repo - - Be social - - I'm a new article - - -Then just run the site locally and see what the link is. In this example, the filename would be: `im-a-new-article` - -## Whitespace Control - -When using Liquid conditionals in lists or tables, you can use [whitespace control](https://shopify.github.io/liquid/basics/whitespace/) characters to prevent the addition of newlines that would break the list or table rendering. - -Just add a hyphen on either the left, right, or both sides to indicate that there should be no newline on that side. For example, this statement removes a newline on the left side: -{%- if page.version == 'dotcom' %} -These characters are especially important in [index pages](#index-pages) comprised of list items. - -## Links and image paths - -Any local links (like those starting with `/articles/`) and image paths (starting with `/assets`) that you include in content and data files will undergo some transformations on the server side to match the current page's language and Enterprise version (if applicable). The handling for these transformations lives in [`lib/rewrite-local-links`](lib/rewrite-local-links.js) and [`lib/rewrite-asset-paths-to-s3`](lib/rewrite-asset-paths-to-s3.js). - -For example, if you include the following link in a content file: - - /articles/creating-a-saved-reply - - -When viewed on Dotcom, the link gets rendered with the language code: - - /en/articles/creating-a-saved-reply - - -and when viewed on GHE, the version is included as well: - - /en/enterprise/2.16/user/articles/creating-a-saved-reply - - -The transformation is a little simpler for image paths. If you include the following image path in a content file: - - /assets/images/help/profile/follow-user-button.png - - -when viewed on GHE, the path gets rewritten to include S3: - - https://github-images.s3.amazonaws.com/enterprise/2.16/assets/images/help/profile/follow-user-button.png - - -### Preventing transformations - -Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, write the link using HTML and add a class of `dotcom-only`. ไพ‹: - - <a href="/articles/github-terms-of-service/" class="dotcom-only">GitHub's Terms of Service</a> - - -Sometimes the canonical home of content moves outside the help site. None of the links included in [`lib/external-redirects.json`](lib/external-redirects.json) get rewritten. See the top-level [README](../README.md#external-redirects) for more info about this type of redirect. \ No newline at end of file diff --git a/translations/zh-CN/content/README.md b/translations/zh-CN/content/README.md deleted file mode 100644 index b1d602fb5933..000000000000 --- a/translations/zh-CN/content/README.md +++ /dev/null @@ -1,279 +0,0 @@ -# Content - -The `/content` directory is where all the site's (English) Markdown content lives! - -See the [Markup Reference Guide](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/markup-reference.md) in the `product-documentation` repo for more info about supported Markdown features. - -See the top-level [README](../README.md) for general info about how the site works. - -- [Frontmatter](#frontmatter) - - [`hidden`](#hidden) - - [`productVersions`](#productversions) - - [`redirect_from`](#redirect_from) - - [`title`](#title) - - [`intro`](#intro) - - [`layout`](#layout) - - [`mapTopic`](#maptopic) - - [Escaping single quotes](#escaping-single-quotes) -- [Index Pages](#index-pages) - - [Dotcom index page](#dotcom-index-page) -- [Hidden Pages](#hidden-pages) -- [Category Pages](#category-pages) -- [Map Topic Pages](#map-topic-pages) -- [Versioning](#versioning) -- [Filenames](#filenames) -- [Whitespace Control](#whitespace-control) -- [Links and image paths](#links-and-image-paths) - -## Frontmatter - -[YAML Frontmatter](https://jekyllrb.com/docs/front-matter/) is an authoring convention popularized by Jekyll that provides a way to add metadata to pages. It is a block of key-value content that lives at the top of every Markdown file. The following frontmatter values have special meanings and requirements for this site: - -### `hidden` - -- Purpose: Indicates whether a page should be excluded from searches, crawlers, TOCs, etc. See [Hidden Pages](#hidden-pages) for more info. -- Type: `Boolean`. Default is `false`. - -### `productVersions` - -- Purpose: Indicates the products and product versions to which a page applies. See [Versioning](#versioning) for more info. -- Type: `Object`. Allowable keys are `dotcom` and `enterprise` -- This frontmatter value is currently **required** for all pages. - -Example that applies to GitHub.com and recent versions of GitHub Enterprise: - -```yml -title: About your personal dashboard -productVersions: - dotcom: '*' - enterprise: '>=2.14' -``` - -Example that applies to all supported versions of GitHub enterprise (but not GitHub.com): - -```yml -title: Downloading your license -productVersions: - enterprise: '*' -``` - -Note: `dotcom` is an evergreen product without versions, so the `*` is used to denote all versions. - -### `redirect_from` - -- Purpose: List URLs that should redirect to this page. -- Type: `Array` (for multiple redirects) or `String` (for just one) -- Optional - -Example with multiple redirects: - -```yml -title: Getting Started with GitHub Desktop -redirect_from: - - /articles/first-launch/ - - /articles/error-github-enterprise-version-is-too-old/ - - /articles/getting-started-with-github-for-windows/ -``` - -Example with a single redirect: - -```yml -title: Denying access to a previously approved OAuth App for your organization -redirect_from: /articles/denying-access-to-a-previously-approved-application-for-your-organization/ -``` - -See [README#redirects](../README#redirects) for more info. - -### `title` - -- Purpose: Set a human-friendly title for use in the rendered page's `<title>` tag and an `h1` element at the top of the page. -- Type: `String` -- Optional. If omitted, the page `<title>` will still be set, albeit with a generic value like `GitHub.com` or `GitHub Entperprise`. - -### `intro` - -- Purpose: Sets the intro for the article. -- Type: `String` -- Optional. - -### `layout` - -- Purpose: Wrap the page in a custom HTML layout. -- Type: `String` that matches the name of the layout file, without an extension. For a layout named `layouts/article.html`, the value would be `article`. -- Optional. If omitted, `layouts/default.html` is used. - -### `mapTopic` - -- Purpose: Indicates whether a page is a map topic. See [Map Topic Pages](#map-topic-pages) for more info. -- Type: `Boolean`. Default is `false`. -- Optional. - -### Escaping single quotes - -If you see two single quotes in a row (`''`) in YML frontmatter where you might expect to see one (`'`), this is the YML-preferred way to escape a single quote. From [the YAML spec](https://yaml.org/spec/history/2001-12-10.html): - -> In single quoted leaves, a single quote character needs to be escaped. This is done by repeating the character. - -As an alternative, you can change the single quotes surrounding the frontmatter field to double quotes and leave interior single quotes unescaped. - -## Index Pages - -Index pages are written in Markdown, and are always named `index.md`. They exist as landing pages dedicated to specific GitHub products or topical groupings of articles. Each index page contains a Table of Contents (TOC) with links to articles. - -Product indexes: - -| Filename | URL Path | Purpose | -| ---------------------------- | ------------------------------------------------------------- | -------------------------------------------- | -| `/index.md` | [/](https://help.github.com/) | GitHub.com and GitHub Enterprise "User" Docs | -| `/enterprise/index.md` | [/enterprise](https://help.github.com/enterprise) | GitHub Enterprise | -| `/enterprise/admin/index.md` | [/enterprise/admin](https://help.github.com/enterprise/admin) | Enterprise Admin | -| `/desktop/index.md` | [/desktop](https://help.github.com/desktop) | Desktop | - -GitHub Enterprise Admin also has index pages: - -| Filename | URL Path | Purpose | -| ----------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------ | -| `/enterprise/admin/clustering/index.md` | [/enterprise/admin/clustering](https://help.github.com/enterprise/admin/clustering) | Clustering | -| `/enterprise/admin/developer-workflow/index.md` | [/enterprise/admin/developer-workflow](https://help.github.com/enterprise/admin/developer-workflow) | Developer Workflow | -| `/enterprise/admin/enterprise-support/index.md` | [/enterprise/admin/enterprise-support](https://help.github.com/enterprise/admin/enterprise-support) | Enterprise Support | -| `/enterprise/admin/installation/index.md` | [/enterprise/admin/installation](https://help.github.com/enterprise/admin/installation) | Installation | -| `/enterprise/admin/migrations/index.md` | [/enterprise/admin/migrations](https://help.github.com/enterprise/admin/migrations) | Migrations | -| `/enterprise/admin/user-management/index.md` | [/enterprise/admin/user-management](https://help.github.com/enterprise/admin/user-management) | User Management | - -See <enterprise/admin/README.md> for details on how guides should be written. - -Desktop guides also have index pages: - -| Filename | URL Path | Purpose | -| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | -| `/desktop/contributing-to-projects` | [/desktop/contributing-to-projects](https://help.github.com/desktop/contributing-to-projects) | Contributing to Projects | -| `/desktop/getting-started-with-github-desktop` | [/desktop/getting-started-with-github-desktop](https://help.github.com/desktop/getting-started-with-github-desktop) | Getting Started with GitHub Desktop | - -**Note**: All links to GitHub Desktop Classic (such as `https://help.github.com/desktop-classic`) now redirect to https://desktop.github.com. - -### Dotcom index page - -The file `content/index.md` is rendered as a long TOC on the https://help.github.com homepage. - -The formatting of this file must adhere to a specific structure in order for the site to render the page properly and create automatic links to articles: - -| Content type | Formatting | Example | -| ----------------------------- | ---------- | ------------------------------------ | -| [Category](#category-pages) | `h2` | `## Bootcamp` | -| [Map topic](#map-topic-pages) | `h3` | `### Managing user account settings` | -| Article | List item | `- Set up git` | - -See [Whitespace Control](#whitespace-control) for info on using Liquid conditionals within TOC lists. - -## Hidden Pages - -Hidden pages are publicly accessible but excluded from the search index, and they're not linked to by any other pages. - -In development, you can view a list of all hidden pages by visiting [localhost:4000/hidden](http://localhost:4000/hidden). Note, however, that this page is not available in production. - -To make a page hidden, add `hidden: true` to its YAML frontmatter. - -## Category Pages - -Category pages are only found in Dotcom docs (e.g., https://help.github.com/categories/bootcamp). The content displayed on these pages is autogenerated from the category's parent [index page](#dotcom-index-pages), where the name of the category is an `h2`. - -Every category in the index page must have a corresponding placeholder file in `content/dotcom/categories` ending in `.md`. You can add redirects to the placeholder files. - -## Map Topic Pages - -Map topics are found in Dotcom, Enterprise Admin, and Desktop docs. The content displayed on these pages is autogenerated from each map topic's parent [index page](#index-pages). Map topic files live alongside article files. - -To make a page a map topic, add `mapTopic: true` to its YAML frontmatter and leave the rest of the file empty. - -## Versioning - -Versioning for any content file lives in **two** places: - -- The file's [`productVersions`](#productversions) frontmatter. -- Liquid conditionals in the file's parent [index page](#index-pages). - -For example, an article with this frontmatter: - -```yml -title: About your personal dashboard -productVersions: - dotcom: '*' - enterprise: '>=2.14' -``` - -should be referenced in the parent index page like this: -{%- if page.version == 'dotcom' or page.version ver_gt "2.13" %} -- About your personal dashboard -{%- endif %} -## Filenames - -The site automatically creates links to articles in index pages. For example, this block in `content/index.md`: - - ## Bootcamp - - - Set up git - - Create a repo - - Fork a repo - - Be social - - -renders with links to each article. - -If you're adding a new article, make sure the filename is a [kebab-cased](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) version of the title you use in both the article and the parent index. This can get tricky when a title has punctuation (such as "GitHub's Billing Plans"). If you're not sure what the filename should be based on the title, you can find out by adding the title to the TOC. For example: - - ## Bootcamp - - - Set up git - - Create a repo - - Fork a repo - - Be social - - I'm a new article - - -Then just run the site locally and see what the link is. In this example, the filename would be: `im-a-new-article` - -## Whitespace Control - -When using Liquid conditionals in lists or tables, you can use [whitespace control](https://shopify.github.io/liquid/basics/whitespace/) characters to prevent the addition of newlines that would break the list or table rendering. - -Just add a hyphen on either the left, right, or both sides to indicate that there should be no newline on that side. For example, this statement removes a newline on the left side: -{%- if page.version == 'dotcom' %} -These characters are especially important in [index pages](#index-pages) comprised of list items. - -## Links and image paths - -Any local links (like those starting with `/articles/`) and image paths (starting with `/assets`) that you include in content and data files will undergo some transformations on the server side to match the current page's language and Enterprise version (if applicable). The handling for these transformations lives in [`lib/rewrite-local-links`](lib/rewrite-local-links.js) and [`lib/rewrite-asset-paths-to-s3`](lib/rewrite-asset-paths-to-s3.js). - -For example, if you include the following link in a content file: - - /articles/creating-a-saved-reply - - -When viewed on Dotcom, the link gets rendered with the language code: - - /en/articles/creating-a-saved-reply - - -and when viewed on GHE, the version is included as well: - - /en/enterprise/2.16/user/articles/creating-a-saved-reply - - -The transformation is a little simpler for image paths. If you include the following image path in a content file: - - /assets/images/help/profile/follow-user-button.png - - -when viewed on GHE, the path gets rewritten to include S3: - - https://github-images.s3.amazonaws.com/enterprise/2.16/assets/images/help/profile/follow-user-button.png - - -### Preventing transformations - -Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, write the link using HTML and add a class of `dotcom-only`. For example: - - <a href="/articles/github-terms-of-service/" class="dotcom-only">GitHub's Terms of Service</a> - - -Sometimes the canonical home of content moves outside the help site. None of the links included in [`lib/external-redirects.json`](lib/external-redirects.json) get rewritten. See the top-level [README](../README.md#external-redirects) for more info about this type of redirect. \ No newline at end of file