1
0
mirror of synced 2025-12-23 03:44:00 -05:00

Merge branch 'main' into jules-4795

This commit is contained in:
Matt Pollard
2021-10-22 09:24:18 +02:00
190 changed files with 1542 additions and 519 deletions

View File

@@ -35,6 +35,7 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo ## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
- [ ] Search for `site-search-input` in the compressed Javascript files. When you find it, use something like https://beautifier.io/ to reformat it to be readable. Find `site-search-input` in the file, there will be something like... `1125: function () { return [SearchReactComponent] },` Delete the innards of this function, but leave the `function() {}` part.
- [ ] In your archival checkout, `git add <version>`, commit, and push. - [ ] In your archival checkout, `git add <version>`, commit, and push.
- [ ] Open a PR and merge it in. Note that the version will _not_ be deprecated on the docs site until you do the next step. - [ ] Open a PR and merge it in. Note that the version will _not_ be deprecated on the docs site until you do the next step.
@@ -47,12 +48,15 @@ In your `docs-internal` checkout:
- [ ] Tests are passing. - [ ] Tests are passing.
- [ ] The deprecated version renders on staging as expected. You should be able to navigate to docs.github.com/enterprise/<DEPRECATED VERSION> to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects. - [ ] The deprecated version renders on staging as expected. You should be able to navigate to docs.github.com/enterprise/<DEPRECATED VERSION> to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated. - [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.
You may need to include the changes in step 6 to get tests to pass.
## Step 5: Remove static files for the version ## Step 5: Remove static files for the version
- [ ] In your `docs-internal` checkout, from your `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files` - [ ] In your `docs-internal` checkout, from your `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files`
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results. - [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
- [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results. - [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results.
- [ ] `lib/rest/static` directory has deferenced and decorated directory underneath, remove the numbered version and all below from the list
- [ ] Open a new PR. - [ ] Open a new PR.
- [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files. - [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files.

View File

@@ -4,7 +4,7 @@
// can be added it this list. // can be added it this list.
export default [ export default [
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', // v2.3.4 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97', // v2.3.5
'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2 'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0 'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0
'actions/setup-node@270253e841af726300e85d718a5f606959b2903c', // v2.4.1 'actions/setup-node@270253e841af726300e85d718a5f606959b2903c', // v2.4.1
@@ -33,7 +33,7 @@ export default [
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9', 'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88', 'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
'repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3', // v2.6 'repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3', // v2.6
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd', 'someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340', // v1.2.2
'tjenkinson/gh-action-auto-merge-dependency-updates@c47f6255e06f36e84201ee940466e731ffa6e885', // v1.1.1 'tjenkinson/gh-action-auto-merge-dependency-updates@c47f6255e06f36e84201ee940466e731ffa6e885', // v1.1.1
'Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b', // v1.0.0 'Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b', // v1.0.0
'EndBug/add-and-commit@2bdc0a61a03738a1d1bda24d566ad0dbe3083d87', 'EndBug/add-and-commit@2bdc0a61a03738a1d1bda24d566ad0dbe3083d87',

View File

@@ -18,7 +18,7 @@ jobs:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs # Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything # Even if if doesn't do anything
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
lfs: true lfs: true
- name: Checkout LFS objects - name: Checkout LFS objects

View File

@@ -21,6 +21,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Build the container - name: Build the container
run: docker build --target production . run: docker build --target production .

View File

@@ -22,7 +22,7 @@ jobs:
REPORT_REPOSITORY: github/docs-content REPORT_REPOSITORY: github/docs-content
steps: steps:
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with: with:

View File

@@ -36,7 +36,7 @@ jobs:
exit 1 # prevents further steps from running exit 1 # prevents further steps from running
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -20,7 +20,7 @@ jobs:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: github/codeql-action/init@v1 - uses: github/codeql-action/init@v1
with: with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!) languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)

View File

@@ -71,7 +71,7 @@ jobs:
- name: Send Slack notification if a GitHub employee who isn't on the docs team opens an issue in public - name: Send Slack notification if a GitHub employee who isn't on the docs team opens an issue in public
if: ${{ steps.membership_check.outputs.did_warn && github.repository == 'github/docs' }} if: ${{ steps.membership_check.outputs.did_warn && github.repository == 'github/docs' }}
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
with: with:
channel: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }}
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

View File

@@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: check out repo content - name: check out repo content
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
fetch-depth: 0 fetch-depth: 0
lfs: true lfs: true

View File

@@ -20,7 +20,7 @@ jobs:
steps: steps:
- name: Check out repo content - name: Check out repo content
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -32,7 +32,7 @@ jobs:
exit 1 # prevents further steps from running exit 1 # prevents further steps from running
- name: Checkout repository code - name: Checkout repository code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
@@ -83,7 +83,7 @@ jobs:
number: ${{ steps.create-pull-request.outputs.pull-request-number }} number: ${{ steps.create-pull-request.outputs.pull-request-number }}
- name: Send Slack notification if workflow fails - name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: failure() if: failure()
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
token: ${{ secrets.DOCUBOT_REPO_PAT }} token: ${{ secrets.DOCUBOT_REPO_PAT }}

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -18,7 +18,7 @@ jobs:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs # Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything # Even if if doesn't do anything
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -18,7 +18,7 @@ jobs:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs # Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything # Even if if doesn't do anything
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -18,7 +18,7 @@ jobs:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs # Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything # Even if if doesn't do anything
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository code - name: Checkout repository code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -26,7 +26,7 @@ jobs:
add-labels: 'github-openapi-bot' add-labels: 'github-openapi-bot'
- name: Checkout repository code - name: Checkout repository code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -29,7 +29,7 @@ jobs:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }} runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
steps: steps:
- name: Checkout repository code - name: Checkout repository code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -44,7 +44,7 @@ jobs:
exit 1 exit 1
- name: Check out repo content - name: Check out repo content
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

46
.github/workflows/package-lock-lint.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Package lock lint
# **What it does**: Makes sure package.json and package-lock.json is in sync
# **Why we have it**: Accidental manual edits of the dependencies directly in package.json
# **Who does it impact**: Docs engineering/writers/contributors.
on:
pull_request:
paths:
- package.json
- package-lock.json
- .github/workflows/package-lock-lint.yml
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.x
- name: Run check
run: |
npm --version
# From https://docs.npmjs.com/cli/v7/commands/npm-install
#
# The --package-lock-only argument will only update the
# package-lock.json, instead of checking node_modules and
# downloading dependencies.
#
npm install --package-lock-only --ignore-scripts
# If the package.json (dependencies and devDependencies) is
# in correct sync with package-lock.json running the above command
# should *not* make an edit to the package-lock.json. I.e.
# running `git status` should
# say "nothing to commit, working tree clean".
git diff --exit-code

View File

@@ -16,7 +16,7 @@ jobs:
env: env:
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }} HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
steps: steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with: with:

View File

@@ -25,7 +25,7 @@ jobs:
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
persist-credentials: 'false' persist-credentials: 'false'
lfs: 'true' lfs: 'true'
@@ -249,7 +249,7 @@ jobs:
} }
- name: Send Slack notification if workflow failed - name: Send Slack notification if workflow failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: ${{ failure() }} if: ${{ failure() }}
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo content - name: Check out repo content
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
@@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

View File

@@ -22,7 +22,7 @@ jobs:
echo 'The repo is currently frozen! Exiting this workflow.' echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running exit 1 # prevents further steps from running
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with: with:

View File

@@ -50,7 +50,7 @@ jobs:
} }
}) })
- name: Send Slack notification if workflow fails - name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: ${{ failure() }} if: ${{ failure() }}
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
# Set up npm and run npm ci to run husky to get githooks for LFS # Set up npm and run npm ci to run husky to get githooks for LFS
- name: Setup node - name: Setup node
@@ -250,7 +250,7 @@ jobs:
} }
- name: Send Slack notification if workflow fails - name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: failure() if: failure()
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -31,7 +31,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
# Sets commit message # Sets commit message
- name: custom message - name: custom message
run: | run: |

View File

@@ -39,7 +39,7 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
# Make sure only approved files are changed if it's in github/docs # Make sure only approved files are changed if it's in github/docs
- name: Check changed files - name: Check changed files

View File

@@ -185,7 +185,7 @@ jobs:
- if: ${{ steps.check-workflow-run.outputs.cancelled == 'false' }} - if: ${{ steps.check-workflow-run.outputs.cancelled == 'false' }}
name: Send Slack notification if build workflow failed name: Send Slack notification if build workflow failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
with: with:
channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }}
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
@@ -282,7 +282,7 @@ jobs:
}) })
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
# To prevent issues with cloning early access content later # To prevent issues with cloning early access content later
persist-credentials: 'false' persist-credentials: 'false'
@@ -408,7 +408,7 @@ jobs:
}) })
- name: Send Slack notification if deployment preparation job failed - name: Send Slack notification if deployment preparation job failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: ${{ failure() }} if: ${{ failure() }}
with: with:
channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }}
@@ -455,7 +455,7 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
@@ -600,7 +600,7 @@ jobs:
}) })
- name: Send Slack notification if deployment job failed - name: Send Slack notification if deployment job failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: ${{ failure() }} if: ${{ failure() }}
with: with:
channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }}

View File

