Merge branch 'main' into main
@@ -9,7 +9,7 @@ The following large repositories are used throughout this checklist, it may be u
|
||||
- `github/github`
|
||||
- `github/docs-internal`
|
||||
|
||||
Additionally, you may want to download:
|
||||
Additionally, download:
|
||||
|
||||
- [Azure Storage Explorer](https://aka.ms/portalfx/downloadstorageexplorer)
|
||||
|
||||
@@ -40,7 +40,7 @@ Additionally, you may want to download:
|
||||
|
||||
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
|
||||
|
||||
## Step 3: Manually remove the search input from the archived docs
|
||||
## Step 2: Manually remove the search input from the archived docs
|
||||
|
||||
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `(0,f.jsx)("input",{"data-testid":"site-search-input",` Delete the entire function. For example, this:
|
||||
```
|
||||
@@ -88,7 +88,7 @@ Additionally, you may want to download:
|
||||
```
|
||||
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your temp directory with the scraped archive content.
|
||||
|
||||
## Step 2: Upload the scraped content directory to Azure storage
|
||||
## Step 3: Upload the scraped content directory to Azure storage
|
||||
|
||||
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resource](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
|
||||
- [ ] Click the "Open in Explorer" button to the right of search box. If you haven't already, click the download link to download "Microsoft Azure Storage Explorer." To login to the app, click the plug icon in the left sidebar and click the option to "add an azure account." When you login, you'll need a yubikey to authenticate through Okta.
|
||||
@@ -97,7 +97,11 @@ Additionally, you may want to download:
|
||||
- [ ] Check the log to ensure all files were uploaded successfully.
|
||||
- [ ] Remove the temporarily created directory from your `github/docs-internal` checkout.
|
||||
|
||||
## Step 4: Deprecate the version in docs-internal
|
||||
## Step 4: Create a tag and long-running branch
|
||||
|
||||
Create a new tag for the most recent commit on the `main` branch so that we can keep track of where in commit history we removed the GHES release. Create a tag called `enterprise-<release number>-release`. Then from that commit on `main` create a new branch called `enterprise-<release number>-release`. This branch will be long-lived and used to rerender and scrape content that is added after a release is deprecated.
|
||||
|
||||
## Step 5: Deprecate the version in docs-internal
|
||||
|
||||
In your `docs-internal` checkout:
|
||||
|
||||
@@ -111,7 +115,7 @@ You can test that the static pages were generated correctly on localhost and on
|
||||
|
||||
Poke around several pages, ensure that the stylesheets are working properly, images are rendering properly, and that the search functionality was disabled.
|
||||
|
||||
## Step 5: Remove static files for the version
|
||||
## Step 6: Remove static files for the version
|
||||
|
||||
**Note:** We do not remove the old content for GHES release notes. New release notes can be added after we perform a deprecation in some rare cases, and not removing this content makes it easier for us to re-scrape the content to add to Azure Blob Storage.
|
||||
|
||||
@@ -121,7 +125,7 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
|
||||
- [ ] 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.
|
||||
|
||||
## Step 6: Remove the liquid conditionals and content for the version
|
||||
## Step 7: Remove the liquid conditionals and content for the version
|
||||
|
||||
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-markup` branch: `git checkout -b remove-<version>-markup` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
|
||||
- [ ] Remove the outdated Liquid markup and frontmatter.
|
||||
@@ -131,7 +135,7 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
|
||||
- [ ] Debug any test failures or unexpected results -- it's very likely manual updates will be necessary, the script does a lot of work but doesn't automate everything and can't 100% replace human intent.
|
||||
- [ ] When the PR is approved, merge it in to complete the deprecation. This can be merged independently from step 5.
|
||||
|
||||
## Step 7: Deprecate the OpenAPI description in `github/github`
|
||||
## Step 8: Deprecate the OpenAPI description in `github/github`
|
||||
|
||||
- [ ] In `github/github`, edit the release's config file in `app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
|
||||
- [ ] Open a new PR, and get the required code owner approvals. A docs-content team member can approve it for the docs team.
|
||||
@@ -139,9 +143,23 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
|
||||
|
||||
**Note**: you can do this step independently of the other steps after a GHES version is deprecated since it should no longer get updates in github/github. You should plan to get this PR merged as soon as possible, otherwise if you wait too long our OpenAPI automation may re-add the static files that you removed in step 5.
|
||||
|
||||
## Step 5: Continue to deprecate the version in docs-internal
|
||||
## Step 9: Continue to deprecate the version in docs-internal
|
||||
|
||||
- [ ] Open a new PR. Make sure to check the following:
|
||||
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
|
||||
- [ ] The deprecated version renders in preview 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.
|
||||
|
||||
## Re-scraping a page or all pages
|
||||
|
||||
Occasionally, a change will need to be added to our archived enterprise versions. If this occurs, you can check out the `enterprise-<release number>-release` branch and re-scrape the page or all pages using `script/enterprise-server-deprecations/archive-version.js`. To scrape a single page you can use the `—page <page relative path>` option.
|
||||
|
||||
For each language, upload the new file to Azure blob storage in the `enterprise` container.
|
||||
|
||||
After uploading the new files, you will need to purge the Fastly cache for the single page. From Okta, go to Fastly and select `docs`. Click `Purge` then `Purge URL`. If you need to purge a whole path, just do a `Purge All`
|
||||
|
||||

|
||||
|
||||
Enter the URL or path and do a soft purge.
|
||||
|
||||

|
||||
|
||||
33
.github/actions-scripts/purge-fastly-edge-cache-per-language.js
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { languageKeys } from '../../lib/languages.js'
|
||||
|
||||
import { makeLanguageSurrogateKey } from '../../middleware/set-fastly-surrogate-key.js'
|
||||
import purgeEdgeCache from '../../script/deployment/purge-edge-cache.js'
|
||||
|
||||
// This covers things like `/api/webhooks` which isn't language specific.
|
||||
await purgeEdgeCache(makeLanguageSurrogateKey())
|
||||
|
||||
const languages = process.env.LANGUAGES
|
||||
? languagesFromString(process.env.LANGUAGES)
|
||||
: // Make sure `en` is first because contributors write mostly in English
|
||||
// and they're most likely wanting to see their landed changes appear
|
||||
// in production as soon as possible.
|
||||
languageKeys.sort((a) => (a === 'en' ? -1 : 1))
|
||||
|
||||
for (const language of languages) {
|
||||
await purgeEdgeCache(makeLanguageSurrogateKey(language))
|
||||
}
|
||||
|
||||
function languagesFromString(str) {
|
||||
const languages = str
|
||||
.split(/,/)
|
||||
.map((x) => x.trim())
|
||||
.filter(Boolean)
|
||||
if (!languages.every((lang) => languageKeys.includes(lang))) {
|
||||
throw new Error(
|
||||
`Unrecognized language code (${languages.find((lang) => !languageKeys.includes(lang))})`
|
||||
)
|
||||
}
|
||||
return languages
|
||||
}
|
||||
@@ -1,5 +1,21 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js'
|
||||
import purgeEdgeCache from '../../script/deployment/purge-edge-cache.js'
|
||||
|
||||
await purgeEdgeCache()
|
||||
// This will purge every response that *contains*
|
||||
// `process.env.FASTLY_SURROGATE_KEY || SURROGATE_ENUMS.DEFAULT`.
|
||||
// We normally send Surrogate-Key values like:
|
||||
//
|
||||
// every-deployment language:en
|
||||
// every-deployment language:fr
|
||||
// every-deployment language:ja
|
||||
// or
|
||||
// every-deployment no-language
|
||||
//
|
||||
// But if you send a purge request for just:
|
||||
//
|
||||
// every-deployment
|
||||
//
|
||||
// It will cover all surrogate keys that contain that.
|
||||
// So this the nuclear option for all keys with this prefix.
|
||||
await purgeEdgeCache(process.env.FASTLY_SURROGATE_KEY || SURROGATE_ENUMS.DEFAULT)
|
||||
|
||||
@@ -143,13 +143,6 @@ jobs:
|
||||
run: |
|
||||
az webapp deployment slot swap --slot canary --target-slot production -n ghdocs-prod -g docs-prod
|
||||
|
||||
- name: Purge Fastly edge cache
|
||||
env:
|
||||
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
|
||||
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
|
||||
FASTLY_SURROGATE_KEY: 'every-deployment'
|
||||
run: npm install got && .github/actions-scripts/purge-fastly-edge-cache.js
|
||||
|
||||
send-slack-notification-on-failure:
|
||||
needs: [azure-prod-build-and-deploy]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
2
.github/workflows/needs-sme-stale-check.yaml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
|
||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578
|
||||
with:
|
||||
only-labels: needs SME
|
||||
remove-stale-when-updated: true
|
||||
|
||||
40
.github/workflows/orphaned-assets-check.yml
vendored
@@ -29,6 +29,20 @@ jobs:
|
||||
run: |
|
||||
rm -rf translations
|
||||
|
||||
- name: Checkout the zh-cn repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.zh-cn
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/zh-CN
|
||||
|
||||
- name: Checkout the ja-jp repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.ja-jp
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/ja-JP
|
||||
|
||||
- name: Checkout the es-es repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
@@ -43,19 +57,33 @@ jobs:
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/pt-BR
|
||||
|
||||
- name: Checkout the zh-cn repo
|
||||
- name: Checkout the de-de repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.zh-cn
|
||||
repository: github/docs-internal.de-de
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/zh-CN
|
||||
path: translations/de-DE
|
||||
|
||||
- name: Checkout the ja-jp repo
|
||||
- name: Checkout the fr-fr repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.ja-jp
|
||||
repository: github/docs-internal.fr-fr
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/ja-JP
|
||||
path: translations/fr-FR
|
||||
|
||||
- name: Checkout the ru-ru repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.ru-ru
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/ru-RU
|
||||
|
||||
- name: Checkout the ko-kr repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.ko-kr
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translations/ko-KR
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
|
||||
|
||||
55
.github/workflows/purge-fastly.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Purge Fastly
|
||||
|
||||
# **What it does**: Sends a soft-purge to Fastly.
|
||||
# **Why we have it**: So that, right after a production deploy, we start afresh
|
||||
# **Who does it impact**: Writers and engineers.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
nuke_all:
|
||||
description: "Nuke all 'every-deployment' keys independent of language"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
languages:
|
||||
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
|
||||
required: false
|
||||
default: ''
|
||||
workflow_run:
|
||||
workflows: ['Azure Production - Build and Deploy']
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
|
||||
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
|
||||
|
||||
jobs:
|
||||
send-purges:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
|
||||
with:
|
||||
node-version: '16.17.0'
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Purge Fastly edge cache independent of language
|
||||
if: ${{ github.event.inputs.nuke_all }}
|
||||
run: .github/actions-scripts/purge-fastly-edge-cache.js
|
||||
|
||||
- name: Purge Fastly edge cache per language
|
||||
if: ${{ !github.event.inputs.nuke_all }}
|
||||
env:
|
||||
LANGUAGES: ${{ github.event.inputs.languages }}
|
||||
run: .github/actions-scripts/purge-fastly-edge-cache-per-language.js
|
||||
2
.github/workflows/stale.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
|
||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because there have been no updates in 365 days.'
|
||||
|
||||
23
.github/workflows/sync-search-elasticsearch.yml
vendored
@@ -35,6 +35,18 @@ env:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}
|
||||
|
||||
# This might seem a bit strange, but it's clever. Since this action
|
||||
# uses a matrix to deal with one language at a time, we can use this
|
||||
# to pretend it's always the same directory.
|
||||
TRANSLATIONS_ROOT_ES_ES: translation
|
||||
TRANSLATIONS_ROOT_ZH_CN: translation
|
||||
TRANSLATIONS_ROOT_JA_JP: translation
|
||||
TRANSLATIONS_ROOT_PT_BR: translation
|
||||
TRANSLATIONS_ROOT_FR_FR: translation
|
||||
TRANSLATIONS_ROOT_RU_RU: translation
|
||||
TRANSLATIONS_ROOT_KO_KR: translation
|
||||
TRANSLATIONS_ROOT_DE_DE: translation
|
||||
|
||||
jobs:
|
||||
figureOutMatrix:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -98,6 +110,14 @@ jobs:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
|
||||
- name: Checkout the non-English repo
|
||||
if: ${{ matrix.language != 'en' }}
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: github/docs-internal.${{ fromJSON('{"cn":"zh-cn","es":"es-es","ru":"ru-ru","ja":"ja-jp","pt":"pt-br","de":"de-de","fr":"fr-fr","ko":"ko-kr"}')[matrix.language] }}
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: translation
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
|
||||
with:
|
||||
@@ -119,9 +139,6 @@ jobs:
|
||||
- name: Start the server in the background
|
||||
env:
|
||||
ENABLE_DEV_LOGGING: false
|
||||
# Makes it so that the React rendering of pages just does the
|
||||
# minimal needed to be able to extract the page text for search.
|
||||
MINIMAL_RENDER: true
|
||||
run: |
|
||||
npm run sync-search-server > /tmp/stdout.log 2> /tmp/stderr.log &
|
||||
|
||||
|
||||
3
.github/workflows/sync-search-pr.yml
vendored
@@ -67,9 +67,6 @@ jobs:
|
||||
- name: Start the server in the background
|
||||
env:
|
||||
ENABLE_DEV_LOGGING: false
|
||||
# Makes it so that the React rendering of pages just does the
|
||||
# minimal needed to be able to extract the page text for search.
|
||||
MINIMAL_RENDER: true
|
||||
run: |
|
||||
npm run sync-search-server > /tmp/stdout.log 2> /tmp/stderr.log &
|
||||
|
||||
|
||||
4
.github/workflows/triage-stale-check.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
|
||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'A stale label has been added to this issue becuase it has been open for 60 days with no activity. To keep this issue open, add a comment within 3 days.'
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
if: github.repository == 'github/docs'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
|
||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: 'This is a gentle bump for the docs team that this PR is waiting for review.'
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
name: WIP Languages Create translation Batch Pull Request
|
||||
|
||||
# **What it does**:
|
||||
# - Creates one pull request per WIP language after running a series of automated checks,
|
||||
# removing translations that are broken in any known way
|
||||
# **Why we have it**:
|
||||
# - To test the translation pipeline for WIP languages
|
||||
# **Who does it impact**: Helps test how WIP languages will behave in CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
create-translation-batch-for-wip-langs:
|
||||
name: Create translation batch for WIP languages
|
||||
if: github.repository == 'github/docs-internal'
|
||||
runs-on: ubuntu-latest
|
||||
# A sync's average run time is ~3.2 hours.
|
||||
# This sets a maximum execution time of 300 minutes (5 hours) to prevent the workflow from running longer than necessary.
|
||||
timeout-minutes: 300
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
include:
|
||||
- language: ru
|
||||
language_dir: translations/ru-RU
|
||||
language_repo: github/docs-internal.ru-ru
|
||||
|
||||
- language: ko
|
||||
language_dir: translations/ko-KR
|
||||
language_repo: github/docs-internal.ko-kr
|
||||
|
||||
- language: fr
|
||||
language_dir: translations/fr-FR
|
||||
language_repo: github/docs-internal.fr-fr
|
||||
|
||||
- language: de
|
||||
language_dir: translations/de-DE
|
||||
language_repo: github/docs-internal.de-de
|
||||
|
||||
steps:
|
||||
- name: Set branch name
|
||||
id: set-branch
|
||||
run: |
|
||||
echo "::set-output name=BRANCH_NAME::msft-translation-batch-${{ matrix.language }}-$(date +%Y-%m-%d__%H-%M)"
|
||||
|
||||
- run: git config --global user.name "docubot"
|
||||
- run: git config --global user.email "67483024+docubot@users.noreply.github.com"
|
||||
|
||||
- name: Checkout the docs-internal repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
|
||||
- name: Create a branch for the current language
|
||||
run: git checkout -b ${{ steps.set-branch.outputs.BRANCH_NAME }}
|
||||
|
||||
- name: Remove unwanted git hooks
|
||||
run: rm .git/hooks/post-checkout
|
||||
|
||||
- name: Checkout the language-specific repo
|
||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
||||
with:
|
||||
repository: ${{ matrix.language_repo }}
|
||||
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
|
||||
path: ${{ matrix.language_dir }}
|
||||
|
||||
- name: Remove .git from the language-specific repo
|
||||
run: rm -rf ${{ matrix.language_dir }}/.git
|
||||
|
||||
- name: Commit translated files
|
||||
run: |
|
||||
git add ${{ matrix.language_dir }}
|
||||
git commit -m "Add translations" || echo "Nothing to commit"
|
||||
|
||||
- name: 'Setup node'
|
||||
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
|
||||
with:
|
||||
node-version: '16.17.0'
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Homogenize frontmatter
|
||||
run: |
|
||||
node script/i18n/homogenize-frontmatter.js
|
||||
git add ${{ matrix.language_dir }} && git commit -m "Run script/i18n/homogenize-frontmatter.js" || echo "Nothing to commit"
|
||||
|
||||
- name: Fix translation errors
|
||||
run: |
|
||||
node script/i18n/fix-translation-errors.js
|
||||
git add ${{ matrix.language_dir }} && git commit -m "Run script/i18n/fix-translation-errors.js" || echo "Nothing to commit"
|
||||
|
||||
- name: Check rendering
|
||||
run: |
|
||||
node script/i18n/lint-translation-files.js --check rendering | tee -a /tmp/batch.log | cat
|
||||
git add ${{ matrix.language_dir }} && git commit -m "Run script/i18n/lint-translation-files.js --check rendering" || echo "Nothing to commit"
|
||||
|
||||
- name: Reset files with broken liquid tags
|
||||
run: |
|
||||
node script/i18n/msft-reset-files-with-broken-liquid-tags.js --language=${{ matrix.language }} | tee -a /tmp/batch.log | cat
|
||||
git add ${{ matrix.language_dir }} && git commit -m "run script/i18n/msft-reset-files-with-broken-liquid-tags.js --language=${{ matrix.language }}" || echo "Nothing to commit"
|
||||
|
||||
- name: Check in CSV report
|
||||
run: |
|
||||
mkdir -p translations/log
|
||||
csvFile=translations/log/msft-${{ matrix.language }}-resets.csv
|
||||
script/i18n/msft-report-reset-files.js --report-type=csv --language=${{ matrix.language }} --log-file=/tmp/batch.log > $csvFile
|
||||
git add -f $csvFile && git commit -m "Check in ${{ matrix.language }} CSV report" || echo "Nothing to commit"
|
||||
|
||||
- name: Write the reported files that were reset to /tmp/pr-body.txt
|
||||
run: script/i18n/msft-report-reset-files.js --report-type=pull-request-body --language=${{ matrix.language }} --log-file=/tmp/batch.log --csv-path=${{ steps.set-branch.outputs.BRANCH_NAME }}/translations/log/msft-${{ matrix.language }}-resets.csv > /tmp/pr-body.txt
|
||||
|
||||
- name: Push filtered translations
|
||||
run: git push origin ${{ steps.set-branch.outputs.BRANCH_NAME }}
|
||||
|
||||
- name: Close existing stale batches
|
||||
uses: lee-dohm/close-matching-issues@e9e43aad2fa6f06a058cedfd8fb975fd93b56d8f
|
||||
with:
|
||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
query: 'type:pr label:translation-batch-${{ matrix.language }}'
|
||||
|
||||
- name: Create translation batch pull request
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
TITLE: '[DO NOT MERGE - WIP Language test]: New translation batch for ${{ matrix.language }}'
|
||||
BASE: 'main'
|
||||
HEAD: ${{ steps.set-branch.outputs.BRANCH_NAME }}
|
||||
LANGUAGE: ${{ matrix.language }}
|
||||
BODY_FILE: '/tmp/pr-body.txt'
|
||||
run: .github/actions-scripts/msft-create-translation-batch-pr.js
|
||||
|
||||
# - name: Approve PR
|
||||
# if: github.ref_name == 'main'
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
# run: gh pr review --approve || echo "Nothing to approve"
|
||||
|
||||
# - name: Set auto-merge
|
||||
# if: github.ref_name == 'main'
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
# run: gh pr merge ${{ steps.set-branch.outputs.BRANCH_NAME }} --auto --squash || echo "Nothing to merge"
|
||||
|
||||
# When the maximum execution time is reached for this job, Actions cancels the workflow run.
|
||||
# This emits a notification for the first responder to triage.
|
||||
# - name: Send Slack notification if workflow is cancelled
|
||||
# uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
|
||||
# if: cancelled()
|
||||
# with:
|
||||
# channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
|
||||
# bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}🎉
|
||||
# color: failure
|
||||
# text: 'The new translation batch for ${{ matrix.language }} was cancelled.'
|
||||
|
||||
# Emit a notification for the first responder to triage if the workflow failed.
|
||||
# - name: Send Slack notification if workflow failed
|
||||
# uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340
|
||||
# if: failure()
|
||||
# with:
|
||||
# channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
|
||||
# bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
|
||||
# color: failure
|
||||
# text: 'The new translation batch for ${{ matrix.language }} failed.'
|
||||
BIN
assets/images/fastly_purge.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
assets/images/fastly_purge_url.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
assets/images/help/copilot/access-removal-list.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/add-people-add-teams.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/images/help/copilot/add-teams.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/help/copilot/allow-all-members.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/confirm-seat-assignment-selected.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/images/help/copilot/confirm-seat-assignment.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/csv-results.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/disable-access.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/images/help/copilot/duplication-detection-org-policy.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/images/help/copilot/manage-access-search.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
assets/images/help/copilot/manage-org-access-enterprise.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/images/help/copilot/monthly-usage-enterprise.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
assets/images/help/copilot/org-level-seat-view.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/images/help/copilot/proxy-authorization.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
assets/images/help/copilot/proxy-configuration-jetbrains.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/images/help/copilot/proxy-strict-ssl.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
assets/images/help/copilot/proxy-textbox.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/images/help/copilot/remove-access-button.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
assets/images/help/copilot/remove-access.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/help/copilot/save-disabled.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/save-org-settings-enterprise.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/images/help/copilot/selected-users-teams.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/help/copilot/server-certificates-jetbrains.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/images/help/copilot/set-org-permissions-enterprise.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/images/help/copilot/user-permissions-save.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 117 KiB |
@@ -11,6 +11,8 @@ import { useMainContext } from 'components/context/MainContext'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const MINIMAL_RENDER = Boolean(JSON.parse(process.env.MINIMAL_RENDER || 'false'))
|
||||
|
||||
type Props = { children?: React.ReactNode }
|
||||
export const DefaultLayout = (props: Props) => {
|
||||
const {
|
||||
@@ -31,7 +33,7 @@ export const DefaultLayout = (props: Props) => {
|
||||
// This is only true when we do search indexing which renders every page
|
||||
// just to be able to `cheerio` load the main body (and the meta
|
||||
// keywords tag).
|
||||
if (process.env.MINIMAL_RENDER) {
|
||||
if (MINIMAL_RENDER) {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
|
||||
@@ -2,6 +2,8 @@ import { parseTemplate } from 'url-template'
|
||||
import { stringify } from 'javascript-stringify'
|
||||
|
||||
import type { CodeSample, Operation } from '../rest/types'
|
||||
import { useVersion } from 'components/hooks/useVersion'
|
||||
import { useMainContext } from 'components/context/MainContext'
|
||||
|
||||
type CodeExamples = Record<string, any>
|
||||
/*
|
||||
@@ -15,6 +17,8 @@ type CodeExamples = Record<string, any>
|
||||
-d '{"ref":"topic-branch","payload":"{ \"deploy\": \"migrate\" }","description":"Deploy request from hubot"}'
|
||||
*/
|
||||
export function getShellExample(operation: Operation, codeSample: CodeSample) {
|
||||
const { currentVersion } = useVersion()
|
||||
const { allVersions } = useMainContext()
|
||||
// This allows us to display custom media types like application/sarif+json
|
||||
const defaultAcceptHeader = codeSample?.response?.contentType?.includes('+json')
|
||||
? codeSample.response.contentType
|
||||
@@ -52,9 +56,15 @@ export function getShellExample(operation: Operation, codeSample: CodeSample) {
|
||||
authHeader = '-u "api_key:your-password"'
|
||||
}
|
||||
|
||||
const apiVersionHeader =
|
||||
allVersions[currentVersion].apiVersions.length > 0 &&
|
||||
allVersions[currentVersion].latestApiVersion
|
||||
? `\\\n -H "X-GitHub-Api-Version: ${allVersions[currentVersion].latestApiVersion}"`
|
||||
: ''
|
||||
|
||||
const args = [
|
||||
operation.verb !== 'get' && `-X ${operation.verb.toUpperCase()}`,
|
||||
`-H "Accept: ${defaultAcceptHeader}" \\\n ${authHeader}`,
|
||||
`-H "Accept: ${defaultAcceptHeader}" \\\n ${authHeader}${apiVersionHeader}`,
|
||||
`${operation.serverUrl}${requestPath}`,
|
||||
requestBodyParams,
|
||||
].filter(Boolean)
|
||||
|
||||
@@ -22,16 +22,15 @@ import styles from './Header.module.scss'
|
||||
export const Header = () => {
|
||||
const router = useRouter()
|
||||
const { error } = useMainContext()
|
||||
const { allVersions } = useMainContext()
|
||||
const { currentProduct, allVersions } = useMainContext()
|
||||
const { currentVersion } = useVersion()
|
||||
const { t } = useTranslation(['header', 'homepage'])
|
||||
const isRestPage = currentProduct && currentProduct.id === 'rest'
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(
|
||||
router.pathname !== '/' && router.query.query && true
|
||||
)
|
||||
const [scroll, setScroll] = useState(false)
|
||||
|
||||
const { hasAccount } = useHasAccount()
|
||||
|
||||
const signupCTAVisible =
|
||||
hasAccount === false && // don't show if `null`
|
||||
(currentVersion === DEFAULT_VERSION || currentVersion === 'enterprise-cloud@latest')
|
||||
@@ -92,8 +91,8 @@ export const Header = () => {
|
||||
<Breadcrumbs />
|
||||
</div>
|
||||
<div className="d-flex flex-items-center">
|
||||
<VersionPicker />
|
||||
<LanguagePicker />
|
||||
<VersionPicker variant="header" />
|
||||
<LanguagePicker variant="header" />
|
||||
|
||||
{signupCTAVisible && (
|
||||
<a
|
||||
@@ -161,7 +160,7 @@ export const Header = () => {
|
||||
<div className="border-top my-2" />
|
||||
<LanguagePicker variant="inline" />
|
||||
|
||||
{allVersions[currentVersion].apiVersions.length > 0 && (
|
||||
{isRestPage && allVersions[currentVersion].apiVersions.length > 0 && (
|
||||
<ApiVersionPicker variant="inline" />
|
||||
)}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useRouter } from 'next/router'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import { useLanguages } from 'components/context/LanguagesContext'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '../../lib/constants.js'
|
||||
|
||||
function rememberPreferredLanguage(value: string) {
|
||||
@@ -31,7 +31,7 @@ function rememberPreferredLanguage(value: string) {
|
||||
}
|
||||
|
||||
type Props = {
|
||||
variant?: 'inline'
|
||||
variant: 'inline' | 'header'
|
||||
}
|
||||
|
||||
export const LanguagePicker = ({ variant }: Props) => {
|
||||
@@ -61,13 +61,20 @@ export const LanguagePicker = ({ variant }: Props) => {
|
||||
<Picker
|
||||
variant={variant}
|
||||
defaultText={t('language_picker_default_text')}
|
||||
options={langs.map((lang) => ({
|
||||
items={langs.map((lang) => ({
|
||||
text: lang.nativeName || lang.name,
|
||||
selected: lang === selectedLang,
|
||||
locale: lang.code,
|
||||
href: `${routerPath}`,
|
||||
onselect: rememberPreferredLanguage,
|
||||
href: `/${lang.code}${routerPath}`,
|
||||
extra: {
|
||||
locale: lang.code,
|
||||
},
|
||||
}))}
|
||||
onSelect={(item) => {
|
||||
if (item.extra?.locale) rememberPreferredLanguage(item.extra.locale)
|
||||
}}
|
||||
dataTestId="field"
|
||||
ariaLabel="Select field type"
|
||||
alignment="center"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import { LinkExternalIcon } from '@primer/octicons-react'
|
||||
|
||||
import { useMainContext } from 'components/context/MainContext'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
|
||||
export const ProductPicker = () => {
|
||||
const router = useRouter()
|
||||
@@ -14,12 +15,27 @@ export const ProductPicker = () => {
|
||||
<Picker
|
||||
variant="inline"
|
||||
defaultText={t('product_picker_default_text')}
|
||||
options={activeProducts.map((product) => ({
|
||||
items={activeProducts.map((product) => ({
|
||||
text: product.name,
|
||||
selected: product.name === currentProduct?.name,
|
||||
external: product.external,
|
||||
href: `${product.external ? '' : `/${router.locale}`}${product.href}`,
|
||||
extra: {
|
||||
external: product.external,
|
||||
},
|
||||
}))}
|
||||
alignment="end"
|
||||
dataTestId="field"
|
||||
ariaLabel="Select field type"
|
||||
renderItem={(item) => {
|
||||
return item.extra?.external ? (
|
||||
<>
|
||||
{item.text}
|
||||
<LinkExternalIcon size="small" className="ml-1" />
|
||||
</>
|
||||
) : (
|
||||
item.text
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import { ArrowRightIcon, InfoIcon } from '@primer/octicons-react'
|
||||
|
||||
import { useMainContext } from 'components/context/MainContext'
|
||||
import { DEFAULT_VERSION, useVersion } from 'components/hooks/useVersion'
|
||||
@@ -6,7 +7,7 @@ import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { Picker } from 'components/ui/Picker'
|
||||
|
||||
type Props = {
|
||||
variant?: 'inline'
|
||||
variant: 'inline' | 'header'
|
||||
}
|
||||
|
||||
export const VersionPicker = ({ variant }: Props) => {
|
||||
@@ -23,8 +24,10 @@ export const VersionPicker = ({ variant }: Props) => {
|
||||
text: allVersions[permalink.pageVersion].versionTitle,
|
||||
selected: currentVersion === permalink.pageVersion,
|
||||
href: permalink.href,
|
||||
arrow: false,
|
||||
info: false,
|
||||
extra: {
|
||||
arrow: false,
|
||||
info: false,
|
||||
},
|
||||
}))
|
||||
|
||||
const hasEnterpriseVersions = (page.permalinks || []).some((permalink) =>
|
||||
@@ -35,9 +38,11 @@ export const VersionPicker = ({ variant }: Props) => {
|
||||
allLinks.push({
|
||||
text: t('all_enterprise_releases'),
|
||||
selected: false,
|
||||
arrow: true,
|
||||
href: `/${router.locale}/${enterpriseServerVersions[0]}/admin/all-releases`,
|
||||
info: false,
|
||||
extra: {
|
||||
arrow: true,
|
||||
info: false,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,15 +52,35 @@ export const VersionPicker = ({ variant }: Props) => {
|
||||
allLinks.push({
|
||||
text: t('about_versions'),
|
||||
selected: false,
|
||||
arrow: false,
|
||||
info: true,
|
||||
href: `/${router.locale}${currentVersionPathSegment}/get-started/learning-about-github/about-versions-of-github-docs`,
|
||||
extra: {
|
||||
arrow: false,
|
||||
info: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div data-testid="version-picker">
|
||||
<Picker variant={variant} defaultText={t('version_picker_default_text')} options={allLinks} />
|
||||
<Picker
|
||||
variant={variant}
|
||||
defaultText={t('version_picker_default_text')}
|
||||
items={allLinks}
|
||||
alignment="end"
|
||||
dataTestId="field"
|
||||
ariaLabel="Select field type"
|
||||
renderItem={(item) => {
|
||||
return (
|
||||
<div className={item.extra?.arrow || item.extra?.info ? 'f6' : undefined}>
|
||||
{item.text}
|
||||
{item.extra?.arrow && (
|
||||
<ArrowRightIcon verticalAlign="middle" size={15} className="ml-1" />
|
||||
)}
|
||||
{item.extra?.info && <InfoIcon verticalAlign="middle" size={15} className="ml-1" />}
|
||||
</div>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import cx from 'classnames'
|
||||
import Cookies from 'js-cookie'
|
||||
import { InfoIcon } from '@primer/octicons-react'
|
||||
|
||||
import { useMainContext } from 'components/context/MainContext'
|
||||
import { DEFAULT_VERSION, useVersion } from 'components/hooks/useVersion'
|
||||
@@ -13,7 +14,7 @@ import styles from './SidebarProduct.module.scss'
|
||||
const API_VERSION_SUFFIX = ' (latest)'
|
||||
|
||||
type Props = {
|
||||
variant?: 'inline'
|
||||
variant: 'inline' | 'header'
|
||||
width?: number
|
||||
}
|
||||
|
||||
@@ -67,19 +68,23 @@ export const ApiVersionPicker = ({ variant, width }: Props) => {
|
||||
text: dateDisplayText,
|
||||
selected: router.query.apiVersion === date,
|
||||
href: itemLink,
|
||||
info: false,
|
||||
onselect: rememberApiVersion,
|
||||
extra: {
|
||||
info: false,
|
||||
currentDate,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
apiVersionLinks.push({
|
||||
text: t('rest.versioning.about_versions'),
|
||||
selected: false,
|
||||
info: true,
|
||||
href: `/${router.locale}${
|
||||
currentVersion === DEFAULT_VERSION ? '' : `/${currentVersion}`
|
||||
}/rest/overview/api-versions`,
|
||||
onselect: rememberApiVersion,
|
||||
extra: {
|
||||
info: true,
|
||||
currentDate,
|
||||
},
|
||||
})
|
||||
|
||||
// This only shows the REST Version picker if it's calendar date versioned
|
||||
@@ -99,9 +104,26 @@ export const ApiVersionPicker = ({ variant, width }: Props) => {
|
||||
<div data-testid="api-version-picker" className="width-full">
|
||||
<Picker
|
||||
variant={variant}
|
||||
apiVersion={true}
|
||||
defaultText={currentDateDisplayText}
|
||||
options={apiVersionLinks}
|
||||
items={apiVersionLinks}
|
||||
pickerLabel="Version"
|
||||
alignment="center"
|
||||
buttonBorder={true}
|
||||
dataTestId="version"
|
||||
ariaLabel="Select API Version"
|
||||
onSelect={(item) => {
|
||||
if (item.extra?.currentDate) rememberApiVersion(item.extra.currentDate)
|
||||
}}
|
||||
renderItem={(item) => {
|
||||
return item.extra?.info ? (
|
||||
<div className="f6">
|
||||
{item.text}
|
||||
<InfoIcon verticalAlign="middle" size={15} className="ml-1" />
|
||||
</div>
|
||||
) : (
|
||||
item.text
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,7 +109,7 @@ export const SidebarProduct = () => {
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<ApiVersionPicker width={sidebarWidth} />
|
||||
<ApiVersionPicker width={sidebarWidth} variant="header" />
|
||||
<li className="my-3">
|
||||
<ul className="list-style-none">
|
||||
{conceptualPages.map((childPage, i) => {
|
||||
|
||||
33
components/ui/Picker/Fields.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { ReactNode } from 'react'
|
||||
import { ActionList } from '@primer/react'
|
||||
|
||||
import { PickerItem } from './Picker'
|
||||
import { Link } from 'components/Link'
|
||||
|
||||
export const Fields = (fieldProps: {
|
||||
open: boolean
|
||||
setOpen: React.Dispatch<React.SetStateAction<boolean>>
|
||||
items: PickerItem[]
|
||||
onSelect?: (item: PickerItem) => void
|
||||
renderItem?: (item: PickerItem) => ReactNode | string
|
||||
}) => {
|
||||
const { open, setOpen, items, onSelect, renderItem } = fieldProps
|
||||
|
||||
return (
|
||||
<ActionList selectionVariant="single">
|
||||
{items.map((item) => (
|
||||
<ActionList.LinkItem
|
||||
as={Link}
|
||||
key={item.text}
|
||||
href={item.href}
|
||||
onClick={() => {
|
||||
if (onSelect) onSelect(item)
|
||||
setOpen(!open)
|
||||
}}
|
||||
>
|
||||
{renderItem ? renderItem(item) : item.text}
|
||||
</ActionList.LinkItem>
|
||||
))}
|
||||
</ActionList>
|
||||
)
|
||||
}
|
||||
@@ -1,105 +1,90 @@
|
||||
import React, { useState } from 'react'
|
||||
import { ActionList, ActionMenu, Box, Details, Text, useDetails } from '@primer/react'
|
||||
import { ArrowRightIcon, ChevronDownIcon, InfoIcon, LinkExternalIcon } from '@primer/octicons-react'
|
||||
import React, { ReactNode, useState } from 'react'
|
||||
import cx from 'classnames'
|
||||
import { ActionMenu, Box, Details, Text, useDetails } from '@primer/react'
|
||||
import { ChevronDownIcon } from '@primer/octicons-react'
|
||||
import { AnchorAlignment } from '@primer/behaviors'
|
||||
|
||||
import { Link } from 'components/Link'
|
||||
import { Fields } from './Fields'
|
||||
|
||||
export type PickerOptionsTypeT = {
|
||||
text: string
|
||||
href: string
|
||||
locale?: string
|
||||
external?: boolean
|
||||
arrow?: boolean
|
||||
info?: boolean
|
||||
selected?: boolean
|
||||
onselect?: Function | void
|
||||
}
|
||||
|
||||
export type PickerPropsT = {
|
||||
variant?: 'inline'
|
||||
apiVersion?: boolean
|
||||
interface Props {
|
||||
variant: 'inline' | 'header'
|
||||
items: PickerItem[]
|
||||
onSelect?: (item: PickerItem) => void
|
||||
buttonBorder?: boolean
|
||||
pickerLabel?: string
|
||||
dataTestId: string
|
||||
defaultText: string
|
||||
options: Array<PickerOptionsTypeT>
|
||||
ariaLabel: string
|
||||
alignment: AnchorAlignment
|
||||
renderItem?: (item: PickerItem) => ReactNode | string
|
||||
}
|
||||
|
||||
export function Picker({ variant, apiVersion, defaultText, options }: PickerPropsT) {
|
||||
export interface PickerItem {
|
||||
href: string
|
||||
text: string
|
||||
selected: boolean
|
||||
extra?: {
|
||||
[key: string]: any
|
||||
}
|
||||
}
|
||||
|
||||
export const Picker = ({
|
||||
variant,
|
||||
items,
|
||||
ariaLabel,
|
||||
pickerLabel,
|
||||
dataTestId,
|
||||
defaultText,
|
||||
onSelect,
|
||||
buttonBorder,
|
||||
alignment,
|
||||
renderItem,
|
||||
}: Props) => {
|
||||
const [open, setOpen] = useState(false)
|
||||
const { getDetailsProps } = useDetails({ closeOnOutsideClick: true })
|
||||
const selectedOption = options.find((opt) => opt.selected === true)
|
||||
const selectedOption = items.find((item) => item.selected === true)
|
||||
|
||||
function getFields() {
|
||||
return (
|
||||
<ActionList selectionVariant="single">
|
||||
{options.map((option) => (
|
||||
<ActionList.LinkItem
|
||||
as={Link}
|
||||
className={option.arrow || option.info ? 'f6' : ''}
|
||||
locale={option.locale}
|
||||
key={option.text}
|
||||
href={option.href}
|
||||
onClick={() => {
|
||||
if (option.onselect) {
|
||||
if (apiVersion) {
|
||||
option.onselect(option.text)
|
||||
} else {
|
||||
option.onselect(option.locale)
|
||||
}
|
||||
}
|
||||
setOpen(!open)
|
||||
}}
|
||||
>
|
||||
{option.text}
|
||||
{option.external && <LinkExternalIcon size="small" className="ml-1" />}
|
||||
{option.info && <InfoIcon verticalAlign="middle" size={15} className="ml-1" />}
|
||||
{option.arrow && <ArrowRightIcon verticalAlign="middle" size={15} className="ml-1" />}
|
||||
</ActionList.LinkItem>
|
||||
))}
|
||||
</ActionList>
|
||||
)
|
||||
}
|
||||
|
||||
function getInlinePicker() {
|
||||
return (
|
||||
<Details {...getDetailsProps()} className={cx('position-relative details-reset', 'd-block')}>
|
||||
<summary
|
||||
className="d-block btn btn-invisible color-fg-default"
|
||||
aria-haspopup="true"
|
||||
aria-label={selectedOption?.text || defaultText}
|
||||
>
|
||||
<div className="d-flex flex-items-center flex-justify-between">
|
||||
<Text>{selectedOption?.text || defaultText}</Text>
|
||||
<ChevronDownIcon size={24} className="arrow ml-md-1" />
|
||||
</div>
|
||||
</summary>
|
||||
<Box>
|
||||
<ul>{getFields()}</ul>
|
||||
</Box>
|
||||
</Details>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{variant === 'inline' ? (
|
||||
getInlinePicker()
|
||||
) : (
|
||||
<ActionMenu open={open} onOpenChange={setOpen}>
|
||||
<ActionMenu.Button
|
||||
aria-label={apiVersion ? `Select API version` : `Select field type`}
|
||||
variant={apiVersion ? 'default' : 'invisible'}
|
||||
sx={{ color: `var(--color-fg-default)`, width: '100%' }}
|
||||
>
|
||||
<span style={{ fontWeight: 'normal' }}>{`${apiVersion ? `Version: ` : ''}`}</span>
|
||||
<span data-testid={apiVersion ? `version` : `field`}>
|
||||
{selectedOption?.text || defaultText}
|
||||
</span>
|
||||
</ActionMenu.Button>
|
||||
<ActionMenu.Overlay width="auto" align={apiVersion ? 'center' : 'end'}>
|
||||
{getFields()}
|
||||
</ActionMenu.Overlay>
|
||||
</ActionMenu>
|
||||
)}
|
||||
</React.Fragment>
|
||||
return variant === 'inline' ? (
|
||||
<Details {...getDetailsProps()} className={cx('position-relative details-reset', 'd-block')}>
|
||||
<summary
|
||||
className="d-block btn btn-invisible color-fg-default"
|
||||
aria-haspopup="true"
|
||||
aria-label={selectedOption?.text || defaultText}
|
||||
>
|
||||
<div className="d-flex flex-items-center flex-justify-between">
|
||||
<Text>{selectedOption?.text || defaultText}</Text>
|
||||
<ChevronDownIcon size={24} className="arrow ml-md-1" />
|
||||
</div>
|
||||
</summary>
|
||||
<Box>
|
||||
<Fields
|
||||
open={open}
|
||||
setOpen={setOpen}
|
||||
items={items}
|
||||
onSelect={onSelect}
|
||||
renderItem={renderItem}
|
||||
/>
|
||||
</Box>
|
||||
</Details>
|
||||
) : (
|
||||
<ActionMenu open={open} onOpenChange={setOpen}>
|
||||
<ActionMenu.Button
|
||||
aria-label={ariaLabel}
|
||||
variant={buttonBorder ? 'default' : 'invisible'}
|
||||
sx={{ color: `var(--color-fg-default)`, width: '100%' }}
|
||||
>
|
||||
{pickerLabel && <span style={{ fontWeight: 'normal' }}>{`${pickerLabel}: `}</span>}
|
||||
<span data-testid={dataTestId}>{selectedOption?.text || defaultText}</span>
|
||||
</ActionMenu.Button>
|
||||
<ActionMenu.Overlay width="auto" align={alignment}>
|
||||
<Fields
|
||||
open={open}
|
||||
setOpen={setOpen}
|
||||
items={items}
|
||||
onSelect={onSelect}
|
||||
renderItem={renderItem}
|
||||
/>
|
||||
</ActionMenu.Overlay>
|
||||
</ActionMenu>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export { Picker } from './Picker'
|
||||
export { Fields } from './Fields'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ActionList, ActionMenu, Flash } from '@primer/react'
|
||||
import { useState, KeyboardEvent } from 'react'
|
||||
import { useState, KeyboardEvent, useEffect } from 'react'
|
||||
import useSWR from 'swr'
|
||||
import { useRouter } from 'next/router'
|
||||
import { slug } from 'github-slugger'
|
||||
import cx from 'classnames'
|
||||
|
||||
@@ -48,6 +49,8 @@ export function Webhook({ webhook }: Props) {
|
||||
// Get version for requests to switch webhook action type
|
||||
const version = useVersion()
|
||||
const { t } = useTranslation('products')
|
||||
const router = useRouter()
|
||||
const { locale } = router
|
||||
|
||||
const context = useMainContext()
|
||||
// Get more user friendly language for the different availability options in
|
||||
@@ -60,18 +63,61 @@ export function Webhook({ webhook }: Props) {
|
||||
const [clickedBodyParameterName, setClickedBodyParameterName] = useState<undefined | string>('')
|
||||
// The selected webhook action type the user selects via a dropdown
|
||||
const [selectedWebhookActionType, setSelectedWebhookActionType] = useState('')
|
||||
// The index of the selected action type so we can highlight which one is selected
|
||||
// in the action type dropdown
|
||||
const [selectedActionTypeIndex, setSelectedActionTypeIndex] = useState(0)
|
||||
|
||||
const webhookSlug = slug(webhook.data.category)
|
||||
const webhookFetchUrl = `/api/webhooks/v1?${new URLSearchParams({
|
||||
category: webhook.data.category,
|
||||
version: version.currentVersion,
|
||||
})}`
|
||||
|
||||
// callback for the action type dropdown -- besides setting the action type
|
||||
// state, we also want to clear the clicked body param so that no properties
|
||||
// are expanded when we re-render the webhook
|
||||
function handleActionTypeChange(type: string) {
|
||||
// When you load the page we want to support linking to a specific webhook type
|
||||
// so this effect sets the webhook type if it's provided in the URL e.g.:
|
||||
//
|
||||
// webhook-events-and-payloads?actionType=published#package
|
||||
//
|
||||
// where the webhook is set in the hash (which is equal to webhookSlug) and
|
||||
// the webhook action type is passed in the actionType parameter.
|
||||
useEffect(() => {
|
||||
const url = new URL(location.href)
|
||||
const actionType = url.searchParams.get('actionType')
|
||||
const hash = url.hash?.slice(1)
|
||||
|
||||
if (actionType && hash && webhook.actionTypes.includes(actionType) && hash === webhookSlug) {
|
||||
setSelectedWebhookActionType(actionType)
|
||||
setSelectedActionTypeIndex(webhook.actionTypes.indexOf(actionType))
|
||||
}
|
||||
}, [])
|
||||
|
||||
// callback for the action type dropdown -- sets the action type to the given
|
||||
// type, index is the index of the selected type so we can highlight it as
|
||||
// selected.
|
||||
//
|
||||
// Besides setting the action type state, we also want to:
|
||||
//
|
||||
// * clear the clicked body param so that no properties are expanded when we
|
||||
// re-render the webhook
|
||||
// * update the URL so people can link to a specific webhook action type
|
||||
function handleActionTypeChange(type: string, index: number) {
|
||||
setClickedBodyParameterName('')
|
||||
setSelectedWebhookActionType(type)
|
||||
setSelectedActionTypeIndex(index)
|
||||
|
||||
const { asPath } = router
|
||||
let [pathRoot, pathQuery = ''] = asPath.split('?')
|
||||
const params = new URLSearchParams(pathQuery)
|
||||
|
||||
if (pathRoot.includes('#')) {
|
||||
pathRoot = pathRoot.split('#')[0]
|
||||
}
|
||||
|
||||
params.set('actionType', type)
|
||||
router.push({ pathname: pathRoot, query: params.toString(), hash: webhookSlug }, undefined, {
|
||||
shallow: true,
|
||||
locale,
|
||||
})
|
||||
}
|
||||
|
||||
// callback to trigger useSWR() hook after a nested property is clicked
|
||||
@@ -142,17 +188,17 @@ export function Webhook({ webhook }: Props) {
|
||||
<h4 className="border-bottom pt-2 pb-2 mb-3">{t('webhooks.action_type')}</h4>
|
||||
<div className="mb-3">
|
||||
<ActionMenu>
|
||||
<ActionMenu.Button className="text-bold">
|
||||
<ActionMenu.Button aria-label="Select a webhook action type" className="text-bold">
|
||||
{currentWebhookActionType}
|
||||
</ActionMenu.Button>
|
||||
<ActionMenu.Overlay>
|
||||
<ActionList>
|
||||
{webhook.actionTypes.map((type) => {
|
||||
<ActionList selectionVariant="single">
|
||||
{webhook.actionTypes.map((type, index) => {
|
||||
return (
|
||||
<ActionList.Item
|
||||
disabled={type === currentWebhookActionType}
|
||||
selected={index === selectedActionTypeIndex}
|
||||
key={`${webhook.name}-${type}`}
|
||||
onSelect={() => handleActionTypeChange(type)}
|
||||
onSelect={() => handleActionTypeChange(type, index)}
|
||||
>
|
||||
{type}
|
||||
</ActionList.Item>
|
||||
|
||||
@@ -94,7 +94,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
|
||||
shell: bash
|
||||
```
|
||||
{% endraw %}
|
||||
This file defines the `who-to-greet` input, maps the random generated number to the `random-number` output variable, and runs the `goodbye.sh` script. It also tells the runner how to execute the composite action.
|
||||
This file defines the `who-to-greet` input, maps the random generated number to the `random-number` output variable, adds the action's path to the runner system path (to locate the `goodbye.sh` script during execution), and runs the `goodbye.sh` script.
|
||||
|
||||
For more information about managing outputs, see "[`outputs` for a composite action](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)".
|
||||
|
||||
|
||||
@@ -271,3 +271,10 @@ jobs:
|
||||
From your repository, click the **Actions** tab, and select the latest workflow run. Under **Jobs** or in the visualization graph, click **A job to say hello**. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log.
|
||||
|
||||

|
||||
|
||||
## Template repositories for creating JavaScript actions
|
||||
|
||||
{% data variables.product.prodname_dotcom %} provides template repositories for creating JavaScript and TypeScript actions. You can use these templates to quickly get started with creating a new action that includes tests, linting, and other recommended practices.
|
||||
|
||||
* [`javascript-action` template repository](https://github.com/actions/javascript-action)
|
||||
* [`typescript-action` template repository](https://github.com/actions/typescript-action)
|
||||
|
||||
@@ -283,6 +283,12 @@ After this setting is applied, the JWT will contain the updated `iss` value. In
|
||||
|
||||
To help improve security, compliance, and standardization, you can customize the standard claims to suit your required access conditions. If your cloud provider supports conditions on subject claims, you can create a condition that checks whether the `sub` value matches the path of the reusable workflow, such as `"job_workflow_ref: "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main""`. The exact format will vary depending on your cloud provider's OIDC configuration. To configure the matching condition on {% data variables.product.prodname_dotcom %}, you can can use the REST API to require that the `sub` claim must always include a specific custom claim, such as `job_workflow_ref`. You can use the [OIDC REST API](/rest/actions/oidc) to apply a customization template for the OIDC subject claim; for example, you can require that the `sub` claim within the OIDC token must always include a specific custom claim, such as `job_workflow_ref`.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: When the organization template is applied, it will not affect any workflows in existing repositories that already use OIDC. For existing repositories, as well as any new repositories that are created after the template has been applied, the repository owner will need to opt-in to receive this configuration, or alternatively could apply a different configuration specific to the repo. For more information, see "[Set the customization template for an OIDC subject claim for a repository](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Customizing the claims results in a new format for the entire `sub` claim, which replaces the default predefined `sub` format in the token described in "[Example subject claims](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#example-subject-claims)."
|
||||
|
||||
The following example templates demonstrate various ways to customize the subject claim. To configure these settings on {% data variables.product.prodname_dotcom %}, admins use the REST API to specify a list of claims that must be included in the subject (`sub`) claim.
|
||||
@@ -291,12 +297,6 @@ The following example templates demonstrate various ways to customize the subjec
|
||||
|
||||
To customize your subject claims, you should first create a matching condition in your cloud provider's OIDC configuration, before customizing the configuration using the REST API. Once the configuration is completed, each time a new job runs, the OIDC token generated during that job will follow the new customization template. If the matching condition doesn't exist in the cloud provider's OIDC configuration before the job runs, the generated token might not be accepted by the cloud provider, since the cloud conditions may not be synchronized.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: When the organization template is applied, it will not affect any action workflows in existing repositories that already use OIDC. For existing repositories, as well as any new repositories that are created after the template has been applied, the repository owner will need to opt-in to receive this configuration, or alternatively could apply a different configuration specific to the repo. For more information, see "[Set the customization template for an OIDC subject claim for a repository](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### Example: Allowing repository based on visibility and owner
|
||||
|
||||
This example template allows the `sub` claim to have a new format, using `repository_owner` and `repository_visibility`:
|
||||
@@ -431,7 +431,9 @@ In your cloud provider's OIDC configuration, configure the `sub` condition to re
|
||||
|
||||
#### Using the default subject claims
|
||||
|
||||
For repositories that can receive a subject claim policy from their organization, the repository owner can later choose to opt-out and instead use the default `sub` claim format. To configure this, the repository admin must use the REST API endpoint at "[Set the customization template for an OIDC subject claim for a repository](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository)" with the following request body:
|
||||
For repositories that can receive a subject claim policy from their organization, the repository owner can later choose to opt-out and instead use the default `sub` claim format. This means that the repository will not use the organization's customized template.
|
||||
|
||||
To configure the repository to use the default `sub` claim format, a repository admin must use the REST API endpoint at "[Set the customization template for an OIDC subject claim for a repository](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository)" with the following request body:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -439,6 +441,18 @@ For repositories that can receive a subject claim policy from their organization
|
||||
}
|
||||
```
|
||||
|
||||
#### Example: Configuring a repository to use an organization template
|
||||
|
||||
A repository administrator can configure their repository to use the template created by the administrator of their organisation.
|
||||
|
||||
To configure the repository to use the organization's template, a repository admin must use the REST API endpoint at "[Set the customization template for an OIDC subject claim for a repository](/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository)" with the following request body:
|
||||
|
||||
```json
|
||||
{
|
||||
"use_default": false
|
||||
}
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Updating your workflows for OIDC
|
||||
|
||||
@@ -96,9 +96,9 @@ Both {% data variables.product.prodname_actions %} and Jenkins let you use a mat
|
||||
|
||||
Jenkins groups `steps` together in `stages`. Each of these steps can be a script, function, or command, among others. Similarly, {% data variables.product.prodname_actions %} uses `jobs` to execute specific groups of `steps`.
|
||||
|
||||
| Jenkins steps | {% data variables.product.prodname_actions %} |
|
||||
| Jenkins | {% data variables.product.prodname_actions %} |
|
||||
| ------------- | ------------- |
|
||||
| [`script`](https://jenkins.io/doc/book/pipeline/syntax/#script) | [`jobs.<job_id>.steps`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsteps) |
|
||||
| [`steps`](https://jenkins.io/doc/book/pipeline/syntax/#steps) | [`jobs.<job_id>.steps`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsteps) |
|
||||
|
||||
## Examples of common tasks
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ A unique identifier for the step. You can use the `id` to reference the step in
|
||||
|
||||
### `jobs.<job_id>.steps[*].if`
|
||||
|
||||
You can use the `if` conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.
|
||||
You can use the `if` conditional to prevent a step from running unless a condition is met. {% data reusables.actions.if-supported-contexts %}
|
||||
|
||||
{% data reusables.actions.expression-syntax-if %} For more information, see "[Expressions](/actions/learn-github-actions/expressions)."
|
||||
|
||||
|
||||
@@ -23,29 +23,36 @@ Subdomain isolation mitigates cross-site scripting and other related vulnerabili
|
||||
|
||||
When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains. After enabling subdomain isolation, attempts to access the previous paths for some user-supplied content, such as `http(s)://HOSTNAME/raw/`, may return `404` errors.
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.3-7-new-subdomains %}
|
||||
|
||||
| Path without subdomain isolation | Path with subdomain isolation |
|
||||
| --- | --- |
|
||||
| `http(s)://HOSTNAME/assets/` | `http(s)://assets.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/avatars/` | `http(s)://avatars.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/codeload/` | `http(s)://codeload.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/gist/` | `http(s)://gist.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/media/` | `http(s)://media.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/pages/` | `http(s)://pages.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/raw/` | `http(s)://raw.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/` | `http(s)://docker.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/_registry/npm/` | `https://npm.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/_registry/rubygems/` | `https://rubygems.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/_registry/maven/` | `https://maven.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/_registry/nuget/` | `https://nuget.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/assets/` | `http(s)://assets.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/avatars/` | `http(s)://avatars.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/codeload/` | `http(s)://codeload.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/gist/` | `http(s)://gist.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/media/` | `http(s)://media.HOSTNAME/` |
|
||||
{%- ifversion viewscreen-and-notebooks %}
|
||||
| `http(s)://HOSTNAME/viewscreen/` | `http(s)://viewscreen.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/notebooks/` | `http(s)://notebooks.HOSTNAME/` |
|
||||
{%- else %}
|
||||
| `http(s)://HOSTNAME/render/` | `http(s)://render.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/notebooks/` | `http(s)://notebooks.HOSTNAME/` |
|
||||
{%- endif %}
|
||||
| `http(s)://HOSTNAME/pages/` | `http(s)://pages.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/raw/` | `http(s)://raw.HOSTNAME/` |
|
||||
{%- ifversion ghes < 3.7 %}
|
||||
| `http(s)://HOSTNAME/render/` | `http(s)://render.HOSTNAME/` |
|
||||
{%- endif %}
|
||||
| `http(s)://HOSTNAME/reply/` | `http(s)://reply.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/uploads/` | `http(s)://uploads.HOSTNAME/` |
|
||||
{%- ifversion viewscreen-and-notebooks %}
|
||||
| `http(s)://HOSTNAME/viewscreen/` | `http(s)://viewscreen.HOSTNAME/` |
|
||||
{%- endif %}
|
||||
{%- ifversion ghes > 3.4 %}
|
||||
| Not supported | `https://containers.HOSTNAME/` |
|
||||
{%- endif %}
|
||||
| `http(s)://HOSTNAME/reply/` | `http(s)://reply.HOSTNAME/` |
|
||||
| `http(s)://HOSTNAME/uploads/` | `http(s)://uploads.HOSTNAME/` | {% ifversion ghes %}
|
||||
| `https://HOSTNAME/` | `http(s)://docker.HOSTNAME/`{% endif %}{% ifversion ghes %}
|
||||
| `https://HOSTNAME/_registry/npm/` | `https://npm.HOSTNAME/`
|
||||
| `https://HOSTNAME/_registry/rubygems/` | `https://rubygems.HOSTNAME/`
|
||||
| `https://HOSTNAME/_registry/maven/` | `https://maven.HOSTNAME/`
|
||||
| `https://HOSTNAME/_registry/nuget/` | `https://nuget.HOSTNAME/`{% endif %}{% ifversion ghes > 3.4 %}
|
||||
| Not supported | `https://containers.HOSTNAME/` |{% endif %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ redirect_from:
|
||||
- /admin/github-actions/enabling-github-actions-with-amazon-s3-storage
|
||||
shortTitle: Amazon S3 storage
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-storage-about %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -14,6 +14,9 @@ redirect_from:
|
||||
- /admin/github-actions/enabling-github-actions-with-azure-blob-storage
|
||||
shortTitle: Azure Blob storage
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-storage-about %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps:
|
||||
|
||||
@@ -19,6 +19,8 @@ shortTitle: Google Cloud Storage
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.actions.enterprise-storage-about %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps:
|
||||
|
||||
@@ -16,6 +16,8 @@ redirect_from:
|
||||
shortTitle: MinIO storage
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-storage-about %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps:
|
||||
|
||||
@@ -122,7 +122,9 @@ Optionally, you can limit resource consumption on {% data variables.location.pro
|
||||
|
||||
To enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}, you must have access to external blob storage.
|
||||
|
||||
{% data variables.product.prodname_actions %} uses blob storage to store data generated by workflow runs, such as workflow logs{% ifversion actions-caching %}, caches,{% endif %} and user-uploaded build artifacts. The amount of storage required depends on your usage of {% data variables.product.prodname_actions %}. Only a single external storage configuration is supported, and you can't use multiple storage providers at the same time.
|
||||
{% data reusables.actions.enterprise-storage-contents %} The amount of storage required depends on your usage of {% data variables.product.prodname_actions %}. Only a single external storage configuration is supported, and you can't use multiple storage providers at the same time.
|
||||
|
||||
All other {% data variables.product.prodname_actions %} data, such as the workflow files in a repository's file structure, are stored on the data storage volume for {% data variables.location.product_location %}.
|
||||
|
||||
{% data variables.product.prodname_actions %} supports these storage providers:
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ To discover how a member was added to an organization, you can filter the member
|
||||
* {% data reusables.enterprise-accounts.emu-forks %}
|
||||
* Only private and internal repositories can be created in organizations owned by an {% data variables.enterprise.prodname_emu_enterprise %}, depending on organization and enterprise repository visibility settings.
|
||||
* {% data variables.enterprise.prodname_managed_users_caps %} are limited in their use of {% data variables.product.prodname_pages %}. For more information, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)."
|
||||
* {% data reusables.copilot.emus-cannot-use-copilot %}
|
||||
|
||||
## Getting started with {% data variables.product.prodname_emus %}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ topics:
|
||||
|
||||
Developers can store and version control your source code in repositories, using issues and projects to plan and track their work. They can code in a cloud-hosted development environment, {% data variables.product.prodname_github_codespaces %}, then review each other's code changes with pull requests, using code security features to keep secrets and vulnerabilities out of your codebase. Finally, you can automate your build, test, and deployment pipeline with {% data variables.product.prodname_actions %} and host software packages with {% data variables.product.prodname_registry %}.
|
||||
|
||||
When businesses adopt {% data variables.product.prodname_enterprise %}, their return on investment (ROI) is high. For example, their developers save 45 minutes per day, and onboarding and training time is reduced by 40%. For more information, see [The Total Economic Impact of {% data variables.product.prodname_enterprise %}](https://resources.github.com/downloads/TEI-of-GitHub-Enterprise.pdf).
|
||||
When businesses adopt {% data variables.product.prodname_enterprise %}, their return on investment (ROI) is high. For example, their developers save 45 minutes per day, and onboarding and training time is reduced by 40%. For more information, see [The Total Economic Impact of {% data variables.product.prodname_enterprise %}](https://resources.github.com/forrester/).
|
||||
|
||||
To simplify administration for all the stages in the software development lifecycle, we provide a single point of visibility and management called an enterprise account. Enterprise accounts enable you to manage billing and settings, enforce policy, and audit the people with access to your enterprise's resources. For more information, see "[About enterprise accounts](/admin/overview/about-enterprise-accounts)."
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
title: Enforcing policies for GitHub Copilot in your enterprise
|
||||
intro: 'You can enforce policies for {% data variables.product.prodname_copilot_for_business %} within your enterprise''s organizations, or allow policies to be set in each organization.'
|
||||
permissions: Enterprise owners can enforce policies for {% data variables.product.prodname_copilot_for_business %} in an enterprise.
|
||||
product: '{% data reusables.gated-features.copilot-billing %}'
|
||||
versions:
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Copilot
|
||||
- Enterprise
|
||||
- Organizations
|
||||
- Policies
|
||||
shortTitle: GitHub Copilot policies
|
||||
---
|
||||
|
||||
## About policies for {% data variables.product.prodname_copilot %} in your enterprise
|
||||
|
||||
{% data reusables.copilot.about-copilot %}
|
||||
|
||||
You can enforce policies for {% data variables.product.prodname_copilot_for_business %} within your enterprise's organizations, or allow policies to be set in each organization.
|
||||
|
||||
If you set up a subscription for {% data variables.product.prodname_copilot_for_business %}, you can grant and revoke access to {% data variables.product.prodname_copilot %} for organizations within your enterprise. Once you grant an organization access to {% data variables.product.prodname_copilot %}, the admins of that organization can grant access to individuals and teams. For more information, see "[Configuring {% data variables.product.prodname_copilot %} settings in your organization](/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)."
|
||||
|
||||
{% data variables.product.prodname_copilot_for_business %} subscriptions are billed monthly, based on the number of {% data variables.product.prodname_copilot %} seats assigned to users within your enterprise. For more information, see "[{% data variables.product.prodname_copilot %} pricing for {% data variables.product.prodname_ghe_cloud %}](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#github-copilot-pricing-for-github-enterprise-cloud)."
|
||||
|
||||
{% data variables.product.prodname_copilot %} includes a filter which detects code suggestions matching public code on {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_copilot_for_business %} lets you choose whether to enable or disable the filter at the enterprise-level, or allow organization admins to decide at the organization-level. When the filter is enabled, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match or near match, the suggestion will not be shown.
|
||||
|
||||
## Enforcing a policy to manage the use of {% data variables.product.prodname_copilot_for_business %} in your enterprise
|
||||
|
||||
{% data reusables.enterprise-accounts.policies-tab %}
|
||||
{% data reusables.enterprise-accounts.copilot-tab %}
|
||||
1. Under "Manage organization access to {% data variables.product.prodname_copilot %}," configure the access for your {% data variables.product.prodname_copilot %} subscription.
|
||||
- To disable {% data variables.product.prodname_copilot %} for all organizations in your enterprise, select **Disabled**.
|
||||
- To enable {% data variables.product.prodname_copilot %} for all organizations in your enterprise, both current and future, select **Allow for all organizations**.
|
||||
- To enable {% data variables.product.prodname_copilot %} for specific organizations, select **Allow for specific organizations**.
|
||||
|
||||

|
||||
|
||||
1. If you selected **Allow for specific organizations**, select the organizations you want to enable {% data variables.product.prodname_copilot %} for. Alternatively, you can select the organizations you want to disable {% data variables.product.prodname_copilot %} access for.
|
||||
- Click **Set organization permissions** and select **Enable** or **Disable** to grant or deny {% data variables.product.prodname_copilot %} access for the specified organizations.
|
||||
|
||||

|
||||
|
||||
1. Click **Save changes**.
|
||||
|
||||

|
||||
|
||||
## Enforcing a policy to manage the use of {% data variables.product.prodname_copilot %} suggestions that match public code in your enterprise
|
||||
|
||||
{% data reusables.enterprise-accounts.policies-tab %}
|
||||
{% data reusables.enterprise-accounts.copilot-tab %}
|
||||
1. Under "Suggestions matching public code," click the dropdown menu and select the policy you want to enforce.
|
||||
- To allow {% data variables.product.prodname_copilot %} suggestions matching public code, select **Allowed**.
|
||||
- To block {% data variables.product.prodname_copilot %} suggestions matching public code, select **Blocked**.
|
||||
- To allow each of your organizations to set their own policy on the use of {% data variables.product.prodname_copilot %} suggestions matching public code, select **No policy (let each organization decide)**.
|
||||
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[{% data variables.product.prodname_copilot_for_business %} Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"
|
||||
@@ -56,7 +56,7 @@ You can enforce policies to control how members of your enterprise on {% data va
|
||||
|
||||
Each time someone creates a new repository within your enterprise, that person must choose a visibility for the repository. When you configure a default visibility setting for the enterprise, you choose which visibility is selected by default. For more information on repository visibility, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)."
|
||||
|
||||
If an enterprise owner disallows members from creating certain types of repositories, members will not be able to create that type of repository even if the visibility setting defaults to that type. For more information, see "[Setting a policy for repository creation](#setting-a-policy-for-repository-creation)."
|
||||
If an enterprise owner disallows members from creating certain types of repositories, members will not be able to create that type of repository even if the visibility setting defaults to that type. For more information, see "[Enforcing a policy for repository creation](#enforcing-a-policy-for-repository-creation)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% ifversion ghes or ghae %}
|
||||
@@ -166,7 +166,7 @@ Across all organizations owned by your enterprise, you can set the default branc
|
||||
|
||||
Across all organizations owned by your enterprise, you can allow members with admin access to change a repository's visibility, restrict repository visibility changes to organization owners, or allow owners to administer the setting on the organization level. When you prevent members from changing repository visibility, only enterprise owners can change the visibility of a repository.
|
||||
|
||||
If an enterprise owner has restricted repository creation to organization owners only, then members will not be able to change repository visibility. If an enterprise owner has restricted member repository creation to private repositories only, then members will only be able to change the visibility of a repository to private. For more information, see "[Setting a policy for repository creation](#setting-a-policy-for-repository-creation)."
|
||||
If an enterprise owner has restricted repository creation to organization owners only, then members will not be able to change repository visibility. If an enterprise owner has restricted member repository creation to private repositories only, then members will only be able to change the visibility of a repository to private. For more information, see "[Enforcing a policy for repository creation](#enforcing-a-policy-for-repository-creation)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.policies-tab %}
|
||||
|
||||
@@ -21,6 +21,7 @@ children:
|
||||
- /enforcing-policies-for-security-settings-in-your-enterprise
|
||||
- /enforcing-policies-for-dependency-insights-in-your-enterprise
|
||||
- /enforcing-policies-for-github-actions-in-your-enterprise
|
||||
- /enforcing-policies-for-github-copilot-in-your-enterprise
|
||||
- /enforcing-policies-for-code-security-and-analysis-for-your-enterprise
|
||||
- /enforcing-policies-for-personal-access-tokens-in-your-enterprise
|
||||
shortTitle: Enforce policies
|
||||
|
||||
@@ -67,7 +67,9 @@ The storage used by a repository is the total storage used by {% data variables.
|
||||
### Per-minute rates
|
||||
|
||||
{% data reusables.billing.billing-standard-runners %}
|
||||
{%- ifversion actions-hosted-runners %}{% data reusables.billing.billing-hosted-runners %}{%- endif %}
|
||||
{%- ifversion actions-hosted-runners %}
|
||||
{% data reusables.billing.billing-hosted-runners %}
|
||||
{%- endif %}
|
||||
|
||||
- The number of jobs you can run concurrently across all repositories in your user or organization account depends on your GitHub plan. For more information, see "[Usage limits and billing](/actions/reference/usage-limits-billing-and-administration)" for {% data variables.product.prodname_dotcom %}-hosted runners and "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners/#usage-limits)" for self-hosted runner usage limits.
|
||||
- {% data reusables.user-settings.context_switcher %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: About billing for GitHub Copilot
|
||||
intro: 'If you want to use {% data variables.product.prodname_copilot %}, you need a subscription for your {% data variables.product.prodname_dotcom %} account.'
|
||||
intro: 'If you want to use {% data variables.product.prodname_copilot %}, you either need a subscription for {% data variables.product.prodname_copilot_for_individuals %} in your personal account, or you need to be assigned a seat by an organization on {% data variables.product.prodname_ghe_cloud %} with a subscription for {% data variables.product.prodname_copilot_for_business %}.'
|
||||
product: '{% data reusables.gated-features.copilot-billing %}'
|
||||
versions:
|
||||
feature: copilot
|
||||
@@ -10,12 +10,30 @@ shortTitle: Billing for GitHub Copilot
|
||||
---
|
||||
## About billing for {% data variables.product.prodname_copilot %}
|
||||
|
||||
If you want to use {% data variables.product.prodname_copilot %}, you will need a subscription for your {% data variables.product.prodname_dotcom %} personal account. For more information about {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/en/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
If you want to use {% data variables.product.prodname_copilot %}, you will need a subscription for your {% data variables.product.prodname_dotcom %} personal account, or if you are a member of a {% data variables.product.prodname_ghe_cloud %} organization with a {% data variables.product.prodname_copilot_business_short %} subscription, you will need to be assigned a seat by an organization admin. For more information about {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/en/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
|
||||
Before starting a paid subscription, you can set up a one-time 60-day trial to evaluate {% data variables.product.prodname_copilot %}. To begin a trial, you will need to choose a monthly or yearly billing cycle, and provide a payment method. If you do not cancel the trial before the end of the 60 days, the trial will automatically convert to a paid subscription. You can cancel your {% data variables.product.prodname_copilot %} trial at any time during the 60 days and you won't be charged. If you cancel before the end of the trial, you will continue to have access to {% data variables.product.prodname_copilot %} until the 60-day trial period ends. For more information, see "[Managing your GitHub Copilot subscription](/en/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription)."
|
||||
For more information about managing {% data variables.product.prodname_copilot %} through {% data variables.product.prodname_ghe_cloud %}, see "[Enforcing policies for {% data variables.product.prodname_copilot %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise){% ifversion ghec %}.{% endif %}"{% ifversion fpt %} in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %}
|
||||
|
||||
Before starting a paid subscription for a personal account, you can set up a one-time 60-day trial to evaluate {% data variables.product.prodname_copilot %}. To begin a trial, you will need to choose a monthly or yearly billing cycle, and provide a payment method. If you do not cancel the trial before the end of the 60 days, the trial will automatically convert to a paid subscription. You can cancel your {% data variables.product.prodname_copilot %} trial at any time during the 60 days and you won't be charged. If you cancel before the end of the trial, you will continue to have access to {% data variables.product.prodname_copilot %} until the 60-day trial period ends. For more information, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/en/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription)."
|
||||
|
||||
## Pricing for {% data variables.product.prodname_copilot_for_individuals %}
|
||||
|
||||
## {% data variables.product.prodname_copilot %} pricing
|
||||
|
||||
The {% data variables.product.prodname_copilot %} subscription is available on a monthly or yearly cycle. If you choose a monthly billing cycle, you will be billed $10 per calendar month. If you choose a yearly billing cycle, you will be billed $100 per year. You can modify your billing cycle at any time, and the modification will be reflected from the start of your next billing cycle.
|
||||
|
||||
If you have an active {% data variables.product.prodname_copilot %} subscription, and are then assigned a seat as part of a {% data variables.product.prodname_copilot_for_business %} subscription in {% data variables.product.prodname_ghe_cloud %}, your personal {% data variables.product.prodname_copilot %} subscription will be automatically canceled. You will receive a prorated refund for any remaining portion of your personal subscription's current billing cycle. You will then be able to continue using {% data variables.product.prodname_copilot %} according to the policies set at the enterprise or organization level.
|
||||
|
||||
A free subscription for {% data variables.product.prodname_copilot %} is available to verified students, teachers, and maintainers of popular open-source repositories on {% data variables.product.company_short %}. If you meet the criteria as an open source maintainer, you will be automatically notified when you visit the {% data variables.product.prodname_copilot %} subscription page. As a student, if you currently receive the {% data variables.product.prodname_student_pack %}, you will also be offered a free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page. For more information about the {% data variables.product.prodname_student_pack %}, see "[Apply to {% data variables.product.prodname_global_campus %} as a student](/free-pro-team@latest/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/apply-to-github-global-campus-as-a-student)."
|
||||
|
||||
{% ifversion ghec %}
|
||||
## Pricing for {% data variables.product.prodname_copilot_for_business %}
|
||||
|
||||
The {% data variables.product.prodname_copilot_for_business %} subscription is available on a monthly cycle, and is billed at $19 per user per month. Billing for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} is processed at the end of each billing cycle.
|
||||
|
||||
Billed users are calculated based on the number of {% data variables.product.prodname_copilot %} seats assigned at the beginning of a billing cycle, or assigned during the billing cycle. Any seat assigned part way through the billing cycle will be prorated based on the number of days remaining in the cycle. Any seat assignment removed during a billing cycle will take effect from the beginning of the next cycle.
|
||||
|
||||
Seat assignment for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} is managed by admins of organizations which have been granted access to {% data variables.product.prodname_copilot %} at the enterprise level. If you are a member of multiple organizations under the same enterprise, you can be assigned {% data variables.product.prodname_copilot %} seats in more than one organization, but your enterprise will only be billed once. For more information, see "[Configuring {% data variables.product.prodname_copilot %} settings in your organization](/enterprise-cloud@latest/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)."
|
||||
|
||||
Policy settings and the usage overview for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} are available at the enterprise level. For more information, see "[Enforcing policies for {% data variables.product.prodname_copilot %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise)" and "[Viewing your {% data variables.product.prodname_copilot %} usage](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage)."
|
||||
|
||||
{% endif %}
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
title: Managing billing for GitHub Copilot
|
||||
shortTitle: GitHub Copilot
|
||||
intro: 'You can try {% data variables.product.prodname_copilot %} with a free trial before starting your subscription, and modify or cancel your subscription at any time.'
|
||||
intro: 'You can try {% data variables.product.prodname_copilot_for_individuals %} with a free trial before starting your subscription, and modify or cancel your subscription at any time. You can also view your usage of {% data variables.product.prodname_copilot_for_business %}, and learn about how the costs are calculated.'
|
||||
versions:
|
||||
feature: copilot
|
||||
children:
|
||||
- /about-billing-for-github-copilot
|
||||
- /managing-your-github-copilot-subscription
|
||||
- /managing-your-github-copilot-for-individuals-subscription
|
||||
- /viewing-your-github-copilot-usage
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
---
|
||||
title: Managing your GitHub Copilot subscription
|
||||
intro: 'Set up your {% data variables.product.prodname_copilot %} trial and manage your subscription.'
|
||||
title: Managing your GitHub Copilot for Individuals subscription
|
||||
intro: 'Set up your {% data variables.product.prodname_copilot %} trial for your personal account and manage your subscription.'
|
||||
product: '{% data reusables.gated-features.copilot-billing %}'
|
||||
redirect_from:
|
||||
- /billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription
|
||||
versions:
|
||||
feature: copilot
|
||||
type: how_to
|
||||
@@ -10,7 +12,9 @@ topics:
|
||||
shortTitle: Your GitHub Copilot subscription
|
||||
---
|
||||
|
||||
## Setting up a trial of {% data variables.product.prodname_copilot %}
|
||||
## Setting up a trial of {% data variables.product.prodname_copilot %} for your personal account
|
||||
|
||||
Before you can start using {% data variables.product.prodname_copilot %}, you will need to set up a free trial or subscription.
|
||||
|
||||
{% data reusables.copilot.signup-procedure %}
|
||||
|
||||
@@ -21,7 +25,8 @@ shortTitle: Your GitHub Copilot subscription
|
||||
1. In the "{% data variables.product.prodname_copilot %}" section, select the **Edit** dropdown.
|
||||
- If you are on a monthly billing cycle, select **Change to yearly billing**.
|
||||
- If you are on a yearly billing cycle, select **Change to monthly billing**.
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
## Canceling your {% data variables.product.prodname_copilot %} subscription
|
||||
@@ -33,18 +38,19 @@ You can cancel your {% data variables.product.prodname_copilot %} subscription a
|
||||
1. In the "{% data variables.product.prodname_copilot %}" section, select the **Edit** dropdown.
|
||||
- If you have a paid subscription, click **Cancel {% data variables.product.prodname_copilot %}**.
|
||||
|
||||

|
||||

|
||||
|
||||
- If you are within your 60 day trial period, click **Cancel trial**.
|
||||

|
||||
- If you are within your 60-day trial period, click **Cancel trial**.
|
||||
|
||||

|
||||
|
||||
2. In the "Cancel {% data variables.product.prodname_copilot %}" modal, click **I understand, cancel {% data variables.product.prodname_copilot %}**
|
||||
|
||||

|
||||

|
||||
|
||||
- If you are within your 60 day trial period, click **I understand, cancel {% data variables.product.prodname_copilot %} trial**.
|
||||
- If you are within your 60-day trial period, click **I understand, cancel {% data variables.product.prodname_copilot %} trial**.
|
||||
|
||||

|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Viewing your GitHub Copilot usage
|
||||
intro: 'You can view how many users have access to {% data variables.product.prodname_copilot %} across all the organizations in your enterprise.'
|
||||
product: '{% data reusables.gated-features.copilot-billing %}'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
permissions: 'Enterprise owners can view usage for {% data variables.product.prodname_copilot %} in their enterprise.'
|
||||
versions:
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Copilot
|
||||
shortTitle: View your usage
|
||||
---
|
||||
|
||||
## About your {% data variables.product.prodname_copilot %} usage
|
||||
|
||||
You can view usage information for {% data variables.product.prodname_copilot %} in your enterprise, broken down by organization, or in your organization, broken down by seat assignment status. At the enterprise level, this information includes the number of seats assigned in each organization, and the total spending associated with each organization, for the current billing cycle. At the organization level, this information includes the total number of seats, seats carried over from the previous billing cycle, new seats added during the current cycle, and seats to be removed at the end of the current cycle.
|
||||
|
||||
If an organization admin has assigned one or more seats partway through the current billing cycle, the enterprise-level information will display a decimal number of seats. For example, if the organization started the billing cycle with 3 seats assigned, and then assigned an additional seat half way through the cycle, the seat usage information will display 3.5 seats. The "3" representing the seats assigned at the start of the cycle, and the "0.5" representing the additional seat assigned halfway through the cycle.
|
||||
|
||||
The spending information will display the total spending for each organization for the current billing cycle. The total spending for the organization for the current cycle will usually be the number of seats assigned, multiplied by the cost per seat ($19 per seat per month). However, if the same organization member is assigned a seat in multiple organizations, their seat usage will be reflected in each organization, but as the enterprise will only be charged once, their spending will only be reflected in the organization where they were first assigned a seat.
|
||||
|
||||
## Viewing your usage for {% data variables.product.prodname_copilot_for_business %}
|
||||
|
||||
### At the enterprise-level
|
||||
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.billing-tab %}
|
||||
1. Under "{% data variables.product.prodname_copilot_short %} monthly usage," view the breakdown of your {% data variables.product.prodname_copilot %} usage.
|
||||
- Under "Seat usage" you can view the total number of seats currently assigned per organization, with a decimal number representing seats assigned partway through the current billing cycle.
|
||||
- Under "Spending" you can view the total cost of {% data variables.product.prodname_copilot_for_business %} for the current billing cycle per organization.
|
||||
|
||||

|
||||
|
||||
### At the organization-level
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Access" section of the sidebar, click **{% octicon "credit-card" aria-label="The credit card icon" %} Billing and plans**.
|
||||
1. Under "{% data variables.product.prodname_copilot_short %}", view the breakdown of your {% data variables.product.prodname_copilot %} usage and upcoming changes in your organization.
|
||||
|
||||

|
||||
@@ -1,120 +0,0 @@
|
||||
---
|
||||
title: Allowing your codespace to access a private image registry
|
||||
intro: 'You can use secrets to allow {% data variables.product.prodname_github_codespaces %} to access a private image registry'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
shortTitle: Private image registry
|
||||
---
|
||||
|
||||
## About private image registries and {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
A registry is a secure space for storing, managing, and fetching private container images. You may use one to store one or more images. There are many examples of registries, such as {% data variables.product.prodname_container_registry %}, {% data variables.product.prodname_npm_registry %}, Azure Container Registry, or DockerHub.
|
||||
|
||||
{% data variables.packages.prodname_ghcr_and_npm_registry %} can be configured to allow container images to be pulled seamlessly into {% data variables.product.prodname_github_codespaces %} during codespace creation, without having to provide any authentication credentials. For other image registries, you must create secrets in {% data variables.product.prodname_dotcom %} to store the access details, which will allow {% data variables.product.prodname_github_codespaces %} to access images stored in that registry.
|
||||
|
||||
## Accessing images stored in {% data variables.packages.prodname_ghcr_and_npm_registry %}
|
||||
|
||||
{% data variables.packages.prodname_ghcr_and_npm_registry %} provide the easiest way for {% data variables.product.prodname_github_codespaces %} to consume dev container images.
|
||||
|
||||
For more information, see "[Working with the Container registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)" and "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)".
|
||||
|
||||
### Accessing an image published to the same repository as the codespace
|
||||
|
||||
If you publish a container image to {% data variables.packages.prodname_ghcr_or_npm_registry %} in the same repository that the codespace is being launched in, you will automatically be able to fetch that image on codespace creation. You won't have to provide any additional credentials, unless the **Inherit access from repo** option was unselected when the container image was published.
|
||||
|
||||
#### Inheriting access from the repository from which an image was published
|
||||
|
||||
By default, when you publish a container image to {% data variables.packages.prodname_ghcr_or_npm_registry %}, the image inherits the access setting of the repository from which the image was published. For example, if the repository is public, the image is also public. If the repository is private, the image is also private, but is accessible from the repository.
|
||||
|
||||
This behavior is controlled by the **Inherit access from repo** option. **Inherit access from repo** is selected by default when publishing via {% data variables.product.prodname_actions %}, but not when publishing directly to {% data variables.packages.prodname_ghcr_or_npm_registry %} using a {% data variables.product.pat_generic %}.
|
||||
|
||||
If the **Inherit access from repo** option was not selected when the image was published, you can manually add the repository to the published container image's access controls. For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#inheriting-access-for-a-container-image-from-a-repository)."
|
||||
|
||||
### Accessing an image published to the organization a codespace will be launched in
|
||||
|
||||
If you want a container image to be accessible to all codespaces in an organization, we recommend that you publish the container image with internal visibility. This will automatically make the image visible to all codespaces within the organization, unless the repository the codespace is launched from is public.
|
||||
|
||||
If the codespace is being launched from a public repository referencing an internal or private image, you must manually allow the public repository access to the internal container image. This prevents the internal image from being accidentally leaked publicly. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)."
|
||||
|
||||
### Accessing a private container from a subset of repositories in an organization
|
||||
|
||||
If you want to allow a subset of an organization's repositories to access a container image, or allow an internal or private image to be accessed from a codespace launched in a public repository, you can manually add repositories to a container <span class="x x-first x-last">image's</span> access settings. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)<span class="x x-first x-last">.</span>"
|
||||
|
||||
### Publishing a container image from a codespace
|
||||
|
||||
Seamless access from a codespace to {% data variables.packages.prodname_ghcr_or_npm_registry %} is limited to pulling container images. If you want to publish a container image from inside a codespace, you must use a {% data variables.product.pat_v1 %} with the `write:packages` scope.
|
||||
|
||||
We recommend publishing images via {% data variables.product.prodname_actions %}. For more information, see "[Publishing Docker images](/actions/publishing-packages/publishing-docker-images)" and "[Publishing Node.js packages](/actions/publishing-packages/publishing-nodejs-packages)."
|
||||
|
||||
## Accessing images stored in other container registries
|
||||
|
||||
If you are accessing a container image from a registry that isn't {% data variables.packages.prodname_ghcr_or_npm_registry %}, {% data variables.product.prodname_github_codespaces %} checks for the presence of three secrets, which define the server name, username, and {% data variables.product.pat_generic %} for a container registry. If these secrets are found, {% data variables.product.prodname_github_codespaces %} will make the registry available inside your codespace.
|
||||
|
||||
- `<*>_CONTAINER_REGISTRY_SERVER`
|
||||
- `<*>_CONTAINER_REGISTRY_USER`
|
||||
- `<*>_CONTAINER_REGISTRY_PASSWORD`
|
||||
|
||||
You can store secrets at the user, repository, or organization-level, allowing you to share them securely between different codespaces. When you create a set of secrets for a private image registry, you need to replace the "<*>" in the name with a consistent identifier. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)" and "[Managing encrypted secrets for your repository and organization for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)."
|
||||
|
||||
If you are setting the secrets at the user or organization level, make sure to assign those secrets to the repository you'll be creating the codespace in by choosing an access policy from the dropdown list.
|
||||
|
||||

|
||||
|
||||
### Example secrets
|
||||
|
||||
For a private image registry in Azure, you could create the following secrets:
|
||||
|
||||
```
|
||||
ACR_CONTAINER_REGISTRY_SERVER = mycompany.azurecr.io
|
||||
ACR_CONTAINER_REGISTRY_USER = acr-user-here
|
||||
ACR_CONTAINER_REGISTRY_PASSWORD = <PERSONAL_ACCESS_TOKEN>
|
||||
```
|
||||
|
||||
For information on common image registries, see "[Common image registry servers](#common-image-registry-servers)." Note that accessing AWS Elastic Container Registry (ECR) is different.
|
||||
|
||||

|
||||
|
||||
Once you've added the secrets, you may need to stop and then start the codespace you are in for the new environment variables to be passed into the container. For more information, see "[Suspending or stopping a codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)."
|
||||
|
||||
#### Accessing AWS Elastic Container Registry
|
||||
|
||||
To access AWS Elastic Container Registry (ECR), you can provide an AWS access key ID and secret key, and {% data variables.product.prodname_dotcom %} can retrieve an access token for you and log in on your behalf.
|
||||
|
||||
```
|
||||
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
|
||||
*_CONTAINER_REGISTRY_USER = <AWS_ACCESS_KEY_ID>
|
||||
*_CONTAINER_REGISTRY_PASSWORD = <AWS_SECRET_KEY>
|
||||
```
|
||||
|
||||
You must also ensure you have the appropriate AWS IAM permissions to perform the credential swap (e.g. `sts:GetServiceBearerToken`) as well as the ECR read operation (either `AmazonEC2ContainerRegistryFullAccess` or `ReadOnlyAccess`).
|
||||
|
||||
Alternatively, if you don't want GitHub to perform the credential swap on your behalf, you can provide an authorization token fetched via AWS's APIs or CLI.
|
||||
|
||||
```
|
||||
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
|
||||
*_CONTAINER_REGISTRY_USER = AWS
|
||||
*_CONTAINER_REGISTRY_PASSWORD = <TOKEN>
|
||||
```
|
||||
|
||||
Since these tokens are short lived and need to be refreshed periodically, we recommend providing an access key ID and secret.
|
||||
|
||||
While these secrets can have any name, so long as the `*_CONTAINER_REGISTRY_SERVER` is an ECR URL, we recommend using `ECR_CONTAINER_REGISTRY_*` unless you are dealing with multiple ECR registries.
|
||||
|
||||
For more information, see AWS ECR's "[Private registry authentication documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)."
|
||||
|
||||
### Common image registry servers
|
||||
|
||||
Some of the common image registry servers are listed below:
|
||||
|
||||
- [DockerHub](https://docs.docker.com/engine/reference/commandline/info/) - `https://index.docker.io/v1/`
|
||||
- [GitHub Container Registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - `ghcr.io`
|
||||
- [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) - `<registry name>.azurecr.io`
|
||||
- [AWS Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `<aws_account_id>.dkr.ecr.<region>.amazonaws.com`
|
||||
- [Google Cloud Container Registry](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US), `eu.gcr.io` (EU), `asia.gcr.io` (Asia)
|
||||
|
||||
## Debugging private image registry access
|
||||
|
||||
If you are having trouble pulling an image from a private image registry, make sure you are able to run `docker login -u <user> -p <password> <server>`, using the values of the secrets defined above. If login fails, ensure that the login credentials are valid and that you have the apprioriate permissions on the server to fetch a container image. If login succeeds, make sure that these values are copied appropriately into the right {% data variables.product.prodname_github_codespaces %} secrets, either at the user, repository, or organization level and try again.
|
||||
@@ -0,0 +1,124 @@
|
||||
---
|
||||
title: Allowing your codespace to access a private registry
|
||||
intro: 'You can allow {% data variables.product.prodname_github_codespaces %} to access container images or other packages in a private registry.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
redirect_from:
|
||||
- /codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry
|
||||
shortTitle: Access a private registry
|
||||
---
|
||||
|
||||
## About private registries and {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
A registry is a secure space for storing, managing, and fetching container images or other packages. There are many examples of registries, such as:
|
||||
- {% data variables.product.company_short %}'s {% data variables.product.prodname_container_registry %}, the Azure Container Registry, and DockerHub for container images
|
||||
- The {% data variables.product.prodname_npm_registry %} for Node.js packages.
|
||||
|
||||
Certain {% data variables.product.prodname_registry %} registries, including the {% data variables.product.prodname_container_registry %}, can be configured to allow packages to be pulled seamlessly into {% data variables.product.prodname_github_codespaces %} during codespace creation, without having to provide any authentication credentials.
|
||||
|
||||
To access other container image registries, you can create secrets in {% data variables.product.prodname_dotcom %} to store the access details, which will allow {% data variables.product.prodname_github_codespaces %} to access images stored in that registry.
|
||||
|
||||
## Accessing packages stored in registries with granular permissions
|
||||
|
||||
{% data variables.product.prodname_registry %} registries that support granular permissions, including the {% data variables.product.prodname_container_registry %}, provide the easiest way for {% data variables.product.prodname_github_codespaces %} to consume packages. For the list of {% data variables.product.prodname_registry %} registries that support granular permissions and seamless {% data variables.product.prodname_github_codespaces %} access, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."
|
||||
|
||||
### Accessing a package published to the same repository as the codespace
|
||||
|
||||
If you publish a package in the same repository that the codespace is being launched in, you will automatically be able to fetch that package on codespace creation. You won't have to provide any additional credentials, unless the **Inherit access from repo** option was unselected when the package was published.
|
||||
|
||||
#### Inheriting access from the repository from which a package was published
|
||||
|
||||
By default, the package inherits the access setting of the repository from which it was published. For example, if the repository is public, the package is also public. If the repository is private, the package is also private, but is accessible from the repository.
|
||||
|
||||
This behavior is controlled by the **Inherit access from repo** option. **Inherit access from repo** is selected by default when publishing via {% data variables.product.prodname_actions %}, but not when publishing directly to a registry using a {% data variables.product.pat_generic %}.
|
||||
|
||||
If the **Inherit access from repo** option was not selected when the package was published, you can manually add the repository to the published package's access controls. For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#inheriting-access-for-a-container-image-from-a-repository)."
|
||||
|
||||
### Accessing a package published to the organization a codespace will be launched in
|
||||
|
||||
If you want a package to be accessible to all codespaces in an organization, we recommend that you publish the package with internal visibility. This will automatically make the package visible to all codespaces within the organization, unless the repository the codespace is launched from is public.
|
||||
|
||||
If the codespace is being launched from a public repository referencing an internal or private package, you must manually allow the public repository access to the internal package. This prevents the internal package from being accidentally leaked publicly. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)."
|
||||
|
||||
### Accessing a private package from a subset of repositories in an organization
|
||||
|
||||
If you want to allow a subset of an organization's repositories to access a package, or allow an internal or private package to be accessed from a codespace launched in a public repository, you can manually add repositories to a package's access settings. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)."
|
||||
|
||||
### Publishing a package from a codespace
|
||||
|
||||
Seamless access from a codespace to a registry is limited to pulling packages. If you want to publish a package from inside a codespace, you must use a {% data variables.product.pat_v1 %} with the `write:packages` scope.
|
||||
|
||||
We recommend publishing packages via {% data variables.product.prodname_actions %}. For more information, see "[Publishing Docker images](/actions/publishing-packages/publishing-docker-images)" and "[Publishing Node.js packages](/actions/publishing-packages/publishing-nodejs-packages)."
|
||||
|
||||
## Accessing images stored in other registries
|
||||
|
||||
You can define secrets to allow {% data variables.product.prodname_github_codespaces %} to access container image registries other than {% data variables.product.company_short %}'s {% data variables.product.prodname_container_registry %}. If you are accessing a container image from a registry that doesn't support seamless access, {% data variables.product.prodname_github_codespaces %} checks for the presence of three secrets, which define the server name, username, and {% data variables.product.pat_generic %} for a registry. If these secrets are found, {% data variables.product.prodname_github_codespaces %} will make the registry available inside your codespace.
|
||||
|
||||
- `<*>_CONTAINER_REGISTRY_SERVER`
|
||||
- `<*>_CONTAINER_REGISTRY_USER`
|
||||
- `<*>_CONTAINER_REGISTRY_PASSWORD`
|
||||
|
||||
You can store secrets at the user, repository, or organization-level, allowing you to share them securely between different codespaces. When you create a set of secrets for a private image registry, you need to replace the "<*>" in the name with a consistent identifier. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)" and "[Managing encrypted secrets for your repository and organization for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)."
|
||||
|
||||
If you are setting the secrets at the user or organization level, make sure to assign those secrets to the repository you'll be creating the codespace in by choosing an access policy from the dropdown list.
|
||||
|
||||

|
||||
|
||||
### Example secrets
|
||||
|
||||
For a private image registry in Azure, you could create the following secrets:
|
||||
|
||||
```
|
||||
ACR_CONTAINER_REGISTRY_SERVER = mycompany.azurecr.io
|
||||
ACR_CONTAINER_REGISTRY_USER = acr-user-here
|
||||
ACR_CONTAINER_REGISTRY_PASSWORD = <PERSONAL_ACCESS_TOKEN>
|
||||
```
|
||||
|
||||
For information on common image registries, see "[Common image registry servers](#common-image-registry-servers)." Note that accessing AWS Elastic Container Registry (ECR) is different.
|
||||
|
||||

|
||||
|
||||
Once you've added the secrets, you may need to stop and then start the codespace you are in for the new environment variables to be passed into the container. For more information, see "[Suspending or stopping a codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)."
|
||||
|
||||
#### Accessing AWS Elastic Container Registry
|
||||
|
||||
To access AWS Elastic Container Registry (ECR), you can provide an AWS access key ID and secret key, and {% data variables.product.prodname_dotcom %} can retrieve an access token for you and log in on your behalf.
|
||||
|
||||
```
|
||||
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
|
||||
*_CONTAINER_REGISTRY_USER = <AWS_ACCESS_KEY_ID>
|
||||
*_CONTAINER_REGISTRY_PASSWORD = <AWS_SECRET_KEY>
|
||||
```
|
||||
|
||||
You must also ensure you have the appropriate AWS IAM permissions to perform the credential swap (e.g. `sts:GetServiceBearerToken`) as well as the ECR read operation (either `AmazonEC2ContainerRegistryFullAccess` or `ReadOnlyAccess`).
|
||||
|
||||
Alternatively, if you don't want GitHub to perform the credential swap on your behalf, you can provide an authorization token fetched via AWS's APIs or CLI.
|
||||
|
||||
```
|
||||
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
|
||||
*_CONTAINER_REGISTRY_USER = AWS
|
||||
*_CONTAINER_REGISTRY_PASSWORD = <TOKEN>
|
||||
```
|
||||
|
||||
Since these tokens are short lived and need to be refreshed periodically, we recommend providing an access key ID and secret.
|
||||
|
||||
While these secrets can have any name, so long as the `*_CONTAINER_REGISTRY_SERVER` is an ECR URL, we recommend using `ECR_CONTAINER_REGISTRY_*` unless you are dealing with multiple ECR registries.
|
||||
|
||||
For more information, see AWS ECR's "[Private registry authentication documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)."
|
||||
|
||||
### Common image registry servers
|
||||
|
||||
Some of the common image registry servers are listed below:
|
||||
|
||||
- [DockerHub](https://docs.docker.com/engine/reference/commandline/info/) - `https://index.docker.io/v1/`
|
||||
- [GitHub Container Registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - `ghcr.io`
|
||||
- [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) - `<registry name>.azurecr.io`
|
||||
- [AWS Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `<aws_account_id>.dkr.ecr.<region>.amazonaws.com`
|
||||
- [Google Cloud Container Registry](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US), `eu.gcr.io` (EU), `asia.gcr.io` (Asia)
|
||||
|
||||
## Debugging private image registry access
|
||||
|
||||
If you are having trouble pulling an image from a private image registry, make sure you are able to run `docker login -u <user> -p <password> <server>`, using the values of the secrets defined above. If login fails, ensure that the login credentials are valid and that you have the appropriate permissions on the server to fetch a container image. If login succeeds, make sure that these values are copied appropriately into the right {% data variables.product.prodname_github_codespaces %} secrets, either at the user, repository, or organization level and try again.
|
||||
@@ -5,7 +5,7 @@ versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /allowing-your-codespace-to-access-a-private-image-registry
|
||||
- /allowing-your-codespace-to-access-a-private-registry
|
||||
- /using-github-copilot-in-github-codespaces
|
||||
- /using-the-github-codespaces-plugin-for-jetbrains
|
||||
- /using-the-vs-code-command-palette-in-codespaces
|
||||
|
||||
@@ -26,7 +26,7 @@ You can add encrypted secrets to your personal account that you want to use in y
|
||||
- Access tokens to cloud services
|
||||
- Service principals
|
||||
- Subscription identifiers
|
||||
- [Credentials for a private image registry](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry)
|
||||
- Credentials for a private image registry (for more information, see "[Allowing your codespace to access a private registry](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry)")
|
||||
|
||||
You can choose which repositories should have access to each secret. Then, you can use the secret in any codespace you create for a repository that has access to the secret. To share a secret with a codespace created from a template, you will need to publish the codespace to a repository on {% data variables.product.prodname_dotcom %}, then give that repository access to the secret.
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ You can create defaults in your organization{% ifversion fpt or ghes or ghec %}
|
||||
Community health file | Description
|
||||
--- | ---{% ifversion fpt or ghec %}
|
||||
*CODE_OF_CONDUCT.md* | A CODE_OF_CONDUCT file defines standards for how to engage in a community. For more information, see "[Adding a code of conduct to your project](/articles/adding-a-code-of-conduct-to-your-project/)."{% endif %}
|
||||
*CONTRIBUTING.md* | A CONTRIBUTING file communicates how people should contribute to your project. For more information, see "[Setting guidelines for repository contributors](/articles/setting-guidelines-for-repository-contributors/)."{% ifversion fpt or ghec %}
|
||||
*CONTRIBUTING.md* | A CONTRIBUTING file communicates how people should contribute to your project. For more information, see "[Setting guidelines for repository contributors](/articles/setting-guidelines-for-repository-contributors/)."{% ifversion discussion-category-forms %}
|
||||
Discussion category forms | Discussion category forms customize the templates that are available for community members to use when they open new discussions in your repository. For more information, see "[Creating discussion category forms](/discussions/managing-discussions-for-your-community/creating-discussion-category-forms)."{% endif %}{% ifversion fpt or ghec %}
|
||||
*FUNDING.yml* | A FUNDING file displays a sponsor button in your repository to increase the visibility of funding options for your open source project. For more information, see "[Displaying a sponsor button in your repository](/articles/displaying-a-sponsor-button-in-your-repository)."{% endif %}
|
||||
Issue and pull request templates{% ifversion fpt or ghes or ghec %} and *config.yml*{% endif %} | Issue and pull request templates customize and standardize the information you'd like contributors to include when they open issues and pull requests in your repository. For more information, see "[About issue and pull request templates](/articles/about-issue-and-pull-request-templates/)."{% ifversion fpt or ghes or ghec %}
|
||||
*SECURITY.md* | A SECURITY file gives instructions for how to report a security vulnerability in your project. For more information, see "[Adding a security policy to your repository](/code-security/getting-started/adding-a-security-policy-to-your-repository)."{% endif %}
|
||||
|
||||
@@ -11,7 +11,9 @@ shortTitle: JetBrains
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} in JetBrains IDEs
|
||||
|
||||
If you use a Jetbrains IDE, {% data variables.product.prodname_copilot %} can autocomplete code as you type. After installation, you can enable or disable {% data variables.product.prodname_copilot %}, and you can configure advanced settings within your IDE or on {% data variables.product.prodname_dotcom_the_website %}.
|
||||
If you use a Jetbrains IDE, {% data variables.product.prodname_copilot %} can autocomplete code as you type. After installation, you can enable or disable {% data variables.product.prodname_copilot %}, and you can configure advanced settings within your IDE or on {% data variables.product.prodname_dotcom_the_website %}. This article describes how to configure {% data variables.product.prodname_copilot %} in the IntelliJ IDE, but the user interfaces of other Jetbrains IDEs may differ.
|
||||
|
||||
{% data reusables.copilot.dotcom-settings %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -78,6 +80,21 @@ You can manage advanced settings for {% data variables.product.prodname_copilot
|
||||
1. Edit the settings according to your personal preferences.
|
||||
- To adjust the behaviour and appearance of code suggestions, and whether to automatically check for updates, select or deselect the corresponding checkboxes.
|
||||
- If you have selected to receive automatic updates, you can choose whether to receive stable, but less frequent updates, or nightly updates, which may be less stable. Click the **Update channel** dropdown and select **Stable** for stable updates, or **Nightly** for nightly updates.
|
||||
- Under "Disabled languages", use the checkboxes to select or deselect the languages you want to disable {% data variables.product.prodname_copilot %} for.
|
||||
- Under "Disabled languages," use the checkboxes to select or deselect the languages you want to disable {% data variables.product.prodname_copilot %} for.
|
||||
|
||||
## Configuring proxy settings for {% data variables.product.prodname_copilot %}
|
||||
|
||||
You can configure {% data variables.product.prodname_copilot %} to connect through an HTTP proxy server in a Jetbrains IDE. {% data variables.product.prodname_copilot %} supports basic HTTP proxy setups, with or without basic authentication.
|
||||
|
||||
1. In your JetBrains IDE, click the **File** menu, then click **Settings**.
|
||||
1. Under **Appearance & Behavior**, click **System Settings** and then click **HTTP Proxy**.
|
||||
1. Select the **Manual proxy configuration** checkbox, and then select the **HTTP** checkbox.
|
||||
1. In the "Host name" field, enter the hostname of your proxy server, and in the "Port number" field, enter the port number of your proxy server.
|
||||
|
||||

|
||||
|
||||
1. Optionally, in the left sidebar, click **Tools** and then click **Server Certificates**. Then select or deselect the "Accept non-trusted certificates automatically" checkbox, depending on whether you want to accept non-trusted certificates automatically.
|
||||
|
||||

|
||||
|
||||
{% data reusables.copilot.dotcom-settings %}
|
||||
|
||||
@@ -83,17 +83,16 @@ If you don't want to use the default keyboard shortcuts in {% data variables.pro
|
||||
|
||||
You can choose to enable or disable inline suggestions for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}.
|
||||
|
||||
1. In the **File** menu, navigate to **Preferences** and click **Settings**.
|
||||

|
||||
1. In the left-side panel of the settings tab, click **Extensions** and then select **Copilot**.
|
||||
1. Under "Inline Suggest:Enable", select or deselect the checkbox to enable or disable inline suggestions.
|
||||
{% data reusables.copilot.vscode-settings %}
|
||||
1. In the left-side panel of the settings tab, click **Extensions** and then select **{% data variables.product.prodname_copilot_short %}**.
|
||||
1. Under "Inline Suggest:Enable," select or deselect the checkbox to enable or disable inline suggestions.
|
||||
|
||||
## Enabling or disabling {% data variables.product.prodname_copilot %} for specific languages
|
||||
|
||||
You can specify which languages you want to enable or disable {% data variables.product.prodname_copilot %} for.
|
||||
|
||||
1. From the {% data variables.product.prodname_vscode %}, click the **Extensions** tab, then navigate to the **Copilot** section. For more information, see "[Enabling and disabling inline suggestions](#enabling-and-disabling-inline-suggestions)."
|
||||
1. Under "Enable or disable Copilot for specified languages", click **Edit in settings.json**.
|
||||
1. Under "Enable or disable {% data variables.product.prodname_copilot_short %} for specified languages," click **Edit in settings.json**.
|
||||
1. In the _settings.json_ file, add or remove the languages you want to enable or disable {% data variables.product.prodname_copilot %} for. For example, to enable Python in {% data variables.product.prodname_copilot %}, add `"python": true` to the list, ensuring there is a trailing comma after all but the last list item.
|
||||
|
||||
```json
|
||||
@@ -110,4 +109,22 @@ You can specify which languages you want to enable or disable {% data variables.
|
||||
}
|
||||
```
|
||||
|
||||
## Configuring proxy settings for {% data variables.product.prodname_copilot %}
|
||||
|
||||
You can configure {% data variables.product.prodname_copilot %} to connect through an HTTP proxy server in {% data variables.product.prodname_vscode %}. {% data variables.product.prodname_copilot %} supports basic HTTP proxy setups, with or without basic authentication.
|
||||
|
||||
{% data reusables.copilot.vscode-settings %}
|
||||
1. In the left-side panel of the settings tab, click **Application** and then select **Proxy**.
|
||||
1. In the textbox under "Proxy", type the address of your proxy server, for example `http://localhost:3128`. Alternatively, {% data variables.product.prodname_copilot %} will use the `http_proxy` and `https_proxy` variables from your environment.
|
||||
|
||||

|
||||
|
||||
1. Optionally, under "Http: Proxy Authorization", click **Edit in settings.json** and add your required value to send as the `Proxy-Authorization` header for every network request.
|
||||
|
||||

|
||||
|
||||
1. Optionally, under "Http: Proxy Strict SSL", select or deselect the checkbox to enable or disable strict SSL.
|
||||
|
||||

|
||||
|
||||
{% data reusables.copilot.dotcom-settings %}
|
||||
|
||||
@@ -32,13 +32,20 @@ You can use the default keyboard shortcuts in {% data variables.product.prodname
|
||||
If you don't want to use the default keyboard shortcuts in {% data variables.product.prodname_vs %} when using {% data variables.product.prodname_copilot %}, you can rebind the shortcuts in the Keyboard editor using your preferred keyboard shortcuts for each specific command.
|
||||
|
||||
1. In the {% data variables.product.prodname_vs %} toolbar, under **Tools**, click **Options**.
|
||||
|
||||

|
||||
|
||||
1. In the "Options" dialog, under **Environment**, click **Keyboard**.
|
||||
|
||||

|
||||
|
||||
1. Under "Show commands containing:", search for the command you want to rebind.
|
||||

|
||||
1. Under "Press shortcut keys", type the shorcut you want to assign to the command, then click **Assign**.
|
||||

|
||||
|
||||

|
||||
|
||||
1. Under "Press shortcut keys," type the shortcut you want to assign to the command, then click **Assign**.
|
||||
|
||||
```
|
||||
|
||||
{% data reusables.copilot.enabling-or-disabling-vs %}
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
---
|
||||
title: Configuring GitHub Copilot settings in your organization
|
||||
intro: 'You can configure {% data variables.product.prodname_copilot %} in your organization, including granting and revoking access to individuals and teams, and determining whether to block suggestions that match public code.'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
permissions: 'Organization owners and members with admin permissions can configure {% data variables.product.prodname_copilot %} in their organization.'
|
||||
versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Copilot
|
||||
shortTitle: Organization settings
|
||||
---
|
||||
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} settings in your organization
|
||||
|
||||
{% data reusables.copilot.about-copilot %}
|
||||
|
||||
To configure {% data variables.product.prodname_copilot %} use in your organization, the organization must be owned by a {% data variables.product.prodname_ghe_cloud %} account, and an enterprise admin must first enable {% data variables.product.prodname_copilot_business_short %} for your organization. Organization admins will then be able to manage seat assignment within the organization.
|
||||
|
||||
Depending on the policy settings configured at the enterprise level, an organization admin may also be able to determine whether to allow or block {% data variables.product.prodname_copilot %} suggestions that match public code. For more information, see "[Enforcing policies for {% data variables.product.prodname_copilot %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise)."
|
||||
|
||||
## Configuring access to {% data variables.product.prodname_copilot %} in your organization
|
||||
|
||||
Once a {% data variables.product.prodname_ghe_cloud %} admin enables a {% data variables.product.prodname_copilot_business_short %} subscription in your organization, you can assign {% data variables.product.prodname_copilot %} seats to individuals and teams in your organization.
|
||||
|
||||
### Enabling access to {% data variables.product.prodname_copilot %} for all current and future users in your organization
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}**, and then click **Access**.
|
||||
1. Under "User permissions," to enable {% data variables.product.prodname_copilot %} for all current and future users in your organization, select **Allow for all members**.
|
||||
|
||||

|
||||
|
||||
1. In the "Confirm seat assignment" dialog, to confirm that you want to enable {% data variables.product.prodname_copilot %} for all current and future users in your organization, click **Confirm**.
|
||||
|
||||

|
||||
|
||||
1. To save your changes, click **Save**.
|
||||
|
||||

|
||||
|
||||
### Enabling access to {% data variables.product.prodname_copilot %} for specific users in your organization
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}**, and then click **Access**.
|
||||
1. Under "User permissions," to enable {% data variables.product.prodname_copilot %} for selected teams or users in your organization, select **Selected teams/users** and click **Save**.
|
||||
|
||||

|
||||
|
||||
1. If you are updating user access from the **Allow for all members** setting, in the "Confirm seat assignment" dialog, select how you want to start assigning access.
|
||||
- To unassign all members and then select those who should have access, select **Start from scratch**.
|
||||
- To keep all members who currently have access and then select those who should not have access, select **Keep all users**.
|
||||
|
||||

|
||||
|
||||
1. If you selected **Start from scratch**, click **Add people** or **Add teams** to add individual users, or entire teams.
|
||||
|
||||

|
||||
|
||||
1. If you selected **Add people**, in the "Enable GitHub Copilot access for selected members of ORGANIZATION" dialog, you can either search for individual members, or you can add members in bulk by uploading a CSV file.
|
||||
|
||||

|
||||
|
||||
- To search for members, type the member's username, full name, or email address in the search bar.
|
||||
- To add members in bulk, click **Upload CSV**, and then upload a CSV file including either the username or email address for each member you want to add, separated by a comma.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** When you upload a CSV file, {% data variables.product.prodname_copilot %} will search all users on {% data variables.product.prodname_dotcom_the_website %} for matches. If the CSV includes users who are not members of your organization, they will be invited to join your organization when you click **Add XX members**.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
- Review the list of users generated from your CSV file. To confirm that you want to grant access to the listed users, click **Add XX member(s) to access list**, or to reject the list, click **Cancel**.
|
||||
|
||||

|
||||
|
||||
1. If you selected **Add teams**, in the "Enable GitHub Copilot access for selected teams of ORGANIZATION" dialog, start typing the team name in the search bar, select the team you want to add and click **Select a team above**.
|
||||
|
||||

|
||||
|
||||
1. If you selected **Keep all users**, review the full list of your organization members and selected the individuals whose {% data variables.product.prodname_copilot %} access you want to revoke.
|
||||
|
||||

|
||||
|
||||
1. Click the **XX members selected** dropdown, and then click **Remove**.
|
||||
|
||||

|
||||
|
||||
### Disabling access to {% data variables.product.prodname_copilot %} for your whole organization
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}**, and then click **Access**.
|
||||
1. Under "User permissions," to disable {% data variables.product.prodname_copilot %} for all users in your organization, select **Disabled**.
|
||||
|
||||

|
||||
|
||||
1. To save your changes, click **Save**.
|
||||
|
||||

|
||||
|
||||
### Disabling access to {% data variables.product.prodname_copilot %} for specific users in your organization
|
||||
|
||||
Removing a user from the organization(s) that had assigned them a {% data variables.product.prodname_copilot %} seat will automatically unassign the seat from them. Alternatively, you can unassign a member's {% data variables.product.prodname_copilot %} seat, while preserving their membership. These changes will take effect from the beginning of the next billing cycle.
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}**, and then click **Access**.
|
||||
1. Under "User permissions,", select **Selected teams/users** and then click **Save**.
|
||||
|
||||

|
||||
|
||||
- In the "Confirm seat assignment" pop-up dialog, select **Keep all users**.
|
||||
|
||||

|
||||
|
||||
1. Under "Manage access," in the search bar, type the member's username, full name, or email address.
|
||||
|
||||

|
||||
|
||||
1. To remove the member from the list of users who have access to {% data variables.product.prodname_copilot %}, click **Remove**.
|
||||
|
||||

|
||||
|
||||
## Configuring suggestion matching policies for {% data variables.product.prodname_copilot %} in your organization
|
||||
|
||||
{% data variables.product.prodname_copilot %} includes a filter which detects code suggestions matching public code on {% data variables.product.prodname_dotcom %}. When the filter is enabled, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match or near match, the suggestion will not be shown to you.
|
||||
|
||||
If your enterprise admin has selected **No policy (let each organization decide)** for suggestion matching at the enterprise level, you can set a suggestion matching policy for your organization. If an organization member is assigned a seat by multiple organizations with different suggestion matching policies under the same enterprise, {% data variables.product.prodname_copilot %} will use the most restrictive policy.
|
||||
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}**, and then click **Policies**.
|
||||
1. In the "Suggestions matching public code" dropdown, select **Allow** or **Block** to allow or block suggestions matching public code.
|
||||
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[{% data variables.product.prodname_copilot_for_business %} Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Configuring GitHub Copilot settings on GitHub.com
|
||||
intro: 'You can configure {% data variables.product.prodname_copilot %}''s behavior on {% data variables.product.prodname_dotcom_the_website %}, which affects how {% data variables.product.prodname_copilot %} functions in any IDE that you use.'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
permissions: 'People with individual {% data variables.product.prodname_copilot %} subscriptions can configure their settings on {% data variables.product.prodname_dotcom_the_website %}.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- Copilot
|
||||
|
||||
@@ -12,5 +12,6 @@ children:
|
||||
- /configuring-github-copilot-in-visual-studio
|
||||
- /configuring-github-copilot-in-a-jetbrains-ide
|
||||
- /configuring-github-copilot-in-neovim
|
||||
- /configuring-github-copilot-settings-in-your-organization
|
||||
---
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ If you use a JetBrains IDE, you can view and incorporate suggestions from {% dat
|
||||
|
||||
## Prerequisites
|
||||
|
||||
{% data reusables.copilot.subscription-prerequisite %}
|
||||
|
||||
{% data reusables.copilot.jetbrains-ides %}
|
||||
|
||||
## Installing the {% data variables.product.prodname_copilot %} extension in your JetBrains IDE
|
||||
|
||||
@@ -19,7 +19,7 @@ If you use a Neovim, you can view and incorporate suggestions from {% data varia
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- To use {% data variables.product.prodname_copilot %} you must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."
|
||||
{% data reusables.copilot.subscription-prerequisite %}
|
||||
|
||||
- To use {% data variables.product.prodname_copilot %} in Neovim you must have Neovim and Node.js version 17 or below installed. For more information, see the [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/).
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ If you use {% data variables.product.prodname_vscode %}, you can view and incorp
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download).
|
||||
{% data reusables.copilot.subscription-prerequisite %}
|
||||
|
||||
- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download).
|
||||
|
||||
## Installing the {% data variables.product.prodname_vscode %} extension
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ If you use {% data variables.product.prodname_vs %}, you can view and incorporat
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.2 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation.
|
||||
{% data reusables.copilot.subscription-prerequisite %}
|
||||
|
||||
- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.2 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: About GitHub Copilot
|
||||
intro: '{% data variables.product.prodname_copilot %} can help you code by offering autocomplete-style suggestions. You can learn what to consider while using {% data variables.product.prodname_copilot %}, and how {% data variables.product.prodname_copilot %} works.'
|
||||
intro: '{% data variables.product.prodname_copilot %} can help you code by offering autocomplete-style suggestions. You can learn how {% data variables.product.prodname_copilot %} works, and what to consider while using {% data variables.product.prodname_copilot %}.'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
@@ -20,17 +20,17 @@ shortTitle: About GitHub Copilot
|
||||
|
||||
You can see real-world examples of {% data variables.product.prodname_copilot %} in action. For more information, see the [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) website.
|
||||
|
||||
GitHub Copilot offers suggestions from a model that OpenAI built from billions of lines of open source code. As a result, the training set for {% data variables.product.prodname_copilot %} may contain insecure coding patterns, bugs, or references to outdated APIs or idioms. When {% data variables.product.prodname_copilot %} produces suggestions based on this training data, those suggestions may also contain undesirable patterns.
|
||||
{% data variables.product.prodname_copilot %} offers suggestions from a model that OpenAI built from billions of lines of open source code. As a result, the training set for {% data variables.product.prodname_copilot %} may contain insecure coding patterns, bugs, or references to outdated APIs or idioms. When {% data variables.product.prodname_copilot %} produces suggestions based on this training data, those suggestions may also contain undesirable patterns.
|
||||
|
||||
You are responsible for ensuring the security and quality of your code. We recommend you take the same precautions when using code generated by {% data variables.product.prodname_copilot %} that you would when using any code you didn't write yourself. These precautions include rigorous testing, IP scanning, and tracking for security vulnerabilities. {% data variables.product.company_short %} provides a number of features to help you monitor and improve code quality, such as {% data variables.product.prodname_actions %}, {% data variables.product.prodname_dependabot %}, {% data variables.product.prodname_codeql %} and {% data variables.product.prodname_code_scanning %}. All these features are free to use in public repositories. For more information, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)" and "[{% data variables.product.company_short %} security features](/code-security/getting-started/github-security-features)."
|
||||
|
||||
{% data variables.product.prodname_copilot %} uses filters to block offensive words in the prompts and avoid producing suggestions in sensitive contexts. We are committed to constantly improving the filter system to more intelligently detect and remove offensive suggestions generated by {% data variables.product.prodname_copilot %}, including biased, discriminatory, or abusive outputs. If you see an offensive suggestion generated by {% data variables.product.prodname_copilot %}, please report the suggestion directly to copilot-safety@github.com so that we can improve our safeguards.
|
||||
|
||||
{% data reusables.copilot.emus-cannot-use-copilot %}
|
||||
|
||||
## About billing for {% data variables.product.prodname_copilot %}
|
||||
|
||||
{% data variables.product.prodname_copilot %} is a paid feature, requiring a monthly or yearly subscription. Verified students, teachers, and maintainers of popular open source projects on {% data variables.product.prodname_dotcom %} are eligible to use {% data variables.product.prodname_copilot %} for free. If you meet the criteria for a free {% data variables.product.prodname_copilot %} subscription, you will be automatically notified when you visit the {% data variables.product.prodname_copilot %} subscription page. If you do not meet the criteria for a free {% data variables.product.prodname_copilot %} subscription, you will be offered a 60 day free trial, after which a paid subscription is required for continued use. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."
|
||||
{% data variables.product.prodname_copilot %} is a paid feature, requiring a monthly or yearly subscription. {% data variables.product.prodname_copilot %} subscriptions can be paid for and managed through a personal account on {% data variables.product.prodname_dotcom_the_website %} with {% data variables.product.prodname_copilot_for_individuals %}, or paid for and managed centrally through an enterprise account on {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_copilot_for_business %}.
|
||||
|
||||
Verified students, teachers, and maintainers of popular open source projects on {% data variables.product.prodname_dotcom %} are eligible to use {% data variables.product.prodname_copilot_individuals_short %} for free. If you meet the criteria for a free {% data variables.product.prodname_copilot_individuals_short %} subscription, you will be automatically notified when you visit the {% data variables.product.prodname_copilot %} subscription page. If you do not meet the criteria for a free {% data variables.product.prodname_copilot_individuals_short %} subscription, you will be offered a 60-day free trial, after which a paid subscription is required for continued use. {% data variables.product.prodname_copilot_for_business %} does not include a free trial. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."
|
||||
|
||||
## About the license for the {% data variables.product.prodname_copilot %} plugin in JetBrains IDEs
|
||||
|
||||
@@ -38,4 +38,5 @@ You are responsible for ensuring the security and quality of your code. We recom
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[{% data variables.product.company_short %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)"
|
||||
- "[{% data variables.product.company_short %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)"{% ifversion ghec %}
|
||||
- "[{% data variables.product.prodname_copilot_for_business %} Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"{% endif %}
|
||||
|
||||
@@ -14,7 +14,7 @@ topics:
|
||||
|
||||
{% data variables.product.prodname_copilot %} is an AI pair programmer. You can use {% data variables.product.prodname_copilot %} to get suggestions for whole lines or entire functions right inside your editor.
|
||||
|
||||
This guide will show you how to sign up for {% data variables.product.prodname_copilot %}, install the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %}, and get your first suggestion. For more information on {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)." For more in-depth information on how to use {% data variables.product.prodname_copilot %} in a variety of environments, see "[Getting Started](/copilot/getting-started-with-github-copilot)."
|
||||
This guide will show you how to sign up for {% data variables.product.prodname_copilot %} through your personal account, install the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %}, and get your first suggestion. For more information on {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)." For more in-depth information on how to use {% data variables.product.prodname_copilot %} in a variety of environments, see "[Getting Started](/copilot/getting-started-with-github-copilot)."
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -23,6 +23,14 @@ This guide will show you how to sign up for {% data variables.product.prodname_c
|
||||
|
||||
## Signing up for {% data variables.product.prodname_copilot %}
|
||||
|
||||
Before you can start using {% data variables.product.prodname_copilot %}, you will need to set up a free trial or subscription for your personal account.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are a member of an organization owned by a {% data variables.product.prodname_ghe_cloud %} account with a {% data variables.product.prodname_copilot %} subscription, and you have been assigned a {% data variables.product.prodname_copilot %} seat by your organization, you can proceed to "[Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %}](/copilot/quickstart#installing-the-github-copilot-extension-for-visual-studio-code)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.copilot.signup-procedure %}
|
||||
|
||||
## Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Creating discussion category forms
|
||||
shortTitle: Create discussion category forms
|
||||
intro: 'You can customize the templates that are available for community members to use when they open new discussions in your repository.'
|
||||
versions:
|
||||
feature: discussion-category-forms
|
||||
---
|
||||
|
||||
{% data reusables.discussions.discussion-category-forms-beta %}
|
||||
|
||||
## About discussion category forms
|
||||
|
||||
You can encourage community members to include specific, structured information in their discussions by using discussion forms in your repository. With discussion category forms, you can create discussion templates that have customizable web form fields. Discussion forms are written in YAML using the {% data variables.product.prodname_dotcom %} form schema. For more information, see "[Syntax for {% data variables.product.prodname_dotcom %}'s form schema](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)."
|
||||
|
||||
{% data reusables.actions.learn-more-about-yaml %}
|
||||
|
||||
To use a discussion category form in your repository, you must create a new file and add it to the `/.github/DISCUSSION_TEMPLATE/` folder in your repository.
|
||||
|
||||
You can also create discussion category forms for your organization. For more information, see "[Creating a default community health file](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)."
|
||||
|
||||
Discussion category forms are not supported for polls. For more information about polls, see "[About polls](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-polls)."
|
||||
|
||||
Here is the rendered version of the issue form.
|
||||
|
||||

|
||||
|
||||
## Creating discussion category forms
|
||||
|
||||
People with write access to a repository can create a discussion category form.
|
||||
|
||||
1. Navigate to the repository where you want to create a discussion category form.
|
||||
2. In your repository, create a file called `/.github/DISCUSSION_TEMPLATE/FORM-NAME.yml`, replacing `FORM-NAME` with the name for your discussion category form. {% data reusables.discussions.discussion-category-forms-name %} For more information about creating new files on GitHub, see "[Creating new files](/github/managing-files-in-a-repository/creating-new-files)."
|
||||
3. In the body of the new file, type the contents of your discussion category form. For more information, see "[Syntax for discussion category forms](/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms)."
|
||||
4. Commit your file to the default branch of your repository. For more information, see "[Creating new files](/github/managing-files-in-a-repository/creating-new-files)."
|
||||
@@ -9,5 +9,7 @@ children:
|
||||
- /managing-categories-for-discussions
|
||||
- /moderating-discussions
|
||||
- /viewing-insights-for-your-discussions
|
||||
- /creating-discussion-category-forms
|
||||
- /syntax-for-discussion-category-forms
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Syntax for discussion category forms
|
||||
shortTitle: Syntax for discussion category forms
|
||||
intro: 'You can use YAML syntax to define the fields in your discussion category forms.'
|
||||
versions:
|
||||
feature: discussion-category-forms
|
||||
---
|
||||
|
||||
{% data reusables.discussions.discussion-category-forms-beta %}
|
||||
|
||||
## About YAML syntax for discussion category forms
|
||||
|
||||
You can create custom discussion category forms by adding a YAML form definition file to the `/.github/DISCUSSION_TEMPLATE/` folder in your repository. {% data reusables.actions.learn-more-about-yaml %}
|
||||
|
||||
{% data reusables.discussions.discussion-category-forms-name %}
|
||||
|
||||
For each field, you can define the input type, validation, and a default label.
|
||||
|
||||
When a community member fills out a discussion form, their responses for each input are converted to markdown and added to the body of a discussion. Community members can edit their discussions that were created with a discussion form and other people can interact with the discussion like a discussion created through other methods.
|
||||
|
||||
This example YAML configuration file defines a general discussion category form.
|
||||
|
||||
{% data reusables.discussions.discussion-category-forms-sample %}
|
||||
|
||||
## Top-level syntax
|
||||
|
||||
The configuration file for a discussion category form must contain a `body` key, and the `body` must contain at least 1 non-Markdown field.
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
- type: input
|
||||
id: suggestion
|
||||
attributes:
|
||||
label: Suggestion
|
||||
description: "How might we make this project better?"
|
||||
placeholder: "Adding a CODE_OF_CONDUCT.md file would be a great idea."
|
||||
validations:
|
||||
required: true
|
||||
```
|
||||
|
||||
You can set the following top-level keys for each issue form.
|
||||
|
||||
| Key | Description | Required | Type |
|
||||
| :-- | :-- | :-- | :-- | :-- |
|
||||
| `body` | Definition of the input types in the discussion form. | Required | Array |
|
||||
| `labels` | Labels that will automatically be added to discussions created with this template. | Optional | Array or comma-delimited string |
|
||||
| `title` | A default title that will be pre-populated in the discussion submission form. | Optional | String |
|
||||
|
||||
To add fields to your form, include an array of form elements in the `body` key. For a list of available elements and their syntaxes, see "[Syntax for {% data variables.product.prodname_dotcom %}'s form schema](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)."
|
||||
@@ -34,7 +34,7 @@ Once you are a verified {% data variables.product.prodname_global_campus %} stud
|
||||
- Discover student-created repositories from GitHub Community Exchange. For more information, see "[About GitHub Community Exchange](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-community-exchange)."
|
||||
|
||||
{% data variables.product.prodname_global_campus %} students also receive the following {% data variables.product.prodname_dotcom %} benefits.
|
||||
- **{% data variables.product.prodname_copilot %}**: Verified students receive a free subscription for {% data variables.product.prodname_copilot %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
- **{% data variables.product.prodname_copilot %}**: Verified students receive a free subscription for {% data variables.product.prodname_copilot %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
- **{% data variables.product.prodname_github_codespaces %}**: {% data reusables.education.student-codespaces-benefit %} For more information on getting started with {% data variables.product.prodname_github_codespaces %}, see "[{% data variables.product.prodname_github_codespaces %} overview](/codespaces/overview)."
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -30,7 +30,7 @@ Before applying for an individual discount, check if your learning community is
|
||||
- Stay in the know on what the student community is interested in by rewatching recent [Campus TV](https://www.twitch.tv/githubeducation) episodes. Campus TV is created by {% data variables.product.prodname_dotcom %} and student community leaders and can be watched live or on demand.
|
||||
- Request a {% data variables.product.prodname_dotcom %} swag bag with educational materials and goodies for your students.
|
||||
|
||||
A free subscription for {% data variables.product.prodname_copilot %} is available to verified teachers with {% data variables.product.prodname_education %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
A free subscription for {% data variables.product.prodname_copilot %} is available to verified teachers with {% data variables.product.prodname_education %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -10,31 +10,40 @@ versions:
|
||||
shortTitle: About permissions
|
||||
---
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
The permissions for packages are either repository-scoped or user/organization-scoped.
|
||||
{% endif %}
|
||||
{% ifversion packages-registries-v2 %}
|
||||
The permissions for packages can be scoped either to a user or an organization or to a repository.
|
||||
|
||||
## Permissions for repository-scoped packages
|
||||
|
||||
A repository-scoped package inherits the permissions and visibility of the repository that owns the package. You can find a package scoped to a repository by going to the main page of the repository and clicking the **Packages** link to the right of the page. {% ifversion fpt or ghec %}For more information, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)."{% endif %}
|
||||
|
||||
The {% data variables.product.prodname_registry %} registries below **only** use repository-scoped permissions:
|
||||
|
||||
{% ifversion not fpt or ghec %}- Docker registry (`docker.pkg.github.com`){% endif %}
|
||||
{% ifversion packages-npm-v2 %}{% else %}- npm registry{% endif %}
|
||||
- RubyGems registry
|
||||
- Apache Maven registry
|
||||
- NuGet registry
|
||||
|
||||
{% ifversion packages-npm-v2 %}For {% data variables.packages.prodname_ghcr_and_npm_registry %}, you can choose to allow packages to be scoped to a user, an organization, or linked to a repository.{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
## Granular permissions for user/organization-scoped packages
|
||||
|
||||
Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of the package separately from a repository that is connected (or linked) to a package.
|
||||
|
||||
Currently, the {% data variables.packages.prodname_ghcr_and_npm_registry %} offer granular permissions for your container image packages.
|
||||
The following {% data variables.product.prodname_registry %} registries support granular permissions.
|
||||
|
||||
- {% data variables.product.prodname_container_registry %}
|
||||
{% ifversion packages-npm-v2 %}- npm registry{% endif %}
|
||||
{% ifversion packages-nuget-v2 %}- NuGet registry{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Permissions for {% ifversion packages-registries-v2 %}repository-scoped {% endif %}packages
|
||||
|
||||
A {% ifversion packages-registries-v2 %}repository-scoped {% endif %}package inherits the permissions and visibility of the repository that owns the package. You can find a package scoped to a repository by going to the main page of the repository and clicking the **Packages** link to the right of the page. {% ifversion fpt or ghec %}For more information, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)."{% endif %}
|
||||
|
||||
{% ifversion packages-registries-v2 %}
|
||||
The following {% data variables.product.prodname_registry %} registries **only** support repository-scoped permissions.
|
||||
|
||||
{% ifversion not fpt or ghec %}- Docker registry (`docker.pkg.github.com`){% endif %}
|
||||
{% ifversion packages-npm-v2 %}{% else %}- npm registry{% endif %}
|
||||
- RubyGems registry
|
||||
- Apache Maven registry
|
||||
- Gradle registry
|
||||
{% ifversion packages-nuget-v2 %}{% else %}- NuGet registry{% endif %}
|
||||
|
||||
For {% ifversion ghes %}the {% data variables.product.prodname_container_registry %}{% else %}other registries{% endif %}, you can choose to allow packages to be scoped to a user or an organization, or linked to a repository. {% ifversion docker-ghcr-enterprise-migration %}For information about migration to the {% data variables.product.prodname_container_registry %}, see "[Migrating to the {% data variables.product.prodname_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)."{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion packages-registries-v2 %}
|
||||
## Visibility and access permissions for container images
|
||||
|
||||
{% data reusables.package_registry.visibility-and-access-permissions %}
|
||||
|
||||
@@ -11,18 +11,22 @@ versions:
|
||||
ghes: '*'
|
||||
shortTitle: Access control & visibility
|
||||
---
|
||||
{% data reusables.package_registry.container-registry-ghes-beta %}
|
||||
{% data reusables.package_registry.container-registry-ghes-beta %}{% ifversion packages-registries-v2 %}
|
||||
|
||||
Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of a package separately from the repository that it is connected (or linked) to.
|
||||
|
||||
Currently, you can only use granular permissions with the {% data variables.packages.prodname_ghcr_and_npm_registry %}. Granular permissions are not supported in our other package registries, such as the RubyGems registry.{% ifversion docker-ghcr-enterprise-migration %} For more information about migration to the {% data variables.product.prodname_container_registry %}, see "[Migrating to the {% data variables.product.prodname_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)."{% endif %}
|
||||
Some registries only support repository-scoped permissions. For the list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."
|
||||
|
||||
For more information about permissions for repository-scoped packages, packages-related scopes for PATs, or managing permissions for your actions workflows, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages)."
|
||||
{% else %}A package inherits the permissions and visibility of the repository that owns the package.{% endif %} For more information about permissions for packages, packages-related scopes for PATs, or managing permissions for your actions workflows, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages)."
|
||||
|
||||
{% ifversion packages-registries-v2 %}
|
||||
|
||||
## Visibility and access permissions for container images
|
||||
|
||||
{% data reusables.package_registry.visibility-and-access-permissions %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Configuring access to container images for your personal account
|
||||
|
||||
If you have admin permissions to a container image that's owned by a personal account, you can assign read, write, or admin roles to other users. For more information about these permission roles, see "[Visibility and access permissions for container images](#visibility-and-access-permissions-for-container-images)."
|
||||
@@ -105,7 +109,7 @@ To further customize access to your container image, see "[Configuring access to
|
||||
{% ifversion fpt or ghec %}
|
||||
## Ensuring {% data variables.product.prodname_github_codespaces %} access to your package
|
||||
|
||||
By default, a codespace can seamlessly access certain packages in the {% data variables.packages.prodname_ghcr_and_npm_registry %}, such as those published in the same repository with the **Inherit access** option selected. For more information on which access is automatically configured, see "[Allowing your codespace to access a private image registry](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry#accessing-images-stored-in-container-registry-and-npm-registry)."
|
||||
By default, a codespace can seamlessly access certain packages in registries that support granular permissions, such as packages published in the same repository with the **Inherit access** option selected. For the list of {% data variables.product.prodname_registry %} registries that support granular permissions and seamless {% data variables.product.prodname_github_codespaces %} access, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."
|
||||
|
||||
Otherwise, to ensure that a codespace has access to your package, you must grant access to the repository where the codespace is being launched.
|
||||
|
||||
|
||||