@@ -55,7 +55,7 @@ jobs:
add-labels: 'automated-block-deploy' add-labels: 'automated-block-deploy'
- name: Check out repo's default branch - name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
# For enhanced security: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ # For enhanced security: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
persist-credentials: 'false' persist-credentials: 'false'
@@ -122,7 +122,7 @@ jobs:
remove-labels: 'automated-block-deploy' remove-labels: 'automated-block-deploy'
- name: Send Slack notification if workflow failed - name: Send Slack notification if workflow failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: ${{ failure() }} if: ${{ failure() }}
with: with:
channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_STAGING_DEPLOYMENT_FAILURES_SLACK_CHANNEL_ID }}

View File

@@ -48,7 +48,7 @@ jobs:
exit 1 # prevents further steps from running exit 1 # prevents further steps from running
# Check out internal docs repository # Check out internal docs repository
- name: checkout - name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
token: ${{ secrets.DOCS_BOT_FR }} token: ${{ secrets.DOCS_BOT_FR }}
@@ -108,7 +108,7 @@ jobs:
git lfs push --all public-docs-repo git lfs push --all public-docs-repo
- name: Send slack notification if workflow run fails - name: Send slack notification if workflow run fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: failure() && env.FREEZE != 'true' if: failure() && env.FREEZE != 'true'
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -26,7 +26,7 @@ jobs:
test-group: [content, graphql, meta, rendering, routing, unit, linting] test-group: [content, graphql, meta, rendering, routing, unit, linting]
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
# Enables cloning the Early Access repo later with the relevant PAT # Enables cloning the Early Access repo later with the relevant PAT
persist-credentials: 'false' persist-credentials: 'false'

View File

@@ -31,7 +31,7 @@ jobs:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs # Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything # Even if if doesn't do anything
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
# Enables cloning the Early Access repo later with the relevant PAT # Enables cloning the Early Access repo later with the relevant PAT
persist-credentials: 'false' persist-credentials: 'false'

View File

@@ -13,10 +13,11 @@ on:
permissions: permissions:
pull-requests: write pull-requests: write
repository-projects: write repository-projects: write
issues: write
jobs: jobs:
triage_pulls: triage_pulls:
if: ${{ github.repository != 'github/docs-internal' }} if: ${{ github.repository == 'github/docs' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
token: ${{ secrets.DOCUBOT_REPO_PAT }} token: ${{ secrets.DOCUBOT_REPO_PAT }}

View File

@@ -28,7 +28,7 @@ jobs:
echo 'The repo is currently frozen! Exiting this workflow.' echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running exit 1 # prevents further steps from running
- name: Checkout - name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup Node - name: Setup Node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with: with:
@@ -74,7 +74,7 @@ jobs:
github-token: ${{ secrets.DOCUBOT_REPO_PAT }} github-token: ${{ secrets.DOCUBOT_REPO_PAT }}
number: ${{ steps.create-pull-request.outputs.pull-request-number }} number: ${{ steps.create-pull-request.outputs.pull-request-number }}
- name: Send Slack notification if workflow fails - name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
if: failure() if: failure()
with: with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}

View File

@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Run linter - name: Run linter
uses: cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa uses: cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup node - name: Setup node
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -88,7 +88,7 @@ export function Search({
case 'Enter': case 'Enter':
// look for a link in the given hit, then visit it // look for a link in the given hit, then visit it
if (results === null || activeHit === 0 || !results.length) break if (results === null || activeHit === 0 || !results.length) break
window.location.href = results[activeHit - 1]?.url onGotoResult(results[activeHit - 1]?.url, activeHit)
break break
} }
} }
@@ -159,6 +159,20 @@ export function Search({
evt.preventDefault() evt.preventDefault()
} }
function onGotoResult(url: string, index: number) {
if (results) {
sendEvent({
type: EventType.searchResult,
search_result_query: Array.isArray(query) ? query[0] : query,
search_result_index: index,
search_result_total: results.length,
search_result_rank: (results.length - index) / results.length,
search_result_url: url,
})
}
document.location.href = url
}
const SearchResults = ( const SearchResults = (
<> <>
<div <div
@@ -176,6 +190,7 @@ export function Search({
results={results} results={results}
activeHit={activeHit} activeHit={activeHit}
setActiveHit={setActiveHit} setActiveHit={setActiveHit}
onGotoResult={onGotoResult}
/> />
</div> </div>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */} {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
@@ -244,12 +259,14 @@ function ShowSearchResults({
results, results,
activeHit, activeHit,
setActiveHit, setActiveHit,
onGotoResult,
}: { }: {
isOverlay: boolean isOverlay: boolean
isLoading: boolean isLoading: boolean
results: SearchResult[] | null results: SearchResult[] | null
activeHit: number activeHit: number
setActiveHit: (index: number) => void setActiveHit: (index: number) => void
onGotoResult: (url: string, index: number) => void
}) { }) {
const { t } = useTranslation('search') const { t } = useTranslation('search')
@@ -286,7 +303,14 @@ function ShowSearchResults({
onMouseEnter={() => setActiveHit(index)} onMouseEnter={() => setActiveHit(index)}
> >
<div className={cx('py-3 px-3', isActive && 'color-border-secondary')}> <div className={cx('py-3 px-3', isActive && 'color-border-secondary')}>
<a className="no-underline color-text-primary" href={url}> <a
className="no-underline color-text-primary"
href={url}
onClick={(event) => {
event.preventDefault()
onGotoResult(url, index)
}}
>
{/* Breadcrumbs in search records don't include the page title. These fields may contain <mark> elements that we need to render */} {/* Breadcrumbs in search records don't include the page title. These fields may contain <mark> elements that we need to render */}
<div <div
className={'d-block opacity-60 text-small pb-1'} className={'d-block opacity-60 text-small pb-1'}

View File

@@ -44,6 +44,7 @@ export const ArticleGridLayout = ({
const Container = styled(Box)` const Container = styled(Box)`
max-width: 720px; max-width: 720px;
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-areas: grid-template-areas:
'topper' 'topper'
'topper-sidebar' 'topper-sidebar'

View File

@@ -32,6 +32,7 @@ export const ArticlePage = () => {
const { const {
title, title,
intro, intro,
effectiveDate,
renderedPage, renderedPage,
contributor, contributor,
permissions, permissions,
@@ -153,6 +154,14 @@ export const ArticlePage = () => {
> >
<div id="article-contents"> <div id="article-contents">
<MarkdownContent>{renderedPage}</MarkdownContent> <MarkdownContent>{renderedPage}</MarkdownContent>
{effectiveDate && (
<div className="mt-4" id="effectiveDate">
Effective as of:{' '}
<time dateTime={new Date(effectiveDate).toISOString()}>
{new Date(effectiveDate).toDateString()}
</time>
</div>
)}
</div> </div>
</ArticleGridLayout> </ArticleGridLayout>

View File

@@ -16,6 +16,7 @@ export type MiniTocItem = {
export type ArticleContextT = { export type ArticleContextT = {
title: string title: string
intro: string intro: string
effectiveDate: string
renderedPage: string renderedPage: string
miniTocItems: Array<MiniTocItem> miniTocItems: Array<MiniTocItem>
contributor: { name: string; URL: string } | null contributor: { name: string; URL: string } | null
@@ -40,9 +41,19 @@ export const useArticleContext = (): ArticleContextT => {
export const getArticleContextFromRequest = (req: any): ArticleContextT => { export const getArticleContextFromRequest = (req: any): ArticleContextT => {
const page = req.context.page const page = req.context.page
if (page.effectiveDate) {
if (isNaN(Date.parse(page.effectiveDate))) {
throw new Error(
'The "effectiveDate" frontmatter property is not valid. Please make sure it is YEAR-MONTH-DAY'
)
}
}
return { return {
title: page.titlePlainText, title: page.titlePlainText,
intro: page.intro, intro: page.intro,
effectiveDate: page.effectiveDate || '',
renderedPage: req.context.renderedPage || '', renderedPage: req.context.renderedPage || '',
miniTocItems: req.context.miniTocItems || [], miniTocItems: req.context.miniTocItems || [],
contributor: page.contributor || null, contributor: page.contributor || null,

View File

@@ -38,6 +38,7 @@ export enum EventType {
exit = 'exit', exit = 'exit',
link = 'link', link = 'link',
search = 'search', search = 'search',
searchResult = 'searchResult',
navigate = 'navigate', navigate = 'navigate',
survey = 'survey', survey = 'survey',
experiment = 'experiment', experiment = 'experiment',
@@ -58,6 +59,11 @@ type SendEventProps = {
link_url?: string link_url?: string
search_query?: string search_query?: string
search_context?: string search_context?: string
search_result_query?: string
search_result_index?: number
search_result_total?: number
search_result_rank?: number
search_result_url?: string
navigate_label?: string navigate_label?: string
survey_token?: string // Honeypot, doesn't exist in schema survey_token?: string // Honeypot, doesn't exist in schema
survey_vote?: boolean survey_vote?: boolean
@@ -260,7 +266,7 @@ export default function initializeEvents() {
initPrintEvent() initPrintEvent()
// survey event in ./survey.js // survey event in ./survey.js
// experiment event in ./experiment.js // experiment event in ./experiment.js
// search event in ./search.js // search and search_result event in ./search.js
// redirect event in middleware/record-redirect.js // redirect event in middleware/record-redirect.js
// preference event in ./display-tool-specific-content.js // preference event in ./display-tool-specific-content.js
} }

View File

@@ -29,6 +29,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
- [`topics`](#topics) - [`topics`](#topics)
- [`contributor`](#contributor) - [`contributor`](#contributor)
- [`communityRedirect`](#communityRedirect) - [`communityRedirect`](#communityRedirect)
- [`effectiveDate`](#effectiveDate)
- [Escaping single quotes](#escaping-single-quotes) - [Escaping single quotes](#escaping-single-quotes)
- [Autogenerated mini TOCs](#autogenerated-mini-tocs) - [Autogenerated mini TOCs](#autogenerated-mini-tocs)
- [Versioning](#versioning) - [Versioning](#versioning)
@@ -270,6 +271,11 @@ includeGuides:
- Type: `Object`. Properties are `name` and `href`. - Type: `Object`. Properties are `name` and `href`.
- Optional. - Optional.
### `effectiveDate`
- **For GitHub staff only**: Set an effective date for Terms of Service articles so that engineering teams can automatically re-prompt users to confirm the terms
- Type: `string` YEAR-MONTH-DAY e.g. 2021-10-04 is October 4th, 2021
- Optional.
Example: Example:
```yaml ```yaml

View File

@@ -59,7 +59,7 @@ You can also convert your personal user account directly into an organization. C
{% tip %} {% tip %}
**Tip**: When you convert a user account into an organization, we'll add collaborators on repositories that belong to the account to the new organization as *outside collaborators*. You can then invite *outside collaborators* to become members of your new organization if you wish. For more information, see "[Permission levels for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/permission-levels-for-an-organization#outside-collaborators)." **Tip**: When you convert a user account into an organization, we'll add collaborators on repositories that belong to the account to the new organization as *outside collaborators*. You can then invite *outside collaborators* to become members of your new organization if you wish. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)."
{% endtip %} {% endtip %}

View File

@@ -16,7 +16,7 @@ shortTitle: Delete your user account
--- ---
Deleting your user account removes all repositories, forks of private repositories, wikis, issues, pull requests, and pages owned by your account. {% ifversion fpt or ghec %} Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted - instead, they'll be associated with our [Ghost user](https://github.com/ghost).{% else %}Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted.{% endif %} Deleting your user account removes all repositories, forks of private repositories, wikis, issues, pull requests, and pages owned by your account. {% ifversion fpt or ghec %} Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted - instead, they'll be associated with our [Ghost user](https://github.com/ghost).{% else %}Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted.{% endif %}
{% ifversion fpt or ghec %} The account name also becomes available to anyone else to use on a new account, and we stop billing you. The email address associated with the account becomes available for use with a different account on {% data variables.product.product_location %}. {% endif %} {% ifversion fpt or ghec %} When you delete your account we stop billing you. The email address associated with the account becomes available for use with a different account on {% data variables.product.product_location %}. After 90 days, the account name also becomes available to anyone else to use on a new account. {% endif %}
If youre the only owner of an organization, you must transfer ownership to another person or delete the organization before you can delete your user account. If there are other owners in the organization, you must remove yourself from the organization before you can delete your user account. If youre the only owner of an organization, you must transfer ownership to another person or delete the organization before you can delete your user account. If there are other owners in the organization, you must remove yourself from the organization before you can delete your user account.

View File

@@ -88,4 +88,4 @@ Collaborators can also perform the following actions.
## Further reading ## Further reading
- "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization)" - "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)"

View File

@@ -14,7 +14,7 @@ topics:
- Accounts - Accounts
shortTitle: Organization membership shortTitle: Organization membership
--- ---
An organization owner can invite you to join their organization as a member, billing manager, or owner. An organization owner or member with admin privileges for a repository can invite you to collaborate in one or more repositories as an outside collaborator. For more information, see "[Permission levels for an organization](/articles/permission-levels-for-an-organization)." An organization owner can invite you to join their organization as a member, billing manager, or owner. An organization owner or member with admin privileges for a repository can invite you to collaborate in one or more repositories as an outside collaborator. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
You can access organizations you're a member of on your profile page. For more information, see "[Accessing an organization](/articles/accessing-an-organization)." You can access organizations you're a member of on your profile page. For more information, see "[Accessing an organization](/articles/accessing-an-organization)."

View File

@@ -1,6 +1,6 @@
--- ---
title: Viewing people's roles in an organization title: Viewing people's roles in an organization
intro: 'You can view a list of the people in your organization and filter by their role. For more information on organization roles, see "[Permission levels for an organization](/articles/permission-levels-for-an-organization)."' intro: 'You can view a list of the people in your organization and filter by their role. For more information on organization roles, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."'
redirect_from: redirect_from:
- /articles/viewing-people-s-roles-in-an-organization - /articles/viewing-people-s-roles-in-an-organization
- /articles/viewing-peoples-roles-in-an-organization - /articles/viewing-peoples-roles-in-an-organization

View File

@@ -21,6 +21,7 @@ children:
- /dockerfile-support-for-github-actions - /dockerfile-support-for-github-actions
- /setting-exit-codes-for-actions - /setting-exit-codes-for-actions
- /publishing-actions-in-github-marketplace - /publishing-actions-in-github-marketplace
- /releasing-and-maintaining-actions
- /developing-a-third-party-cli-action - /developing-a-third-party-cli-action
--- ---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-beta %}

View File

@@ -0,0 +1,95 @@
---
title: Releasing and maintaining actions
shortTitle: Releasing and maintaining actions
intro: You can leverage automation and open source best practices to release and maintain actions.
type: tutorial
topics:
- Action development
- Actions
- Community
versions:
fpt: '*'
ghes: '*'
ghae: '*'
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## Introduction
After you create an action, you'll want to continue releasing new features while working with community contributions. This tutorial describes an example process you can follow to release and maintain actions in open source. The example:
* Leverages {% data variables.product.prodname_actions %} for continuous integration, dependency updates, release management, and task automation.
* Provides confidence through automated tests and build badges.
* Indicates how the action can be used, ideally as part of a broader workflow.
* Signal what type of community contributions you welcome. (For example, issues, pull requests, or vulnerability reports.)
For an applied example of this process, see [github-developer/javascript-action](https://github.com/github-developer/javascript-action).
## Developing and releasing actions
In this section, we discuss an example process for developing and releasing actions and show how to use {% data variables.product.prodname_actions %} to automate the process.
### About JavaScript actions
JavaScript actions are Node.js repositories with metadata. However, JavaScript actions have additional properties compared to traditional Node.js projects:
* Dependent packages are committed alongside the code, typically in a compiled and minified form. This means that automated builds and secure community contributions are important.
{% ifversion fpt %}
* Tagged releases can be published directly to {% data variables.product.prodname_marketplace %} and consumed by workflows across {% data variables.product.prodname_dotcom %}.
{% endif %}
* Many actions make use of {% data variables.product.prodname_dotcom %}'s APIs and third party APIs, so we encourage robust end-to-end testing.
### Setting up {% data variables.product.prodname_actions %} workflows
To support the developer process in the next section, add two {% data variables.product.prodname_actions %} workflows to your repository:
1. Add a workflow that triggers when a commit is pushed to a feature branch or to `main` or when a pull request is created. Configure the workflow to run your unit and integration tests. For an example, see [this workflow](https://github.com/github-developer/javascript-action/blob/963a3b9a9c662fd499419a240ed8c49411ff5add/.github/workflows/test.yml).
2. Add a workflow that triggers when a release is published or edited. Configure the workflow to ensure semantic tags are in place. You can use an action like [JasonEtco/build-and-tag-action](https://github.com/JasonEtco/build-and-tag-action) to compile and bundle the JavaScript and metadata file and force push semantic major, minor, and patch tags. For an example, see [this workflow](https://github.com/github-developer/javascript-action/blob/963a3b9a9c662fd499419a240ed8c49411ff5add/.github/workflows/publish.yml). For more information about semantic tags, see "[About semantic versioning](https://docs.npmjs.com/about-semantic-versioning)."
### Example developer process
Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action.
1. Do feature work in branches per GitHub flow. For more information, see "[GitHub flow](/get-started/quickstart/github-flow)."
* Whenever a commit is pushed to the feature branch, your testing workflow will automatically run the tests.
2. Create pull requests to the `main` branch to initiate discussion and review, merging when ready.
* When a pull request is opened, either from a branch or a fork, your testing workflow will again run the tests, this time with the merge commit.
* **Note:** for security reasons, workflows triggered by `pull_request` from forks have restricted `GITHUB_TOKEN` permissions and do not have access to secrets. If your tests or other workflows triggered upon pull request require access to secrets, consider using a different event like a [manual trigger](/actions/reference/events-that-trigger-workflows#manual-events) or a [`pull_request_target`](/actions/reference/events-that-trigger-workflows#pull_request_target). Read more [here](/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories).
3. Create a semantically tagged release. {% ifversion fpt %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}.
* When a release is published or edited, your release workflow will automatically take care of compilation and adjusting tags.
* We recommend creating releases using semantically versioned tags for example, `v1.1.3` and keeping major (`v1`) and minor (`v1.1`) tags current to the latest appropriate commit. For more information, see "[About custom actions](/actions/creating-actions/about-custom-actions#using-release-management-for-actions)" and "[About semantic versioning](https://docs.npmjs.com/about-semantic-versioning).
### Results
Unlike some other automated release management strategies, this process intentionally does not commit dependencies to the `main` branch, only to the tagged release commits. By doing so, you encourage users of your action to reference named tags or `sha`s, and you help ensure the security of third party pull requests by doing the build yourself during a release.
Using semantic releases means that the users of your actions can pin their workflows to a version and know that they might continue to receive the latest stable, non-breaking features, depending on their comfort level:
## Working with the community
{% data variables.product.product_name %} provides tools and guides to help you work with the open source community. Here are a few tools we recommend setting up for healthy bidirectional communication. By providing the following signals to the community, you encourage others to use, modify, and contribute to your action:
* Maintain a `README` with plenty of usage examples and guidance. For more information, see "[About READMEs](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)."
* Include a workflow status badge in your `README` file. For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt %}
* Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see "[Creating a default community health file](/github/building-a-strong-community/creating-a-default-community-health-file#supported-file-types)."{% endif %}
* Keep issues current by utilizing actions like [actions/stale](https://github.com/actions/stale).
## Further reading
Examples where similar patterns are employed include:
* [github/super-linter](https://github.com/github/super-linter)
* [octokit/request-action](https://github.com/octokit/request-action)
* [github-developer/javascript-action](https://github.com/github-developer/javascript-action)

View File

@@ -174,8 +174,8 @@ Could not find any self-hosted runner group named "rg-runnergroup".
## Moving a self-hosted runner to a group ## Moving a self-hosted runner to a group
If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group. If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group.
{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %} {% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}
{% data reusables.github-actions.self-hosted-runner-navigate-to-repo-org-enterprise %} {% data reusables.github-actions.self-hosted-runner-navigate-to-org-enterprise %}
1. In the "Runners" list, click the runner that you want to configure. 1. In the "Runners" list, click the runner that you want to configure.
1. Select the Runner group dropdown menu. 1. Select the Runner group dropdown menu.
1. In "Move runner to group", choose a destination group for the runner. 1. In "Move runner to group", choose a destination group for the runner.

View File

@@ -104,7 +104,7 @@ If youre working with {% data variables.product.prodname_professional_service
If youre working independently, this section outlines some things to ensure are included in your plan as you prepare to move forward. If youre working independently, this section outlines some things to ensure are included in your plan as you prepare to move forward.
Plans for process changes (if needed) and training for team members as needed: Plans for process changes (if needed) and training for team members as needed:
- Documented team assignments for roles and responsibilities. For more information on the permissions required for each feature, see "[Repository permission levels for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization#permission-requirements-for-security-features)." - Documented team assignments for roles and responsibilities. For more information on the permissions required for each feature, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#access-requirements-for-security-features)."
- Documented plan of tasks and timelines/timeframes where possible. This should include infrastructure changes, process changes/training, and all subsequent phases of enablement of GHAS, allowing for timeframes for remediations and configuration adjustments as needed. For more information, see "[Phase 1: Pilot projects(s)](/admin/advanced-security/deploying-github-advanced-security-in-your-enterprise#--phase-1-pilot-projects)" below. - Documented plan of tasks and timelines/timeframes where possible. This should include infrastructure changes, process changes/training, and all subsequent phases of enablement of GHAS, allowing for timeframes for remediations and configuration adjustments as needed. For more information, see "[Phase 1: Pilot projects(s)](/admin/advanced-security/deploying-github-advanced-security-in-your-enterprise#--phase-1-pilot-projects)" below.
- Prioritized plan for which projects/teams will have GHAS enabled first, and subsequent - Prioritized plan for which projects/teams will have GHAS enabled first, and subsequent
plans for which projects/teams will come in following phases plans for which projects/teams will come in following phases

View File

@@ -27,7 +27,7 @@ Enterprise owners can create new organizations within an enterprise account's se
New organizations you create within your enterprise account settings are included in your enterprise account's {% data variables.product.prodname_ghe_cloud %} subscription. New organizations you create within your enterprise account settings are included in your enterprise account's {% data variables.product.prodname_ghe_cloud %} subscription.
Enterprise owners who create an organization owned by the enterprise account automatically become organization owners. For more information about organization owners, see "[Permission levels for an organization](/articles/permission-levels-for-an-organization)." Enterprise owners who create an organization owned by the enterprise account automatically become organization owners. For more information about organization owners, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.access-enterprise %}
2. On the **Organizations** tab, above the list of organizations, click **New organization**. 2. On the **Organizations** tab, above the list of organizations, click **New organization**.

View File

@@ -13,7 +13,7 @@ topics:
- Teams - Teams
- User account - User account
--- ---
Teams are central to many of {% data variables.product.prodname_dotcom %}'s collaborative features, such as team @mentions to notify appropriate parties that you'd like to request their input or attention. For more information, see "[Permission levels for an organization repository](/enterprise/{{ currentVersion }}/user/articles/repository-permission-levels-for-an-organization/)". Teams are central to many of {% data variables.product.prodname_dotcom %}'s collaborative features, such as team @mentions to notify appropriate parties that you'd like to request their input or attention. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
A team can represent a group within your company or include people with certain interests or expertise. For example, a team of accessibility experts on {% data variables.product.product_location %} could comprise of people from several different departments. Teams can represent functional concerns that complement a company's existing divisional hierarchy. A team can represent a group within your company or include people with certain interests or expertise. For example, a team of accessibility experts on {% data variables.product.product_location %} could comprise of people from several different departments. Teams can represent functional concerns that complement a company's existing divisional hierarchy.

View File

@@ -30,4 +30,4 @@ We strongly recommend requiring your users to install and use a password manager
To limit the potential attack surface in the event of a security breach, we strongly recommend only giving users access to teams and repositories that they absolutely need to do their work. Since members with the Owner role can access all teams and repositories in the organization, we strongly recommend keeping this team as small as possible. To limit the potential attack surface in the event of a security breach, we strongly recommend only giving users access to teams and repositories that they absolutely need to do their work. Since members with the Owner role can access all teams and repositories in the organization, we strongly recommend keeping this team as small as possible.
For more information on configuring teams and team permissions, see "[Permission levels for an organization repository](/enterprise/{{ currentVersion }}/user/articles/repository-permission-levels-for-an-organization/)". For more information on configuring teams and team permissions, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."

View File

@@ -50,9 +50,9 @@ Members of organizations owned by your enterprise are also automatically members
People in your enterprise may have different levels of access to the various organizations owned by your enterprise and to repositories within those organizations. You can view the resources that each person has access to. For more information, see "[Viewing people in your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise)." People in your enterprise may have different levels of access to the various organizations owned by your enterprise and to repositories within those organizations. You can view the resources that each person has access to. For more information, see "[Viewing people in your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise)."
For more information about organization-level permissions, see "[Permission levels for an organization](/articles/permission-levels-for-an-organization)." For more information about organization-level permissions, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
People with outside collaborator access to repositories owned by your organization are also listed in your enterprise's People tab, but are not enterprise members and do not have any access to the enterprise. For more information about outside collaborators, see "[Permission levels for an organization](/articles/permission-levels-for-an-organization#outside-collaborators)." People with outside collaborator access to repositories owned by your organization are also listed in your enterprise's People tab, but are not enterprise members and do not have any access to the enterprise. For more information about outside collaborators, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)."
{% ifversion ghec %} {% ifversion ghec %}

View File

@@ -53,4 +53,4 @@ This means that, in order for ExampleApp to create an issue on Alice's behalf, i
* ExampleApp's {% data variables.product.prodname_github_app %} requests write access to issues. * ExampleApp's {% data variables.product.prodname_github_app %} requests write access to issues.
* A user having admin access for Repo A must have installed ExampleApp's {% data variables.product.prodname_github_app %} on Repo A. * A user having admin access for Repo A must have installed ExampleApp's {% data variables.product.prodname_github_app %} on Repo A.
* Alice must have read permission for Repo A. For information about which permissions are required to perform various activities, see "[Repository permission levels for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization#repository-access-for-each-permission-level)." * Alice must have read permission for Repo A. For information about which permissions are required to perform various activities, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."

View File

@@ -23,7 +23,7 @@ Some security features are only available {% ifversion fpt or ghec %}for public
## Managing access to your organization ## Managing access to your organization
You can use permission levels to control what actions people can take in your organization. For more information, see "[Permission levels for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/permission-levels-for-an-organization)." You can use roles to control what actions people can take in your organization. {% if security-managers %}For example, you can assign the security manager role to a team to give them the ability to manage security settings across your organization, as well as read access to all repositories.{% endif %} For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
{% ifversion fpt or ghes > 3.0 or ghae-next or ghec %} {% ifversion fpt or ghes > 3.0 or ghae-next or ghec %}

View File

@@ -58,7 +58,7 @@ For a list of the ecosystems that {% data variables.product.product_name %} can
You can also enable or disable {% data variables.product.prodname_dependabot_alerts %} for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/github/setting-up-and-managing-your-github-user-account/managing-security-and-analysis-settings-for-your-user-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)." You can also enable or disable {% data variables.product.prodname_dependabot_alerts %} for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/github/setting-up-and-managing-your-github-user-account/managing-security-and-analysis-settings-for-your-user-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)."
For information about permission requirements for actions related to {% data variables.product.prodname_dependabot_alerts %}, see "[Repository permission levels for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization#permission-requirements-for-security-features)." For information about access requirements for actions related to {% data variables.product.prodname_dependabot_alerts %}, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#access-requirements-for-security-features)."
{% data variables.product.product_name %} starts generating the dependency graph immediately and generates alerts for any vulnerable dependencies as soon as they are identified. The graph is usually populated within minutes but this may take longer for repositories with many dependencies. For more information, see "[Managing data use settings for your private repository](/github/understanding-how-github-uses-and-protects-your-data/managing-data-use-settings-for-your-private-repository)." {% data variables.product.product_name %} starts generating the dependency graph immediately and generates alerts for any vulnerable dependencies as soon as they are identified. The graph is usually populated within minutes but this may take longer for repositories with many dependencies. For more information, see "[Managing data use settings for your private repository](/github/understanding-how-github-uses-and-protects-your-data/managing-data-use-settings-for-your-private-repository)."
{% endif %} {% endif %}

View File

@@ -85,6 +85,8 @@ The recommended formats explicitly define which versions are used for all direct
| Maven | Java, Scala | `pom.xml` | `pom.xml` | | Maven | Java, Scala | `pom.xml` | `pom.xml` |
| npm | JavaScript | `package-lock.json` | `package-lock.json`, `package.json`| | npm | JavaScript | `package-lock.json` | `package-lock.json`, `package.json`|
| Python PIP | Python | `requirements.txt`, `pipfile.lock` | `requirements.txt`, `pipfile`, `pipfile.lock`, `setup.py`* | | Python PIP | Python | `requirements.txt`, `pipfile.lock` | `requirements.txt`, `pipfile`, `pipfile.lock`, `setup.py`* |
{%- ifversion fpt or ghes > 3.3 %}
| Python Poetry | Python | `poetry.lock` | `poetry.lock`, `pyproject.toml` |{% endif %}
| RubyGems | Ruby | `Gemfile.lock` | `Gemfile.lock`, `Gemfile`, `*.gemspec` | | RubyGems | Ruby | `Gemfile.lock` | `Gemfile.lock`, `Gemfile`, `*.gemspec` |
| Yarn | JavaScript | `yarn.lock` | `package.json`, `yarn.lock` | | Yarn | JavaScript | `yarn.lock` | `package.json`, `yarn.lock` |

View File

@@ -22,7 +22,9 @@ shortTitle: Configure your project
## About dev containers ## About dev containers
A development container, or dev container, is the environment that {% data variables.product.prodname_codespaces %} uses to provide the tools and runtimes that your project needs for development. When working with a dev container in {% data variables.product.prodname_codespaces %} you can either [use the default configuration](#using-the-default-configuration), [use a predefined configuration](#using-a-predefined-container-configuration), or [create your own configuration](#creating-a-custom-codespace-configuration). The option you choose is dependent on the tools, runtimes, dependencies, and workflows that a user might need to be successful with your project. A development container, or dev container, is the environment that {% data variables.product.prodname_codespaces %} uses to provide the tools and runtimes that your project needs for development. If your project does not already have a dev container defined, {% data variables.product.prodname_codespaces %} will use the default configuration, which contains many of the common tools that your team might need for development with your project. For more information, see "[Using the default configuration](#using-the-default-configuration)."
If you want all users of your project to have a consistent environment that is tailored to your project, you can add a dev container to your repository. You can use a predefined configuration to select a common configuration for various project types with the option to further customize your project or you can create your own custom configuration. For more information, see "[Using a predefined container configuration](#using-a-predefined-container-configuration)" and "[Creating a custom codespace configuration](#creating-a-custom-codespace-configuration)." The option you choose is dependent on the tools, runtimes, dependencies, and workflows that a user might need to be successful with your project.
{% data variables.product.prodname_codespaces %} allows for customization on a per-project and per-branch basis with a `devcontainer.json` file. This configuration file determines the environment of every new codespace anyone creates for your repository by defining a development container that can include frameworks, tools, extensions, and port forwarding. A Dockerfile can also be used alongside the `devcontainer.json` file in the `.devcontainer` folder to define everything required to create a container image. {% data variables.product.prodname_codespaces %} allows for customization on a per-project and per-branch basis with a `devcontainer.json` file. This configuration file determines the environment of every new codespace anyone creates for your repository by defining a development container that can include frameworks, tools, extensions, and port forwarding. A Dockerfile can also be used alongside the `devcontainer.json` file in the `.devcontainer` folder to define everything required to create a container image.
@@ -79,17 +81,30 @@ The default configuration is a good option if you're working on a small project
Predefined container definitions include a common configuration for a particular project type, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed. Predefined container definitions include a common configuration for a particular project type, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed.
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project's setup. Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project's setup.
{% data reusables.codespaces.command-palette-container %} {% data reusables.codespaces.command-palette-container %}
1. Click the definition you want to use. 1. Click the definition you want to use.
![List of predefined container definitions](/assets/images/help/codespaces/predefined-container-definitions-list.png) ![List of predefined container definitions](/assets/images/help/codespaces/predefined-container-definitions-list.png)
1. Follow the prompts to customize your definition. 1. Follow the prompts to customize your definition. For more information on the options to customize your definition, see "[Adding additional features to your `devcontainer.json` file](#adding-additional-features-to-your-devcontainerjson-file)."
1. Click **OK**. 1. Click **OK**.
![OK button](/assets/images/help/codespaces/prebuilt-container-ok-button.png) ![OK button](/assets/images/help/codespaces/prebuilt-container-ok-button.png)
1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)." 1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)."
!["Codespaces: Rebuild Container" in the command palette](/assets/images/help/codespaces/rebuild-prompt.png) !["Codespaces: Rebuild Container" in the command palette](/assets/images/help/codespaces/rebuild-prompt.png)
### Adding additional features to your `devcontainer.json` file
{% note %}
**Note:** This feature is in beta and subject to change.
{% endnote %}
You can add features to your predefined container configuration to customize which tools are available and extend the functionality of your workspace without creating a custom codespace configuration. For example, you could use a predefined container configuration and add the {% data variables.product.prodname_cli %} as well. You can make these additional features available for your project by adding the features to your `devcontainer.json` file when you set up your container configuration.
You can add some of the most common features by selecting them when configuring your predefined container. For more information on the available features, see the [script library](https://github.com/microsoft/vscode-dev-containers/tree/main/script-library#scripts) in the `vscode-dev-containers` repository.
![The select additional features menu during container configuration.](/assets/images/help/codespaces/select-additional-features.png)
## Creating a custom codespace configuration ## Creating a custom codespace configuration

View File

@@ -44,4 +44,4 @@ Organization owners can also block users for a specific amount of time. After th
- "[Reporting abuse or spam](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)" - "[Reporting abuse or spam](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)"
- "[Managing an individual's access to an organization repository](/articles/managing-an-individual-s-access-to-an-organization-repository)" - "[Managing an individual's access to an organization repository](/articles/managing-an-individual-s-access-to-an-organization-repository)"
- "[Permission levels for a user account repository](/articles/permission-levels-for-a-user-account-repository)" - "[Permission levels for a user account repository](/articles/permission-levels-for-a-user-account-repository)"
- "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization)" - "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)"

View File

@@ -39,4 +39,4 @@ You can also enable activity limitations on all repositories owned by your user
- "[Reporting abuse or spam](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)" - "[Reporting abuse or spam](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)"
- "[Managing an individual's access to an organization repository](/articles/managing-an-individual-s-access-to-an-organization-repository)" - "[Managing an individual's access to an organization repository](/articles/managing-an-individual-s-access-to-an-organization-repository)"
- "[Permission levels for a user account repository](/articles/permission-levels-for-a-user-account-repository)" - "[Permission levels for a user account repository](/articles/permission-levels-for-a-user-account-repository)"
- "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization)" - "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)"

View File

@@ -19,7 +19,7 @@ With {% data variables.product.prodname_discussions %}, the community for your p
You don't need to close a discussion like you close an issue or a pull request. You don't need to close a discussion like you close an issue or a pull request.
If a repository administrator or project maintainer enables {% data variables.product.prodname_discussions %} for a repository, anyone who visits the repository can create and participate in discussions for the repository. Repository administrators and project maintainers can manage discussions and discussion categories in a repository, and pin discussions to increase the visibility of the discussion. Moderators and collaborators can mark comments as answers, lock discussions, and convert issues to discussions. For more information, see "[Repository permission levels for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization)." If a repository administrator or project maintainer enables {% data variables.product.prodname_discussions %} for a repository, anyone who visits the repository can create and participate in discussions for the repository. Repository administrators and project maintainers can manage discussions and discussion categories in a repository, and pin discussions to increase the visibility of the discussion. Moderators and collaborators can mark comments as answers, lock discussions, and convert issues to discussions. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
For more information about management of discussions for your repository, see "[Managing discussions in your repository](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository)." For more information about management of discussions for your repository, see "[Managing discussions in your repository](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository)."

View File

@@ -21,7 +21,7 @@ redirect_from:
After you create a classroom, {% data variables.product.prodname_classroom %} will prompt you to invite teaching assistants (TAs) and admins to the classroom. Each classroom can have one or more admins. Admins can be teachers, TAs, or any other course administrator who you'd like to have control over your classrooms on {% data variables.product.prodname_classroom %}. After you create a classroom, {% data variables.product.prodname_classroom %} will prompt you to invite teaching assistants (TAs) and admins to the classroom. Each classroom can have one or more admins. Admins can be teachers, TAs, or any other course administrator who you'd like to have control over your classrooms on {% data variables.product.prodname_classroom %}.
Invite TAs and admins to your classroom by inviting the user accounts on {% data variables.product.product_name %} to your organization as organization owners and sharing the URL for your classroom. Organization owners can administer any classroom for the organization. For more information, see "[Permission levels for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/permission-levels-for-an-organization)" and "[Inviting users to join your organization](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)." Invite TAs and admins to your classroom by inviting the user accounts on {% data variables.product.product_name %} to your organization as organization owners and sharing the URL for your classroom. Organization owners can administer any classroom for the organization. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" and "[Inviting users to join your organization](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)."
When you're done using a classroom, you can archive the classroom and refer to the classroom, roster, and assignments later, or you can delete the classroom if you no longer need the classroom. When you're done using a classroom, you can archive the classroom and refer to the classroom, roster, and assignments later, or you can delete the classroom if you no longer need the classroom.

View File

@@ -35,7 +35,8 @@ featuredLinks:
- /get-started/onboarding/getting-started-with-github-ae - /get-started/onboarding/getting-started-with-github-ae
popular: popular:
- /github/getting-started-with-github/signing-up-for-a-new-github-account - /github/getting-started-with-github/signing-up-for-a-new-github-account
- /get-started/quickstart/set-up-git - /get-started/quickstart/hello-world
- /github/getting-started-with-github/set-up-git
- /github/getting-started-with-github/github-glossary - /github/getting-started-with-github/github-glossary
- /github/getting-started-with-github/fork-a-repo - /github/getting-started-with-github/fork-a-repo
- /github/getting-started-with-github/keyboard-shortcuts - /github/getting-started-with-github/keyboard-shortcuts

View File

@@ -25,9 +25,9 @@ A repository owned by a user account has two permission levels: the *repository
## Organization accounts ## Organization accounts
Organization members can have *owner*{% ifversion fpt or ghec %}, *billing manager*,{% endif %} or *member* roles. Owners have complete administrative access to your organization{% ifversion fpt or ghec %}, while billing managers can manage billing settings{% endif %}. Member is the default role for everyone else. You can manage access permissions for multiple members at a time with teams. For more information, see: Organization members can have *owner*{% ifversion fpt or ghec %}, *billing manager*,{% endif %} or *member* roles. Owners have complete administrative access to your organization{% ifversion fpt or ghec %}, while billing managers can manage billing settings{% endif %}. Member is the default role for everyone else. You can manage access permissions for multiple members at a time with teams. For more information, see:
- "[Permission levels for an organization](/articles/permission-levels-for-an-organization)" - "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)"
- "[Project board permissions for an organization](/articles/project-board-permissions-for-an-organization)" - "[Project board permissions for an organization](/articles/project-board-permissions-for-an-organization)"
- "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization)" - "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)"
- "[About teams](/articles/about-teams)" - "[About teams](/articles/about-teams)"
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}

View File

@@ -0,0 +1,159 @@
---
title: Contributing to projects
intro: Learn how to contribute to a project through forking.
permissions: '{% data reusables.enterprise-accounts.emu-permission-fork %}'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Pull requests
- Forks
- GitHub
- Open Source
---
## About forking
After using GitHub by yourself for a while, you may find yourself wanting to contribute to someone elses project. Or maybe youd like to use someones project as the starting point for your own. This process is known as forking.
Creating a "fork" is producing a personal copy of someone else's project. Forks act as a sort of bridge between the original repository and your personal copy. You can submit pull requests to help make other people's projects better by offering your changes up to the original project. Forking is at the core of social coding at GitHub. For more information, see "[Fork a repo](/get-started/quickstart/fork-a-repo)."
## Forking a repository
This tutorial uses [the Spoon-Knife project](https://github.com/octocat/Spoon-Knife), a test repository that's hosted on {% data variables.product.prodname_dotcom_the_website %} that lets you test the fork and pull request workflow.
1. Navigate to the `Spoon-Knife` project at https://github.com/octocat/Spoon-Knife.
2. Click **Fork**.
![Fork button](/assets/images/help/repository/fork_button.jpg)
1. {% data variables.product.product_name %} will take you to your copy (your fork) of the Spoon-Knife repository.
## Cloning a fork
You've successfully forked the Spoon-Knife repository, but so far, it only exists on {% data variables.product.product_name %}. To be able to work on the project, you will need to clone it to your computer.
You can clone your fork with the command line, {% data variables.product.prodname_cli %}, or {% data variables.product.prodname_desktop %}.
{% include tool-switcher %}
{% webui %}
1. On {% data variables.product.product_name %}, navigate to **your fork** of the Spoon-Knife repository.
{% data reusables.repositories.copy-clone-url %}
{% data reusables.command_line.open_the_multi_os_terminal %}
{% data reusables.command_line.change-current-directory-clone %}
4. Type `git clone`, and then paste the URL you copied earlier. It will look like this, with your {% data variables.product.product_name %} username instead of `YOUR-USERNAME`:
```shell
$ git clone https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/Spoon-Knife
```
5. Press **Enter**. Your local clone will be created.
```shell
$ git clone https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/Spoon-Knife
> Cloning into `Spoon-Knife`...
> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.
```
{% endwebui %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
To create a clone of your fork, use the `--clone` flag.
```shell
gh repo fork <em>repository</em> --clone=true
```
{% endcli %}
{% desktop %}
{% data reusables.desktop.choose-clone-repository %}
{% data reusables.desktop.cloning-location-tab %}
{% data reusables.desktop.cloning-repository-list %}
{% data reusables.desktop.choose-local-path %}
{% data reusables.desktop.click-clone %}
{% enddesktop %}
## Making and pushing changes
Go ahead and make a few changes to the project using your favorite text editor, like [Atom](https://atom.io). You could, for example, change the text in `index.html` to add your GitHub username.
When you're ready to submit your changes, stage and commit your changes. `git add .` tells Git that you want to include all of your changes in the next commit. `git commit` takes a snapshot of those changes.
{% include tool-switcher %}
{% webui %}
```shell
git add .
git commit -m "a short description of the change"
```
{% endwebui %}
{% cli %}
```shell
git add .
git commit -m "a short description of the change"
```
{% endcli %}
{% desktop %}
For more information about how to stage and commit changes in {% data variables.product.prodname_desktop %}, see "[Committing and reviewing changes to your project](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project#selecting-changes-to-include-in-a-commit)."
{% enddesktop %}
When you stage and commit files, you essentially tell Git, "Okay, take a snapshot of my changes!" You can continue to make more changes, and take more commit snapshots.
Right now, your changes only exist locally. When you're ready to push your changes up to {% data variables.product.product_name %}, push your changes to the remote.
{% include tool-switcher %}
{% webui %}
```shell
git push
```
{% endwebui %}
{% cli %}
```shell
git push
```
{% endcli %}
{% desktop %}
For more information about how to push changes in {% data variables.product.prodname_desktop %}, see "[Pushing changes to GitHub](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/pushing-changes-to-github)."
{% enddesktop %}
## Making a pull request
At last, you're ready to propose changes into the main project! This is the final step in producing a fork of someone else's project, and arguably the most important. If you've made a change that you feel would benefit the community as a whole, you should definitely consider contributing back.
To do so, head on over to the repository on {% data variables.product.product_name %} where your project lives. For this example, it would be at `https://www.github.com/<your_username>/Spoon-Knife`. You'll see a banner indicating that your branch is one commit ahead of `octocat:main`. Click **Contribute** and then **Open a pull request**.
{% data variables.product.product_name %} will bring you to a page that shows the differences between your fork and the `octocat/Spoon-Knife` repository. Click **Create pull request**.
{% data variables.product.product_name %} will bring you to a page where you can enter a title and a description of your changes. It's important to provide as much useful information and a rationale for why you're making this pull request in the first place. The project owner needs to be able to determine whether your change is as useful to everyone as you think it is. Finally, click **Create pull request**.
## Managing feedback
Pull Requests are an area for discussion. In this case, the Octocat is very busy, and probably won't merge your changes. For other projects, don't be offended if the project owner rejects your pull request, or asks for more information on why it's been made. It may even be that the project owner chooses not to merge your pull request, and that's totally okay. Your copy will exist in infamy on the Internet. And who knows--maybe someone you've never met will find your changes much more valuable than the original project.
## Finding projects
You've successfully forked and contributed back to a repository. Go forth, and
contribute some more!{% ifversion fpt %} For more information, see "[Finding ways to contribute to open source on GitHub](/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)."{% endif %}

View File

@@ -56,7 +56,7 @@ Our {% data variables.product.prodname_dotcom %} [YouTube Training and Guides ch
## Extras ## Extras
An interactive [online Git course](http://www.codeschool.com/courses/git-real) from [Code School](http://codeschool.com) has seven levels with dozens of exercises in a fun game format. Feel free to adapt our [.gitignore templates](https://github.com/github/gitignore) to meet your needs. An interactive [online Git course](https://www.pluralsight.com/courses/code-school-git-real) from [Pluralsight](https://www.pluralsight.com/codeschool) has seven levels with dozens of exercises in a fun game format. Feel free to adapt our [.gitignore templates](https://github.com/github/gitignore) to meet your needs.
Extend your {% data variables.product.prodname_dotcom %} reach through {% ifversion fpt or ghec %}[integrations](/articles/about-integrations){% else %}integrations{% endif %}, or by installing [{% data variables.product.prodname_desktop %}](https://desktop.github.com) and the robust [Atom](https://atom.io) text editor. Extend your {% data variables.product.prodname_dotcom %} reach through {% ifversion fpt or ghec %}[integrations](/articles/about-integrations){% else %}integrations{% endif %}, or by installing [{% data variables.product.prodname_desktop %}](https://desktop.github.com) and the robust [Atom](https://atom.io) text editor.

View File

@@ -0,0 +1,145 @@
---
title: Hello World
intro: 'Follow this Hello World exercise to get started with {% data variables.product.product_name %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: quick_start
topics:
- Pull requests
- Fundamentals
miniTocMaxHeadingLevel: 3
---
## Introduction
{% data variables.product.product_name %} is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.
This tutorial teaches you {% data variables.product.product_name %} essentials like repositories, branches, commits, and pull requests. You'll create your own Hello World repository and learn {% data variables.product.product_name %}'s pull request workflow, a popular way to create and review code.
In this quickstart guide, you will:
* Create and use a repository
* Start and manage a new branch
* Make changes to a file and push them to {% data variables.product.product_name %} as commits
* Open and merge a pull request
To complete this tutorial, you need a [{% data variables.product.product_name %} account](http://github.com) and Internet access. You don't need to know how to code, use the command line, or install Git (the version control software that {% data variables.product.product_name %} is built on).
## Creating a repository
A repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets -- anything your project needs. Often, repositories include a `README` file, a file with information about your project. {% data variables.product.product_name %} makes it easy to add one at the same time you create your new repository. It also offers other common options such as a license file.
Your `hello-world` repository can be a place where you store ideas, resources, or even share and discuss things with others.
{% data reusables.repositories.create_new %}
1. In the **Repository name** box, enter `hello-world`.
2. In the **Description** box, write a short description.
3. Select **Add a README file**.
4. Click **Create repository**.
![Create a hello world repository](/assets/images/help/repository/hello-world-repo.png)
## Creating a branch
Branching lets you have different versions of a repository at one time.
By default, your repository has one branch named `main` that is considered to be the definitive branch. You can use branches to experiment and make edits before committing them to `main`.
When you create a branch off the `main` branch, you're making a copy, or snapshot, of `main` as it was at that point in time. If someone else made changes to the `main` branch while you were working on your branch, you could pull in those updates.
This diagram shows:
* The `main` branch
* A new branch called `feature`
* The journey that `feature` takes before it's merged into `main`
![branching diagram](/assets/images/help/repository/branching.png)
Have you ever saved different versions of a file? Something like:
* `story.txt`
* `story-joe-edit.txt`
* `story-joe-edit-reviewed.txt`
Branches accomplish similar goals in {% data variables.product.product_name %} repositories.
Here at {% data variables.product.product_name %}, our developers, writers, and designers use branches for keeping bug fixes and feature work separate from our `main` (production) branch. When a change is ready, they merge their branch into `main`.
### Create a branch
1. Click the **Code** tab of your `hello-world` repository.
2. Click the drop down at the top of the file list that says **main**.
![Branch menu](/assets/images/help/branch/branch-selection-dropdown.png)
4. Type a branch name, `readme-edits`, into the text box.
5. Click **Create branch: readme-edits from main**.
![Branch menu](/assets/images/help/repository/new-branch.png)
Now you have two branches, `main` and `readme-edits`. Right now, they look exactly the same. Next you'll add changes to the new branch.
## Making and committing changes
When you created a new branch in the previous step, {% data variables.product.product_name %} brought you to the code page for your new `readme-edits` branch, which is a copy of `main`.
You can make and save changes to the files in your repository. On {% data variables.product.product_name %}, saved changes are called commits. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes so that other contributors can understand what youve done and why.
1. Click the `README.md` file.
1. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the file.
3. In the editor, write a bit about yourself.
4. In the **Commit changes** box, write a commit message that describes your changes.
5. Click **Commit changes**.
![Commit example](/assets/images/help/repository/first-commit.png)
These changes will be made only to the README file on your `readme-edits` branch, so now this branch contains content that's different from `main`.
## Opening a pull request
Now that you have changes in a branch off of `main`, you can open a pull request.
Pull requests are the heart of collaboration on {% data variables.product.product_name %}. When you open a pull request, you're proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in different colors.
As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.
By using {% data variables.product.product_name %}'s `@mention` feature in your pull request message, you can ask for feedback from specific people or teams, whether they're down the hall or 10 time zones away.
You can even open pull requests in your own repository and merge them yourself. It's a great way to learn the {% data variables.product.product_name %} flow before working on larger projects.
1. Click the **Pull requests** tab of your `hello-world` repository.
2. Click **New pull request**
3. In the **Example Comparisons** box, select the branch you made, `readme-edits`, to compare with `main` (the original).
4. Look over your changes in the diffs on the Compare page, make sure they're what you want to submit.
![diff example](/assets/images/help/repository/diffs.png)
5. Click **Create pull request**.
6. Give your pull request a title and write a brief description of your changes. You can include emojis and drag and drop images and gifs.
7. Click **Create pull request**.
Your collaborators can now review your edits and make suggestions.
## Merging your pull request
In this final step, you will merge your `readme-edits` branch into the `main` branch.
1. Click **Merge pull request** to merge the changes into `main`.
2. Click **Confirm merge**.
3. Go ahead and delete the branch, since its changes have been incorporated, by clicking **Delete branch**.
## Next steps
By completing this tutorial, you've learned to create a project and make a pull request on {% data variables.product.product_name %}.
Here's what you accomplished in this tutorial:
* Created an open source repository
* Started and managed a new branch
* Changed a file and committed those changes to {% data variables.product.product_name %}
* Opened and merged a pull request
Take a look at your {% data variables.product.product_name %} profile and you'll see your work reflected on your contribution graph.
For more information about the power of branches and pull requests, see "[GitHub flow](/get-started/quickstart/github-flow)." For more information about getting started with {% data variables.product.product_name %}, see the other guides in the [getting started quickstart](/get-started/quickstart).

View File

@@ -12,10 +12,12 @@ topics:
- Notifications - Notifications
- Accounts - Accounts
children: children:
- /hello-world
- /set-up-git - /set-up-git
- /create-a-repo - /create-a-repo
- /fork-a-repo - /fork-a-repo
- /github-flow - /github-flow
- /contributing-to-projects
- /be-social - /be-social
- /communicating-on-github - /communicating-on-github
- /github-glossary - /github-glossary

View File

@@ -0,0 +1,179 @@
---
title: About Git
intro: 'Learn about the version control system, Git, and how it works with {% data variables.product.product_name %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: overview
topics:
- Fundamentals
- Git
miniTocMaxHeadingLevel: 3
---
## About version control and Git
A version control system, or VCS, tracks the history of changes as people and teams collaborate on projects together. As developers make changes to the project, any earlier version of the project can be recovered at any time.
Developers can review project history to find out:
- Which changes were made?
- Who made the changes?
- When were the changes made?
- Why were changes needed?
VCSs give each contributor a unified and consistent view of a project, surfacing work that's already in progress. Seeing a transparent history of changes, who made them, and how they contribute to the development of a project helps team members stay aligned while working independently.
In a distributed version control system, every developer has a full copy of the project and project history. Unlike once popular centralized version control systems, DVCSs don't need a constant connection to a central repository. Git is the most popular distributed version control system. Git is commonly used for both open source and commercial software development, with significant benefits for individuals, teams and businesses.
- Git lets developers see the entire timeline of their changes, decisions, and progression of any project in one place. From the moment they access the history of a project, the developer has all the context they need to understand it and start contributing.
- Developers work in every time zone. With a DVCS like Git, collaboration can happen any time while maintaining source code integrity. Using branches, developers can safely propose changes to production code.
- Businesses using Git can break down communication barriers between teams and keep them focused on doing their best work. Plus, Git makes it possible to align experts across a business to collaborate on major projects.
## About repositories
A repository, or Git project, encompasses the entire collection of files and folders associated with a project, along with each file's revision history. The file history appears as snapshots in time called commits. The commits can be organized into multiple lines of development called branches. Because Git is a DVCS, repositories are self-contained units and anyone who has a copy of the repository can access the entire codebase and its history. Using the command line or other ease-of-use interfaces, a Git repository also allows for: interaction with the history, cloning the repository, creating branches, committing, merging, comparing changes across versions of code, and more.
Through platforms like {% data variables.product.product_name %}, Git also provides more opportunities for project transparency and collaboration. Public repositories help teams work together to build the best possible final product.
## How {% data variables.product.product_name %} works
{% data variables.product.product_name %} hosts Git repositories and provides developers with tools to ship better code through command line features, issues (threaded discussions), pull requests, code review, or the use of a collection of free and for-purchase apps in the {% data variables.product.prodname_marketplace %}. With collaboration layers like the {% data variables.product.product_name %} flow, a community of 15 million developers, and an ecosystem with hundreds of integrations, {% data variables.product.product_name %} changes the way software is built.
{% data variables.product.product_name %} builds collaboration directly into the development process. Work is organized into repositories where developers can outline requirements or direction and set expectations for team members. Then, using the {% data variables.product.product_name %} flow, developers simply create a branch to work on updates, commit changes to save them, open a pull request to propose and discuss changes, and merge pull requests once everyone is on the same page. For more information, see "[GitHub flow](/get-started/quickstart/github-flow)."
## {% data variables.product.product_name %} and the command line
### Basic Git commands
To use Git, developers use specific commands to copy, create, change, and combine code. These commands can be executed directly from the command line or by using an application like {% data variables.product.prodname_desktop %}. Here are some common commands for using Git:
- `git init` initializes a brand new Git repository and begins tracking an existing directory. It adds a hidden subfolder within the existing directory that houses the internal data structure required for version control.
- `git clone` creates a local copy of a project that already exists remotely. The clone includes all the project's files, history, and branches.
- `git add` stages a change. Git tracks changes to a developer's codebase, but it's necessary to stage and take a snapshot of the changes to include them in the project's history. This command performs staging, the first part of that two-step process. Any changes that are staged will become a part of the next snapshot and a part of the project's history. Staging and committing separately gives developers complete control over the history of their project without changing how they code and work.
- `git commit` saves the snapshot to the project history and completes the change-tracking process. In short, a commit functions like taking a photo. Anything that's been staged with `git add` will become a part of the snapshot with `git commit`.
- `git status` shows the status of changes as untracked, modified, or staged.
- `git branch` shows the branches being worked on locally.
- `git merge` merges lines of development together. This command is typically used to combine changes made on two distinct branches. For example, a developer would merge when they want to combine changes from a feature branch into the main branch for deployment.
- `git pull` updates the local line of development with updates from its remote counterpart. Developers use this command if a teammate has made commits to a branch on a remote, and they would like to reflect those changes in their local environment.
- `git push` updates the remote repository with any commits made locally to a branch.
For more information, see the [full reference guide to Git commands](https://git-scm.com/docs).
### Example: Contribute to an existing repository
```bash
# download a repository on {% data variables.product.product_name %} to our machine
# Replace `owner/repo` with the owner and name of the repository to clone
git clone https://github.com/owner/repo.git
# change into the `repo` directory
cd repo
# create a new branch to store any new changes
git branch my-branch
# switch to that branch (line of development)
git checkout my-branch
# make changes, for example, edit `file1.md` and `file2.md` using the text editor
# stage the changed files
git add file1.md file2.md
# take a snapshot of the staging area (anything that's been added)
git commit -m "my snapshot"
# push changes to github
git push --set-upstream origin my-branch
```
### Example: Start a new repository and publish it to {% data variables.product.product_name %}
First, you will need to create a new repository on {% data variables.product.product_name %}. For more information, see "[Hello World](/get-started/quickstart/hello-world)." **Do not** initialize the repository with a README, .gitignore or License file. This empty repository will await your code.
```bash
# create a new directory, and initialize it with git-specific functions
git init my-repo
# change into the `my-repo` directory
cd my-repo
# create the first file in the project
touch README.md
# git isn't aware of the file, stage it
git add README.md
# take a snapshot of the staging area
git commit -m "add README to initial commit"
# provide the path for the repository you created on github
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPOSITORY-NAME.git
# push changes to github
git push --set-upstream origin main
```
### Example: contribute to an existing branch on {% data variables.product.product_name %}
This example assumes that you already have a project called `repo` already on the machine and that a new branch has been pushed to {% data variables.product.product_name %} since the last time changes were made locally.
```bash
# change into the `repo` directory
cd repo
# update all remote tracking branches, and the currently checked out branch
git pull
# change into the existing branch called `feature-a`
git checkout feature-a
# make changes, for example, edit `file1.md` using the text editor
# stage the changed file
git add file1.md
# take a snapshot of the staging area
git commit -m "edit file1"
# push changes to github
git push
```
## Models for collaborative development
There are two primary ways people collaborate on {% data variables.product.product_name %}:
1. Shared repository
2. Fork and pull
With a shared repository, individuals and teams are explicitly designated as contributors with read, write, or administrator access. This simple permission structure, combined with features like protected branches, helps teams progress quickly when they adopt {% data variables.product.product_name %}.
For an open source project, or for projects to which anyone can contribute, managing individual permissions can be challenging, but a fork and pull model allows anyone who can view the project to contribute. A fork is a copy of a project under an developer's personal account. Every developer has full control of their fork and is free to implement a fix or new feature. Work completed in forks is either kept separate, or is surfaced back to the original project via a pull request. There, maintainers can review the suggested changes before they're merged. For more information, see "[Contributing to projects](/get-started/quickstart/contributing-to-projects)."
## Further reading
The {% data variables.product.product_name %} team has created a library of educational videos and guides to help users continue to develop their skills and build better software.
- [Beginner projects to explore](https://github.com/showcases/great-for-new-contributors)
- [{% data variables.product.product_name %} video guides](https://youtube.com/githubguides)
For a detailed look at Git practices, the videos below show how to get the most out of some Git commands.
- [Working locally](https://www.youtube.com/watch?v=rBbbOouhI-s&index=2&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4)
- [`git status`](https://www.youtube.com/watch?v=SxmveNrZb5k&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4&index=3)
- [Two-step commits](https://www.youtube.com/watch?v=Vb0Ghkkc2hk&index=4&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4)
- [`git pull` and `git push`](https://www.youtube.com/watch?v=-uQHV9GOA0w&index=5&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4)

View File

@@ -16,6 +16,7 @@ versions:
ghae: '*' ghae: '*'
ghec: '*' ghec: '*'
children: children:
- /about-git
- /pushing-commits-to-a-remote-repository - /pushing-commits-to-a-remote-repository
- /getting-changes-from-a-remote-repository - /getting-changes-from-a-remote-repository
- /dealing-with-non-fast-forward-errors - /dealing-with-non-fast-forward-errors

View File

@@ -6,6 +6,7 @@ redirect_from:
- /github/copilot/telemetry-terms - /github/copilot/telemetry-terms
versions: versions:
fpt: '*' fpt: '*'
effectiveDate: '2021-10-04'
--- ---
## Additional telemetry ## Additional telemetry

View File

@@ -138,7 +138,7 @@ You can use query parameters to open issues. Query parameters are optional parts
{% endtip %} {% endtip %}
You must have the proper permissions for any action to use the equivalent query parameter. For example, you must have permission to add a label to an issue to use the `labels` query parameter. For more information, see "[Repository permission levels for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)." You must have the proper permissions for any action to use the equivalent query parameter. For example, you must have permission to add a label to an issue to use the `labels` query parameter. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
If you create an invalid URL using query parameters, or if you dont have the proper permissions, the URL will return a `404 Not Found` error page. If you create a URL that exceeds the server limit, the URL will return a `414 URI Too Long` error page. If you create an invalid URL using query parameters, or if you dont have the proper permissions, the URL will return a `404 Not Found` error page. If you create a URL that exceeds the server limit, the URL will return a `414 URI Too Long` error page.

View File

@@ -16,7 +16,7 @@ topics:
--- ---
You can only delete issues in a repository owned by your user account. You cannot delete issues in a repository owned by another user account, even if you are a collaborator there. You can only delete issues in a repository owned by your user account. You cannot delete issues in a repository owned by another user account, even if you are a collaborator there.
To delete an issue in a repository owned by an organization, an organization owner must enable deleting an issue for the organization's repositories, and you must have admin or owner permissions in the repository. For more information, see "[Allowing people to delete issues in your organization](/articles/allowing-people-to-delete-issues-in-your-organization)" and "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization/)." To delete an issue in a repository owned by an organization, an organization owner must enable deleting an issue for the organization's repositories, and you must have admin or owner permissions in the repository. For more information, see "[Allowing people to delete issues in your organization](/articles/allowing-people-to-delete-issues-in-your-organization)" and "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
Collaborators do not receive a notification when you delete an issue. When visiting the URL of a deleted issue, collaborators will see a message stating that the issue is deleted. People with admin or owner permissions in the repository will additionally see the username of the person who deleted the issue and when it was deleted. Collaborators do not receive a notification when you delete an issue. When visiting the URL of a deleted issue, collaborators will see a message stating that the issue is deleted. People with admin or owner permissions in the repository will additionally see the username of the person who deleted the issue and when it was deleted.

View File

@@ -15,7 +15,7 @@ topics:
- Pull requests - Pull requests
shortTitle: Transfer an issue shortTitle: Transfer an issue
--- ---
To transfer an open issue to another repository, you must have write permissions on the repository the issue is in and the repository you're transferring the issue to. For more information, see "[Repository permission levels for an organization](/articles/repository-permission-levels-for-an-organization)." To transfer an open issue to another repository, you must have write access to the repository the issue is in and the repository you're transferring the issue to. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
You can only transfer issues between repositories owned by the same user or organization account. {% ifversion fpt or ghes or ghec %}You can't transfer an issue from a private repository to a public repository.{% endif %} You can only transfer issues between repositories owned by the same user or organization account. {% ifversion fpt or ghes or ghec %}You can't transfer an issue from a private repository to a public repository.{% endif %}

Some files were not shown because too many files have changed in this diff Show More