1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Merge branch 'main' into patch-2

This commit is contained in:
Janice
2022-06-29 09:42:21 +02:00
committed by GitHub
799 changed files with 133998 additions and 83245 deletions

View File

@@ -1,4 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }], "@babel/plugin-syntax-top-level-await"]
"plugins": ["styled-components"]
}

View File

@@ -1,30 +1,22 @@
<!--
Thank you for contributing to this project! You must fill out the information below before we can review this pull request. By explaining why you're making a change (or linking to a pull request) and what changes you've made, we can triage your pull request to the best possible team for review.
See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for information how to contribute.
For changes to content in [site policy](https://github.com/github/docs/tree/main/content/github/site-policy), see the [CONTRIBUTING guide in the site-policy repo](https://github.com/github/site-policy/blob/main/CONTRIBUTING.md).
We cannot accept changes to our translated content right now. See the [types-of-contributions.md](/main/contributing/types-of-contributions.md#earth_asia-translations) for more information.
Thanks again!
Thank you for contributing to this project! You must fill out the information below before we can review this pull request. By explaining why you're making a change (or linking to an issue) and what changes you've made, we can triage your pull request to the best possible team for review.
-->
### Why:
Closes [issue link]
<!--
- If there's an existing issue for your change, please link to it.
- If there's _not_ an existing issue, please open one first to make it more likely that this update will be accepted: https://github.com/github/docs/issues/new/choose. -->
<!-- If there's an existing issue for your change, please link to it in the brackets above.
If there's _not_ an existing issue, please open one first to make it more likely that this update will be accepted: https://github.com/github/docs/issues/new/choose. -->
### What's being changed:
### What's being changed (if available, include any code snippets, screenshots, or gifs):
<!-- Share artifacts of the changes, be they code snippets, GIFs or screenshots; whatever shares the most context. If you made changes to the `content` directory, a table will populate in a comment below with the staging and live article links -->
<!-- Let us know what you are changing. Share anything that could provide the most context.
If you made changes to the `content` directory, a table will populate in a comment below with links to the preview and current production articles. -->
### Check off the following:
- [ ] I have reviewed my changes in staging (look for "Automatically generated comment" and click **Modified** to view your latest changes).
- [ ] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
- [ ] For content changes, I have completed the [self-review checklist](https://github.com/github/docs/blob/main/contributing/self-review.md#self-review).
### Writer impact (This section is for GitHub staff members only):
@@ -34,3 +26,4 @@ Closes [issue link]
- [ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")
<!-- Description of the writer impact here -->

View File

@@ -24,6 +24,7 @@ on:
- 'script/rest/**/*.json'
- 'package*.json'
- 'lib/redirects/static/**/*.json'
- '.github/workflows/openapi-schema-check.yml'
permissions:
contents: read
@@ -36,7 +37,7 @@ concurrency:
jobs:
check-schema-versions:
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
runs-on: ubuntu-20.04-xl
steps:
- name: Checkout repository code
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748

View File

@@ -26,7 +26,7 @@ RUN npm ci --no-optional --registry https://registry.npmjs.org/
# For Next.js v12+
# This the appropriate necessary extra for node:16-alpine
# Other options are https://www.npmjs.com/search?q=%40next%2Fswc
# RUN npm i @next/swc-linux-x64-musl --no-save
RUN npm i @next/swc-linux-x64-musl --no-save
# ---------------
@@ -46,12 +46,13 @@ COPY stylesheets ./stylesheets
COPY pages ./pages
COPY components ./components
COPY lib ./lib
# One part of the build relies on this content file to pull all-products
# Certain content is necessary for being able to build
COPY content/index.md ./content/index.md
COPY content/rest ./content/rest
COPY data ./data
COPY next.config.js ./next.config.js
COPY tsconfig.json ./tsconfig.json
COPY next-env.d.ts ./next-env.d.ts
RUN npm run build

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -39,8 +39,6 @@ export function GHAEReleaseNotePatch({ patch, didEnterView }: Props) {
Release Candidate
</span>
)}
<button className="js-print btn-link ml-3 text-small text-bold">Print</button>
</div>
<p className="color-fg-muted mt-1">
{bannerText} {patch.friendlyDate}.

View File

@@ -0,0 +1,7 @@
.truncated {
// Note that `-webkit-line-clamp` gets set by the component JSX
// manually with a `style` attribute.
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
}

View File

@@ -1,6 +1,8 @@
import React, { ReactNode } from 'react'
import cx from 'classnames'
import styles from './TruncateLines.module.scss'
export type TruncateLinesPropsT = {
as?: keyof JSX.IntrinsicElements
maxLines: number
@@ -11,16 +13,8 @@ export type TruncateLinesPropsT = {
export const TruncateLines = (props: TruncateLinesPropsT) => {
const { maxLines, className, children, as: Component = 'div' } = props
return (
<Component className={cx('root', className)}>
<Component className={cx(styles.truncated, className)} style={{ WebkitLineClamp: maxLines }}>
{children}
<style jsx>{`
.root {
display: -webkit-box;
-webkit-line-clamp: ${maxLines};
-webkit-box-orient: vertical;
overflow: hidden;
}
`}</style>
</Component>
)
}

View File

@@ -360,10 +360,10 @@ There are transformations for image paths in GitHub Enterprise Server (versions
### Preventing transformations
Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, write the link using HTML and add a class of `dotcom-only`. For example:
Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, include the preferred version in the path.
```html
<a href="/github/site-policy/github-terms-of-service" class="dotcom-only">GitHub's Terms of Service</a>
```markdown
"[GitHub's Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service)"
```
Sometimes the canonical home of content moves outside the docs site. None of the links included in [`lib/redirects/external-sites.json`](/lib/redirects/external-sites.json) get rewritten. See [`contributing/redirects.md`](/contributing/redirects.md) for more info about this type of redirect.

View File

@@ -29,7 +29,7 @@ When you sign up for an account, {% data variables.product.product_name %} provi
**Note{% ifversion ghec %}s{% endif %}**: {% ifversion ghec %}
* {% endif %}Your profile picture should be a PNG, JPG, or GIF file under 1 MB in size. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels.
* {% endif %}Your profile picture should be a PNG, JPG, or GIF file, and it must be less than 1 MB in size and smaller than 3000 by 3000 pixels. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels.
{% ifversion ghec %}* Gravatar profile pictures are not supported with {% data variables.product.prodname_emus %}.{% endif %}
{% endnote %}
@@ -39,8 +39,8 @@ When you sign up for an account, {% data variables.product.product_name %} provi
{% data reusables.user-settings.access_settings %}
2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**.
![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png)
3. Click **Upload a photo...**.
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png)
3. Click **Upload a photo...**.{% ifversion not ghae %}
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %}
3. Crop your picture. When you're done, click **Set new profile picture**.
![Crop uploaded photo](/assets/images/help/profile/avatar_crop_and_save.png)
@@ -49,8 +49,8 @@ When you sign up for an account, {% data variables.product.product_name %} provi
{% data reusables.user-settings.access_settings %}
2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**.
![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png)
3. To revert to your identicon, click **Remove photo**. If your email address is associated with a [Gravatar](https://en.gravatar.com/), you cannot revert to your identicon. Click **Revert to Gravatar** instead.
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png)
3. To revert to your identicon, click **Remove photo**. {% ifversion not ghae %}If your email address is associated with a [Gravatar](https://en.gravatar.com/), you cannot revert to your identicon. Click **Revert to Gravatar** instead.
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %}
## Changing your profile name

View File

@@ -69,7 +69,7 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
```
@@ -105,7 +105,7 @@ steps:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Run the Gradle package task
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: -b ci.gradle package
```
@@ -136,7 +136,7 @@ steps:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- uses: {% data reusables.actions.action-upload-artifact %}

View File

@@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
@@ -114,7 +114,7 @@ jobs:
# You can use PyPy versions in python-version.
# For example, {% ifversion actions-node16-action %}pypy-2.7 and pypy-3.8{% else %}pypy2 and pypy3{% endif %}
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
@@ -129,7 +129,7 @@ jobs:
### Using a specific Python version
You can configure a specific version of python. For example, 3.8. Alternatively, you can use semantic version syntax to get the latest minor release. This example uses the latest minor release of Python 3.
You can configure a specific version of python. For example, 3.9. Alternatively, you can use semantic version syntax to get the latest minor release. This example uses the latest minor release of Python 3.
```yaml{:copy}
name: Python package
@@ -173,12 +173,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", {% ifversion actions-node16-action %}pypy-2.7, pypy-3.8{% else %}pypy2, pypy3{% endif %}]
python-version: ["3.7", "3.8", "3.9", "3.10", {% ifversion actions-node16-action %}pypy-2.7, pypy-3.8{% else %}pypy2, pypy3{% endif %}]
exclude:
- os: macos-latest
python-version: "3.6"
python-version: "3.7"
- os: windows-latest
python-version: "3.6"
python-version: "3.7"
```
### Using the default Python version
@@ -238,7 +238,7 @@ steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.9'
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- run: pip test
@@ -315,7 +315,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9"]
python: ["3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
@@ -347,7 +347,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}

View File

@@ -663,254 +663,249 @@ Here is an exhaustive list of all currently supported icons:
<td>eye</td>
</tr>
<tr>
<td>facebook</td>
<td>fast-forward</td>
<td>feather</td>
<td>file-minus</td>
<td>file-plus</td>
</tr>
<tr>
<td>file-plus</td>
<td>file-text</td>
<td>file</td>
<td>film</td>
<td>filter</td>
</tr>
<tr>
<td>filter</td>
<td>flag</td>
<td>folder-minus</td>
<td>folder-plus</td>
<td>folder</td>
</tr>
<tr>
<td>folder</td>
<td>gift</td>
<td>git-branch</td>
<td>git-commit</td>
<td>git-merge</td>
</tr>
<tr>
<td>git-merge</td>
<td>git-pull-request</td>
<td>globe</td>
<td>grid</td>
<td>hard-drive</td>
</tr>
<tr>
<td>hard-drive</td>
<td>hash</td>
<td>headphones</td>
<td>heart</td>
<td>help-circle</td>
</tr>
<tr>
<td>help-circle</td>
<td>home</td>
<td>image</td>
<td>inbox</td>
<td>info</td>
</tr>
<tr>
<td>info</td>
<td>italic</td>
<td>layers</td>
<td>layout</td>
<td>life-buoy</td>
</tr>
<tr>
<td>life-buoy</td>
<td>link-2</td>
<td>link</td>
<td>list</td>
<td>loader</td>
</tr>
<tr>
<td>loader</td>
<td>lock</td>
<td>log-in</td>
<td>log-out</td>
<td>mail</td>
</tr>
<tr>
<td>mail</td>
<td>map-pin</td>
<td>map</td>
<td>maximize-2</td>
<td>maximize</td>
</tr>
<tr>
<td>maximize</td>
<td>menu</td>
<td>message-circle</td>
<td>message-square</td>
<td>mic-off</td>
</tr>
<tr>
<td>mic-off</td>
<td>mic</td>
<td>minimize-2</td>
<td>minimize</td>
<td>minus-circle</td>
</tr>
<tr>
<td>minus-circle</td>
<td>minus-square</td>
<td>minus</td>
<td>monitor</td>
<td>moon</td>
</tr>
<tr>
<td>moon</td>
<td>more-horizontal</td>
<td>more-vertical</td>
<td>move</td>
<td>music</td>
</tr>
<tr>
<td>music</td>
<td>navigation-2</td>
<td>navigation</td>
<td>octagon</td>
<td>package</td>
</tr>
<tr>
<td>package</td>
<td>paperclip</td>
<td>pause-circle</td>
<td>pause</td>
<td>percent</td>
</tr>
<tr>
<td>percent</td>
<td>phone-call</td>
<td>phone-forwarded</td>
<td>phone-incoming</td>
<td>phone-missed</td>
</tr>
<tr>
<td>phone-missed</td>
<td>phone-off</td>
<td>phone-outgoing</td>
<td>phone</td>
<td>pie-chart</td>
</tr>
<tr>
<td>pie-chart</td>
<td>play-circle</td>
<td>play</td>
<td>plus-circle</td>
<td>plus-square</td>
</tr>
<tr>
<td>plus-square</td>
<td>plus</td>
<td>pocket</td>
<td>power</td>
<td>printer</td>
</tr>
<tr>
<td>printer</td>
<td>radio</td>
<td>refresh-ccw</td>
<td>refresh-cw</td>
<td>repeat</td>
</tr>
<tr>
<td>repeat</td>
<td>rewind</td>
<td>rotate-ccw</td>
<td>rotate-cw</td>
<td>rss</td>
</tr>
<tr>
<td>rss</td>
<td>save</td>
<td>scissors</td>
<td>search</td>
<td>send</td>
</tr>
<tr>
<td>send</td>
<td>server</td>
<td>settings</td>
<td>share-2</td>
<td>share</td>
</tr>
<tr>
<td>share</td>
<td>shield-off</td>
<td>shield</td>
<td>shopping-bag</td>
<td>shopping-cart</td>
</tr>
<tr>
<td>shopping-cart</td>
<td>shuffle</td>
<td>sidebar</td>
<td>skip-back</td>
<td>skip-forward</td>
</tr>
<tr>
<td>skip-forward</td>
<td>slash</td>
<td>sliders</td>
<td>smartphone</td>
<td>speaker</td>
</tr>
<tr>
<td>speaker</td>
<td>square</td>
<td>star</td>
<td>stop-circle</td>
<td>sun</td>
</tr>
<tr>
<td>sun</td>
<td>sunrise</td>
<td>sunset</td>
<td>tablet</td>
<td>tag</td>
</tr>
<tr>
<td>tag</td>
<td>target</td>
<td>terminal</td>
<td>thermometer</td>
<td>thumbs-down</td>
</tr>
<tr>
<td>thumbs-down</td>
<td>thumbs-up</td>
<td>toggle-left</td>
<td>toggle-right</td>
<td>trash-2</td>
</tr>
<tr>
<td>trash-2</td>
<td>trash</td>
<td>trending-down</td>
<td>trending-up</td>
<td>triangle</td>
</tr>
<tr>
<td>triangle</td>
<td>truck</td>
<td>tv</td>
<td>type</td>
<td>umbrella</td>
</tr>
<tr>
<td>umbrella</td>
<td>underline</td>
<td>unlock</td>
<td>upload-cloud</td>
<td>upload</td>
</tr>
<tr>
<td>upload</td>
<td>user-check</td>
<td>user-minus</td>
<td>user-plus</td>
<td>user-x</td>
</tr>
<tr>
<td>user-x</td>
<td>user</td>
<td>users</td>
<td>video-off</td>
<td>video</td>
</tr>
<tr>
<td>video</td>
<td>voicemail</td>
<td>volume-1</td>
<td>volume-2</td>
<td>volume-x</td>
</tr>
<tr>
<td>volume-x</td>
<td>volume</td>
<td>watch</td>
<td>wifi-off</td>
<td>wifi</td>
</tr>
<tr>
<td>wifi</td>
<td>wind</td>
<td>x-circle</td>
<td>x-square</td>
<td>x</td>
</tr>
<tr>
<td>x</td>
<td>zap-off</td>
<td>zap</td>
<td>zoom-in</td>
</tr>
<tr>
<td>zoom-out</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>

View File

@@ -57,6 +57,12 @@ There are some limits on {% data variables.product.prodname_actions %} usage whe
| Pro | 40 | 5 |
| Team | 60 | 5 |
| Enterprise | 180 | 50 |
{% note %}
**Note:** If required, customers on enterprise plans can request a higher limit for concurrent jobs. For more information, contact {% data variables.contact.contact_ent_support %} or your sales representative.
{% endnote %}
- **Job matrix** - {% data reusables.actions.usage-matrix-limits %}
{% data reusables.actions.usage-workflow-queue-limits %}

View File

@@ -96,7 +96,7 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
@@ -167,7 +167,7 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
@@ -246,7 +246,7 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env: {% raw %}

View File

@@ -88,13 +88,13 @@ While the job runs, the logs and output can be viewed in the {% data variables.p
Hardware specification for Windows and Linux virtual machines:
- 2-core CPU
- 7 GB of RAM memory
- 14 GB of SSD disk space
- 7 GB of RAM
- 14 GB of SSD space
Hardware specification for macOS virtual machines:
- 3-core CPU
- 14 GB of RAM memory
- 14 GB of SSD disk space
- 14 GB of RAM
- 14 GB of SSD space
{% data reusables.actions.supported-github-runners %}

View File

@@ -250,6 +250,6 @@ For information on changing the policies for the repository cache size limit, se
## Managing caches
You can use the {% data variables.product.product_name %} REST API to manage your caches. At present, you can use the API to see your cache usage, with more functionality expected in future updates. For more information, see the "[Actions](/rest/reference/actions#cache)" REST API documentation.
You can use the {% data variables.product.product_name %} REST API to manage your caches. {% ifversion actions-cache-list-delete-apis %}You can use the API to list and delete cache entries, and see your cache usage.{% elsif actions-cache-management %}At present, you can use the API to see your cache usage, with more functionality expected in future updates.{% endif %} For more information, see the "[{% data variables.product.prodname_actions %} Cache](/rest/actions/cache)" REST API documentation.
{% endif %}

View File

@@ -921,6 +921,12 @@ on:
push
```
{% note %}
**Note**: When a `push` webhook event triggers a workflow run, the Actions UI's "pushed by" field shows the account of the pusher and not the author or committer. However, if the changes are pushed to a repository using SSH authentication with a deploy key, then the "pushed by" field will be the repository admin who verified the deploy key when it was added it to a repository.
{% endnote %}
#### Running your workflow only when a push to specific branches occurs
You can use the `branches` or `branches-ignore` filter to configure your workflow to only run when specific branches are pushed. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)."

View File

@@ -16,7 +16,7 @@ topics:
---
If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that {% data variables.product.product_location %} runs on without affecting users or client software.
The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}.
The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}. Note that `localhost` is not a valid hostname setting.
After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.product.product_location %}. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)."

View File

@@ -35,6 +35,8 @@ Your certificate will also need Subject Alternative Names configured for the sub
You can generate a certificate signing request (CSR) for your instance using the `ghe-ssl-generate-csr` command. For more information, see "[Command-line utilities](/enterprise/admin/guides/installation/command-line-utilities/#ghe-ssl-generate-csr)."
Your key must be an RSA key and must not have a passphrase. For more information, see "[Removing the passphrase from your key file](/admin/guides/installation/troubleshooting-ssl-errors#removing-the-passphrase-from-your-key-file)".
## Uploading a custom TLS certificate
{% data reusables.enterprise_site_admin_settings.tls-downtime %}
@@ -50,11 +52,6 @@ You can generate a certificate signing request (CSR) for your instance using the
6. Under "Unencrypted key", click **Choose File** to choose an RSA key (in PEM format) to install. This file will usually have a *.key* extension.
![Button to find TLS key file](/assets/images/enterprise/management-console/install-tls-key.png)
{% warning %}
**Warning**: Your key must be an RSA key and must not have a passphrase. For more information, see "[Removing the passphrase from your key file](/admin/guides/installation/troubleshooting-ssl-errors#removing-the-passphrase-from-your-key-file)".
{% endwarning %}
{% data reusables.enterprise_management_console.save-settings %}
## About Let's Encrypt support

View File

@@ -6,6 +6,7 @@ redirect_from:
- /enterprise/admin/guides/installation/finding-the-current-github-enterprise-release
- /enterprise/admin/enterprise-management/upgrade-requirements
- /admin/enterprise-management/upgrade-requirements
- /enterprise/admin/guides/installation/about-upgrade-requirements
versions:
ghes: '*'
type: reference

View File

@@ -42,8 +42,8 @@ After you configure {% data variables.product.product_location %} to use {% data
Any VM that you use for {% data variables.product.prodname_dependabot %} runners must meet the requirements for self-hosted runners. In addition, they must meet the following requirements.
- Linux operating system
- Git installed
- Linux operating system{% ifversion ghes < 3.5 %}
- Git installed{% endif %}
- Docker installed with access for the runner users:
- We recommend installing Docker in rootless mode and configuring the runners to access Docker without `root` privileges.
- Alternatively, install Docker and give the runner users raised privileges to run Docker.
@@ -68,9 +68,9 @@ If you specify more than 14 concurrent runners on a VM, you must also update the
1. Provision self-hosted runners, at the repository, organization, or enterprise account level. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)" and "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
2. Set up the self-hosted runners with the requirements described above. For example, on a VM running Ubuntu 20.04 you would:
2. Set up the self-hosted runners with the requirements described above. For example, on a VM running Ubuntu 20.04 you would:{% ifversion ghes < 3.5 %}
- Verify that Git is installed: `command -v git`
- Verify that Git is installed: `command -v git`{% endif %}
- Install Docker and ensure that the runner users have access to Docker. For more information, see the Docker documentation.
- [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
- Recommended approach: [Run the Docker daemon as a non-root user (Rootless mode)](https://docs.docker.com/engine/security/rootless/)

View File

@@ -30,7 +30,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr
{% note %}
**Note:** You can only use a {% data variables.product.prodname_dotcom %}-hosted runner's tool cache for a self-hosted runner that has an identical operating system and architecture. For example, if you are using a `ubuntu-18.04` {% data variables.product.prodname_dotcom %}-hosted runner to generate a tool cache, your self-hosted runner must be a 64-bit Ubuntu 18.04 machine. For more information on {% data variables.product.prodname_dotcom %}-hosted runners, see "<a href="/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources" class="dotcom-only">Virtual environments for GitHub-hosted runners</a>."
**Note:** You can only use a {% data variables.product.prodname_dotcom %}-hosted runner's tool cache for a self-hosted runner that has an identical operating system and architecture. For example, if you are using a `ubuntu-18.04` {% data variables.product.prodname_dotcom %}-hosted runner to generate a tool cache, your self-hosted runner must be a 64-bit Ubuntu 18.04 machine. For more information on {% data variables.product.prodname_dotcom %}-hosted runners, see "[Virtual environments for GitHub-hosted runners](/free-pro-team@latest/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)."
{% endnote %}

View File

@@ -96,7 +96,9 @@ Before your developers can use {% data variables.product.prodname_ghe_cloud %} w
{% endnote %}
3. After you log in to your setup user, get started by configuring {% ifversion oidc-for-emu %}how your members will authenticate. If you are using Azure Active Directory as your identity provider, you can choose between OpenID Connect (OIDC) and Security Assertion Markup Language (SAML). Both options provide a seamless sign-in experience for your members, but only OIDC includes support for Conditional Access Policies (CAP). If you are using Okta as your identity provider, you can use SAML to authenticate your members.{% else %}SAML SSO for your enterprise. For more information, see "[Configuring SAML single sign-on for Enterprise Managed Users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)."{% endif %}
3. After you log in as the setup user, we recommend enabling two-factor authentication. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)."
1. To get started, configure {% ifversion oidc-for-emu %}how your members will authenticate. If you are using Azure Active Directory as your identity provider, you can choose between OpenID Connect (OIDC) and Security Assertion Markup Language (SAML). Both options provide a seamless sign-in experience for your members, but only OIDC includes support for Conditional Access Policies (CAP). If you are using Okta as your identity provider, you can use SAML to authenticate your members.{% else %}SAML SSO for your enterprise. For more information, see "[Configuring SAML single sign-on for Enterprise Managed Users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users)."{% endif %}
{% ifversion oidc-for-emu %}

View File

@@ -42,6 +42,15 @@ You set up the audit log stream on {% data variables.product.product_name %} by
### Setting up streaming to Amazon S3
{% ifversion streaming-oidc-s3 %}
You can set up streaming to S3 with access keys or, to avoid storing long-lived secrets in {% data variables.product.product_name %}, with OpenID Connect (OIDC).
- [Setting up streaming to S3 with access keys](#setting-up-streaming-to-s3-with-access-keys)
- [Setting up streaming to S3 with OpenID Connect](#setting-up-streaming-to-s3-with-openid-connect)
#### Setting up streaming to S3 with access keys
{% endif %}
To stream audit logs to Amazon's S3 endpoint, you must have a bucket and access keys. For more information, see [Creating, configuring, and working with Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) in the the AWS documentation. Make sure to block public access to the bucket to protect your audit log information.
To set up audit log streaming from {% data variables.product.prodname_dotcom %} you will need:
@@ -52,23 +61,70 @@ To set up audit log streaming from {% data variables.product.prodname_dotcom %}
For information on creating or accessing your access key ID and secret key, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html) in the AWS documentation.
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
1. Click **Configure stream** and select **Amazon S3**.
![Choose Amazon S3 from the drop-down menu](/assets/images/help/enterprises/audit-stream-choice-s3.png)
{% data reusables.audit_log.streaming-choose-s3 %}{% ifversion streaming-oidc-s3 %}
1. Under "Authentication", click **Access keys**.
1. On the configuration page, enter:
* The name of the bucket you want to stream to. For example, `auditlog-streaming-test`.
* Your access key ID. For example, `ABCAIOSFODNN7EXAMPLE1`.
* Your secret key. For example, `aBcJalrXUtnWXYZ/A1MDENG/zPxRfiCYEXAMPLEKEY`.
![Enter the stream settings](/assets/images/help/enterprises/audit-stream-add-s3.png)
1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Amazon S3 endpoint.
![Check the endpoint](/assets/images/help/enterprises/audit-stream-check.png)
![Screenshot of the authentication options for streaming to Amazon S3](/assets/images/help/enterprises/audit-log-streaming-s3-access-keys.png){% endif %}
1. Configure the stream settings.
- Under "Bucket", type the name of the bucket you want to stream to. For example, `auditlog-streaming-test`.
- Under "Access Key ID", type your access key ID. For example, `ABCAIOSFODNN7EXAMPLE1`.
- Under "Secret Key", type your secret key. For example, `aBcJalrXUtnWXYZ/A1MDENG/zPxRfiCYEXAMPLEKEY`.
{% data reusables.audit_log.streaming-check-s3-endpoint %}
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
{% ifversion streaming-oidc-s3 %}
#### Setting up streaming to S3 with OpenID Connect
1. In AWS, add the {% data variables.product.prodname_dotcom %} OIDC provider to IAM. For more information, see [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html) in the AWS documentation.
- For the provider URL, use `https://oidc-configuration.audit-log.githubusercontent.com`.
- For "Audience", use `sts.amazonaws.com`.
1. Create a bucket, and block public access to the bucket. For more information, see [Creating, configuring, and working with Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) in the AWS documentation.
1. Create a policy that allows {% data variables.product.company_short %} to write to the bucket. {% data variables.product.prodname_dotcom %} requires only the following permissions.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": "arn:aws:s3:::example-bucket/*"
}
]
}
```
For more information, see [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the AWS documentation.
1. Configure the role and trust policy for the {% data variables.product.prodname_dotcom %} IdP. For more information, see [Creating a role for web identity or OpenID Connect Federation (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) in the AWS documentation.
- Add the permissions policy you created above to allow writes to the bucket.
- Edit the trust relationship to add the `sub` field to the validation conditions, replacing `ENTERPRISE` with the name of your enterprise.
```
"Condition": {
"StringEquals": {
"oidc-configuration.audit-log.githubusercontent.com:aud": "sts.amazonaws.com",
"oidc-configuration.audit-log.githubusercontent.com:sub": "https://github.com/ENTERPRISE"
}
}
```
- Make note of the Amazon Resource Name (ARN) of the created role.
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
{% data reusables.audit_log.streaming-choose-s3 %}
1. Under "Authentication", click **OpenID Connect**.
![Screenshot of the authentication options for streaming to Amazon S3](/assets/images/help/enterprises/audit-log-streaming-s3-oidc.png)
1. Configure the stream settings.
- Under "Bucket", type the name of the bucket you want to stream to. For example, `auditlog-streaming-test`.
- Under "ARN Role" type the ARN role you noted earlier. For example, `arn:aws::iam::1234567890:role/github-audit-log-streaming-role`.
{% data reusables.audit_log.streaming-check-s3-endpoint %}
{% data reusables.enterprise.verify-audit-log-streaming-endpoint %}
{% endif %}
### Setting up streaming to Azure Blob Storage
Before setting up a stream in {% data variables.product.prodname_dotcom %}, you must first have created a storage account and a container in Microsoft Azure. For details, see the Microsoft documentation, "[Introduction to Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction)."

View File

@@ -105,9 +105,7 @@ Other modes of MinIO remain available with standard support.
minio/minio gateway nas /data
```
For more information, see "[MinIO Gateway for NAS](https://docs.min.io/docs/minio-gateway-for-nas.html)."
* Run MinIO using Docker as a cluster. This MinIO deployment uses several hosts and MinIO's erasure coding for the strongest data protection. To run MinIO in a cluster mode, see the "[Distributed MinIO Quickstart Guide](https://docs.min.io/docs/distributed-minio-quickstart-guide.html).
* Run MinIO using Docker as a cluster. This MinIO deployment uses several hosts and MinIO's erasure coding for the strongest data protection. To run MinIO in a cluster mode, see the "[Distributed MinIO Quickstart Guide](https://docs.min.io/docs/distributed-minio-quickstart-guide.html)."
## 3. Create your MinIO bucket for {% data variables.product.prodname_registry %}

View File

@@ -102,6 +102,7 @@ Across all organizations owned by your enterprise, you can allow members to crea
{% data reusables.enterprise-accounts.repo-creation-types %}
{% else %}
6. Under "Repository creation", use the drop-down menu and choose a policy.
![Drop-down menu with repository creation policies](/assets/images/enterprise/site-admin-settings/repository-creation-drop-down.png)
{% endif %}
@@ -114,7 +115,15 @@ Across all organizations owned by your enterprise, you can allow people with acc
{% data reusables.enterprise-accounts.repositories-tab %}
3. Under "Repository forking", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
4. Under "Repository forking", use the drop-down menu and choose a policy.
![Drop-down menu with repository forking policy options](/assets/images/help/business-accounts/repository-forking-policy-drop-down.png)
{% ifversion innersource-fork-policies %}
5. If forking is enabled, you can specify where users are allowed to fork repositories. Review the information about changing the setting and choose a policy.
![Screenshot showing the list of repository forking policy options](/assets/images/help/business-accounts/repository-forking-policy-settings.png)
{% endif %}
## Enforcing a policy for inviting{% ifversion ghec %} outside{% endif %} collaborators to repositories
@@ -125,6 +134,7 @@ Across all organizations owned by your enterprise, you can allow members to invi
{% data reusables.enterprise-accounts.repositories-tab %}
3. Under "Repository {% ifversion ghec %}outside collaborators{% elsif ghes or ghae %}invitations{% endif %}", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
4. Under "Repository {% ifversion ghec %}outside collaborators{% elsif ghes or ghae %}invitations{% endif %}", use the drop-down menu and choose a policy.
{% ifversion ghec %}
![Drop-down menu with outside collaborator invitation policy options](/assets/images/help/business-accounts/repository-invitation-policy-drop-down.png)
{% elsif ghes or ghae %}
@@ -180,6 +190,7 @@ Across all organizations owned by your enterprise, you can allow members with ad
{% data reusables.enterprise-accounts.policies-tab %}
3. On the **Repository policies** tab, under "Repository issue deletion", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
4. Under "Repository issue deletion", use the drop-down menu and choose a policy.
![Drop-down menu with issue deletion policy options](/assets/images/help/business-accounts/repository-issue-deletion-policy-drop-down.png)
{% ifversion ghes or ghae %}

View File

@@ -17,6 +17,13 @@ topics:
- Enterprise
- Licensing
---
{% ifversion ghec %}
{% data reusables.enterprise-accounts.dormant-user-release-phase %}
{% endif %}
## About dormant users
{% data reusables.enterprise-accounts.dormant-user-activity %}
{% ifversion ghes or ghae%}
@@ -52,9 +59,6 @@ topics:
{% endif %}
{% ifversion ghec %}
{% data reusables.enterprise-accounts.dormant-user-release-phase %}
## Downloading the dormant users report from your enterprise account
{% data reusables.enterprise-accounts.access-enterprise %}

View File

@@ -31,7 +31,7 @@ shortTitle: Export data from GitHub.com
{% data reusables.enterprise_migrations.fork-persistence %}
To export repository data from {% data variables.product.prodname_dotcom_the_website %}, use <a href="/rest/reference/migrations" class="dotcom-only">the Migrations API</a>.
To export repository data from {% data variables.product.prodname_dotcom_the_website %}, use [the Migrations API](/free-pro-team@latest/rest/reference/migrations).
The Migrations API is currently in a preview period, which means that the endpoints and parameters may change in the future.
## Generating a migration archive
@@ -40,9 +40,9 @@ The Migrations API is currently in a preview period, which means that the endpoi
1. Notify members of your organization that you'll be performing a migration. The export can take several minutes, depending on the number of repositories being exported. The full migration including import may take several hours so we recommend doing a trial run in order to determine how long the full process will take. For more information, see "[About Migrations](/enterprise/admin/migrations/about-migrations#types-of-migrations)."
2. Start a migration by sending a `POST` request to <a href="/rest/reference/migrations#start-an-organization-migration" class="dotcom-only">the migration endpoint</a>. You'll need:
2. Start a migration by sending a `POST` request to [the migration endpoint](/free-pro-team@latest/rest/reference/migrations#start-an-organization-migration). You'll need:
* Your access token for authentication.
* A [list of the repositories](/rest/reference/repos#list-organization-repositories) you want to migrate:
* A [list of the repositories](/free-pro-team@latest/rest/reference/repos#list-organization-repositories) you want to migrate:
```shell
curl -H "Authorization: token <em>GITHUB_ACCESS_TOKEN</em>" \
-X POST \
@@ -55,7 +55,7 @@ The Migrations API is currently in a preview period, which means that the endpoi
This request returns a unique `id` which represents your migration. You'll need it for subsequent calls to the Migrations API.
3. Send a `GET` request to <a href="/rest/reference/migrations#get-an-organization-migration-status" class="dotcom-only">the migration status endpoint</a> to fetch the status of a migration. You'll need:
3. Send a `GET` request to [the migration status endpoint](/free-pro-team@latest/rest/reference/migrations#get-an-organization-migration-status) to fetch the status of a migration. You'll need:
* Your access token for authentication.
* The unique `id` of the migration:
```shell
@@ -70,7 +70,7 @@ The Migrations API is currently in a preview period, which means that the endpoi
* `exported`, which means the migration finished successfully.
* `failed`, which means the migration failed.
4. After your migration has exported, download the migration archive by sending a `GET` request to <a href="/rest/reference/migrations#download-an-organization-migration-archive" class="dotcom-only">the migration download endpoint</a>. You'll need:
4. After your migration has exported, download the migration archive by sending a `GET` request to [the migration download endpoint](/free-pro-team@latest/rest/reference/migrations#download-an-organization-migration-archive). You'll need:
* Your access token for authentication.
* The unique `id` of the migration:
```shell
@@ -80,7 +80,7 @@ The Migrations API is currently in a preview period, which means that the endpoi
https://api.github.com/orgs/<em>orgname</em>/migrations/<em>id</em>/archive
```
5. The migration archive is automatically deleted after seven days. If you would prefer to delete it sooner, you can send a `DELETE` request to <a href="/rest/reference/migrations#delete-an-organization-migration-archive" class="dotcom-only">the migration archive delete endpoint</a>. You'll need:
5. The migration archive is automatically deleted after seven days. If you would prefer to delete it sooner, you can send a `DELETE` request to [the migration archive delete endpoint](/free-pro-team@latest/free-pro-team@latest/rest/reference/migrations#delete-an-organization-migration-archive). You'll need:
* Your access token for authentication.
* The unique `id` of the migration:
```shell

View File

@@ -128,7 +128,7 @@ After your migration is applied to your target instance and you have reviewed th
### Unlocking repositories from an organization on {% data variables.product.prodname_dotcom_the_website %}
To unlock the repositories on a {% data variables.product.prodname_dotcom_the_website %} organization, you'll send a `DELETE` request to <a href="/rest/reference/migrations#unlock-an-organization-repository" class="dotcom-only">the migration unlock endpoint</a>. You'll need:
To unlock the repositories on a {% data variables.product.prodname_dotcom_the_website %} organization, you'll send a `DELETE` request to [the migration unlock endpoint](/free-pro-team@latest/rest/reference/migrations#unlock-an-organization-repository). You'll need:
* Your access token for authentication
* The unique `id` of the migration
* The name of the repository to unlock

View File

@@ -67,7 +67,8 @@ When you want to use an {% data variables.product.prodname_oauth_app %} that int
| Organizations and teams | Organization and teams access allows apps to access and manage organization and team membership. |
| Personal user data | User data includes information found in your user profile, like your name, e-mail address, and location. |
| Repositories | Repository information includes the names of contributors, the branches you've created, and the actual files within your repository. Apps can request access for either public or private repositories on a user-wide level. |
| Repository delete | Apps can request to delete repositories that you administer, but they won't have access to your code. |
| Repository delete | Apps can request to delete repositories that you administer, but they won't have access to your code. |{% ifversion projects-oauth-scope %}
| Projects | Access to user and organization projects (beta). Apps can request either read/write or read only access. |{% endif %}
## Requesting updated permissions

View File

@@ -30,7 +30,7 @@ We strongly recommend using a time-based one-time password (TOTP) application to
{% ifversion fpt or ghec %}
If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you cannot configure 2FA for your {% data variables.product.prodname_managed_user %} account. 2FA should be configured through your identity provider.
If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you cannot configure 2FA for your {% data variables.product.prodname_managed_user %} account unless you're signed in as the setup user. For users other than the setup user, an administrator must configure 2FA on your identity provider (IdP).
{% endif %}

View File

@@ -54,4 +54,4 @@ children:
- /managing-billing-for-github-marketplace-apps
- /managing-billing-for-git-large-file-storage
- /setting-up-paid-organizations-for-procurement-companies
---

View File

@@ -11,12 +11,10 @@ shortTitle: Billing for 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. 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 are a student, or a maintainer of a popular open source project on {% data variables.product.company_short %}, you may be eligible for a free {% data variables.product.prodname_copilot %} subscription. If you are not eligible for a free subscription, a paid subscription is available.
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)".
## {% 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.
A free subscription for {% data variables.product.prodname_copilot %} is available to verified students, 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 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 for a student developer pack](/free-pro-team@latest/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack)."
A free subscription for {% data variables.product.prodname_copilot %} is available to verified students, 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 for a student developer pack](/free-pro-team@latest/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack)."

View File

@@ -11,18 +11,7 @@ shortTitle: Your GitHub Copilot subscription
## Setting up a trial of {% 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.
{% data reusables.user-settings.access_settings %}
1. In the "Code, planning and automation" section of the sidebar, click **{% octicon "copilot" aria-label="The copilot icon" %} GitHub Copilot**.
2. On the {% data variables.product.prodname_copilot %} settings page, click **Start your free trial**.
![Screenshot of GitHub Copilot settings with start your free trial button emphasized](/assets/images/help/copilot/copilot-settings-start-trial-button.png)
3. Choose whether you want to pay monthly or yearly, and click **Continue to get access to Copilot**.
- If your personal account meets the criteria for a free {% data variables.product.prodname_copilot %} subscription, you will automatically be taken to step 6.
![Screenshot of trial setup with Continue to get access to Copilot button emphasized](/assets/images/help/copilot/copilot-billing-cycle.png)
4. Confirm your payment details.
5. Select your preferences, then click **Save and get started**.
{% data reusables.copilot.signup-procedure %}
## Modifying your {% data variables.product.prodname_copilot %} subscription

View File

@@ -74,7 +74,7 @@ By default, the {% data variables.product.prodname_codeql_workflow %} uses the `
If you scan on push, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
{% ifversion fpt or ghes > 3.2 or ghae or ghec %}
Additionally, when an `on:push` scan returns results that can be mapped to an open pull request, these alerts will automatically appear on the pull request in the same places as other pull request alerts. The alerts are identified by comparing the existing analysis of the head of the branch to the analysis for the target branch. For more information on {% data variables.product.prodname_code_scanning %} alerts in pull requests, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
Additionally, when an `on:push` scan returns results that can be mapped to an open pull request, these alerts will automatically appear on the pull request in the same places as other pull request alerts. The alerts are identified by comparing the existing analysis of the head of the branch to the analysis for the target branch. For more information on {% data variables.product.prodname_code_scanning %} alerts in pull requests, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
{% endif %}
### Scanning pull requests
@@ -97,7 +97,7 @@ By default, only alerts with the severity level of `Error`{% ifversion fpt or gh
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
1. Under "Code scanning", to the right of "Check Failure", use the drop-down menu to select the level of severity you would like to cause a pull request check failure.
1. Under "Code scanning", to the right of "Check Failure", use the drop-down menu to select the level of severity you would like to cause a pull request check failure.
{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
![Check failure setting](/assets/images/help/repository/code-scanning-check-failure-setting.png)
{% else %}
@@ -280,7 +280,7 @@ jobs:
{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
## Configuring a category for the analysis
Use `category` to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. The category you specify in your workflow will be included in the SARIF results file.
Use `category` to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. The category you specify in your workflow will be included in the SARIF results file.
This parameter is particularly useful if you work with monorepos and have multiple SARIF files for different components of the monorepo.
@@ -289,7 +289,7 @@ This parameter is particularly useful if you work with monorepos and have multip
uses: {% data reusables.actions.action-codeql-action-analyze %}
with:
# Optional. Specify a category to distinguish between multiple analyses
# for the same tool and ref. If you don't use `category` in your workflow,
# for the same tool and ref. If you don't use `category` in your workflow,
# GitHub will generate a default category name for you
category: "my_category"
```
@@ -298,7 +298,7 @@ If you don't specify a `category` parameter in your workflow, {% data variables.
- The `.github/workflows/codeql-analysis.yml` workflow and the `analyze` action will produce the category `.github/workflows/codeql.yml:analyze`.
- The `.github/workflows/codeql-analysis.yml` workflow, the `analyze` action, and the `{language: javascript, os: linux}` matrix variables will produce the category `.github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux`.
The `category` value will appear as the `<run>.automationDetails.id` property in SARIF v2.1.0. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning#runautomationdetails-object)."
The `category` value will appear as the `<run>.automationDetails.id` property in SARIF v2.1.0. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning#runautomationdetails-object)."
Your specified category will not overwrite the details of the `runAutomationDetails` object in the SARIF file, if included.
@@ -321,13 +321,17 @@ To add one or more {% data variables.product.prodname_codeql %} query packs (bet
{% endnote %}
In the example below, `scope` is the organization or personal account that published the package. When the workflow runs, the three {% data variables.product.prodname_codeql %} query packs are downloaded from {% data variables.product.product_name %} and the default queries or query suite for each pack run. The latest version of `pack1` is downloaded as no version is specified. Version 1.2.3 of `pack2` is downloaded, as well as the latest version of `pack3` that is compatible with version 1.2.3.
In the example below, `scope` is the organization or personal account that published the package. When the workflow runs, the four {% data variables.product.prodname_codeql %} query packs are downloaded from {% data variables.product.product_name %} and the default queries or query suite for each pack run:
- The latest version of `pack1` is downloaded and all default queries are run.
- Version 1.2.3 of `pack2` is downloaded and all default queries are run.
- The latest version of `pack3` that is compatible with version 3.2.1 is downloaded and all queries are run.
- Version 4.5.6 of `pack4` is downloaded and only the queries found in `path/to/queries` are run.
``` yaml
- uses: {% data reusables.actions.action-codeql-action-init %}
with:
# Comma-separated list of packs to download
packs: scope/pack1,scope/pack2@1.2.3,scope/pack3@~1.2.3
packs: scope/pack1,scope/pack2@1.2.3,scope/pack3@~3.2.1,scope/pack4@4.5.6:path/to/queries
```
### Using queries in QL packs
@@ -360,7 +364,7 @@ In the following example, the `+` symbol ensures that the specified additional {
config-file: ./.github/codeql/codeql-config.yml
queries: +security-and-quality,octo-org/python-qlpack/show_ifs.ql@main
{%- ifversion codeql-packs %}
packs: +scope/pack1,scope/pack2@v1.2.3
packs: +scope/pack1,scope/pack2@1.2.3,scope/pack3@4.5.6:path/to/queries
{%- endif %}
```
@@ -397,16 +401,24 @@ You specify {% data variables.product.prodname_codeql %} query packs in an array
{% raw %}
``` yaml
packs:
packs:
# Use the latest version of 'pack1' published by 'scope'
- scope/pack1
# Use version 1.23 of 'pack2'
- scope/pack2@v1.2.3
# Use the latest version of 'pack3' compatible with 1.23
- scope/pack3@~1.2.3
- scope/pack1
# Use version 1.2.3 of 'pack2'
- scope/pack2@1.2.3
# Use the latest version of 'pack3' compatible with 3.2.1
- scope/pack3@~3.2.1
# Use pack4 and restrict it to queries found in the 'path/to/queries' directory
- scope/pack4:path/to/queries
# Use pack5 and restrict it to the query 'path/to/single/query.ql'
- scope/pack5:path/to/single/query.ql
# Use pack6 and restrict it to the query suite 'path/to/suite.qls'
- scope/pack6:path/to/suite.qls
```
{% endraw %}
The full format for specifying a query pack is `scope/name[@version][:path]`. Both `version` and `path` are optional. `version` is semver version range. If it is missing, the latest version is used. For more information about semver ranges, see the [semver docs on npm](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges).
If you have a workflow that generates more than one {% data variables.product.prodname_codeql %} database, you can specify any {% data variables.product.prodname_codeql %} query packs to run in a custom configuration file using a nested map of packs.
{% raw %}

View File

@@ -44,6 +44,7 @@ In contrast, malicious software, or malware, is code that is intentionally desig
Generally, we name our supported ecosystems after the software programming language's associated package registry. We review advisories if they are for a vulnerability in a package that comes from a supported registry.
- Composer (registry: https://packagist.org/)
- Erlang (registry: https://hex.pm/)
- Go (registry: https://pkg.go.dev/)
- Maven (registry: https://repo1.maven.org/maven2/org/)
- npm (registry: https://www.npmjs.com/)

View File

@@ -45,5 +45,5 @@ When the dependency graph is first enabled, any manifest and lock files for supp
## Further reading
{% ifversion ghec %}- "[Viewing insights for your organization](/organizations/collaborating-with-groups-in-organizations/viewing-insights-for-your-organization)"{% endif %}
- "[Viewing and updatng {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)"
- "[Viewing and updating {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)"
- "[Troubleshooting the detection of vulnerable dependencies](/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies)"

View File

@@ -10,6 +10,7 @@ redirect_from:
- /codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace
topics:
- Codespaces
type: how_to
---
## About machine types

View File

@@ -0,0 +1,104 @@
---
title: Configuring automatic deletion of your codespaces
shortTitle: Configure automatic deletion
intro: 'Unused codespaces are automatically deleted. You can choose how long your stopped codespaces are retained, up to a maximum of 30 days.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
topics:
- Codespaces
type: how_to
---
By default, {% data variables.product.prodname_codespaces %} are automatically deleted after they have been stopped and have remained inactive for 30 days.
However, because {% data variables.product.prodname_codespaces %} incur storage charges, you may prefer to reduce the retention period by changing your default period in your personal settings for {% data variables.product.prodname_github_codespaces %}. For more information about storage charges, see "[About billing for Codespaces](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)."
{% note %}
**Note**: Whether or not you have set a personal codespace retention period, it's a good idea to get into the habit of deleting codespaces that you no longer need. For more information, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
{% endnote %}
Automatic deletion happens irrespective of whether a codespace contains unpushed changes. To prevent automatic deletion of a codespace, just open the codespace again. The retention period is reset every time you connect to a codespace, and the retention countdown restarts when the codespace is stopped.
If a repository belongs to an organization, the organization admin may have set a retention period for the whole organization. If this period is less than the default retention period in your personal settings then the organization retention period will apply to codespaces you create for this repository. For more information, see "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
Each codespace has its own retention period. You may, therefore, have codespaces with different rentention periods. For example, if:
* You created a codespace, changed your default retention period, then created another codespace.
* You created a codespace from an organization-owned repository that has a retention period configured for the organization.
{% note %}
**Note**: The retention period is specified in days. A day represents a 24-hour period, beginning at the time of day when you stop a codespace.
{% endnote %}
{% webui %}
## Setting a default retention period for your codespaces
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.codespaces-tab %}
1. Under "Default retention period", enter the number of days for which you want your codespaces to be retained, by default, after they have been stopped.
![Selecting your retention period](/assets/images/help/codespaces/setting-default-retention.png)
You can set your default retention period between `0` and `30` days.
{% warning %}
**Warning**: Setting the period to `0` will result in your codespaces being immediately deleted when you stop them, or when they timeout due to inactivity. For more information, see "[Setting your timeout period for Codespaces](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces)."
{% endwarning %}
1. Click **Save**.
This default setting may be superseded by a shorter organization-level retention period.
If you set a retention period of more than a day, you'll be sent an email notification one day prior to its deletion.
## Checking the remaining time until autodeletion
You can check whether a codespace is due to be automatically deleted soon.
When an inactive codespace is approaching the end of its retention period, this is indicated in your list of codespaces on {% data variables.product.prodname_dotcom %} at [https://github.com/codespaces](https://github.com/codespaces).
![The pre-deletion message in the codespaces list on {% data variables.product.prodname_dotcom %}](/assets/images/help/codespaces/retention-deletion-message.png)
{% endwebui %}
{% cli %}
## Setting a retention period for a codespace
You can set your default retention period in your web browser, on {% data variables.product.prodname_dotcom_the_website %}. For more information, click the "Web browser" tab at the top of this article.
{% data reusables.cli.cli-learn-more %}
{% endcli %}
{% vscode %}
## Setting the retention period
You can set your default retention period in your web browser, on {% data variables.product.prodname_dotcom_the_website %}. For more information, click the "Web browser" tab at the top of this article.
## Checking whether codespaces will be autodeleted soon
You can check, in the {% data variables.product.prodname_vscode %} desktop application, whether a codespace is due to be automatically deleted soon.
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
1. Choose **{% data variables.product.prodname_github_codespaces %}** from the drop-down menu at the top right of the Remote Explorer, if it is not already selected.
1. Under "GITHUB CODESPACES," position the mouse pointer over the codespace that you're interested in. A pop-up box is displayed showing you information about the codespace.
If the codespace is nearing the end of its retention period, a line is included telling you when the codespace will be deleted.
![Codespace information showing the time until deletion](/assets/images/help/codespaces/vscode-deleting-in-5-days.png)
{% endvscode %}

View File

@@ -15,5 +15,6 @@ children:
- /setting-your-default-editor-for-codespaces
- /setting-your-default-region-for-codespaces
- /setting-your-timeout-period-for-codespaces
- /configuring-automatic-deletion-of-your-codespaces
---

View File

@@ -1,5 +1,6 @@
---
title: Personalizing Codespaces for your account
shortTitle: Personalize your codespaces
intro: 'You can personalize {% data variables.product.prodname_codespaces %} by using a `dotfiles` repository on {% data variables.product.product_name %} or by using Settings Sync.'
redirect_from:
- /github/developing-online-with-github-codespaces/personalizing-github-codespaces-for-your-account
@@ -14,7 +15,6 @@ topics:
- Set up
- Fundamentals
product: '{% data reusables.gated-features.codespaces %}'
shortTitle: Personalize your codespaces
---

View File

@@ -1,5 +1,6 @@
---
title: Setting your default editor for Codespaces
shortTitle: Set the default editor
intro: 'You can set your default editor for {% data variables.product.prodname_codespaces %} in your personal settings page.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
@@ -9,7 +10,7 @@ redirect_from:
- /codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces
topics:
- Codespaces
shortTitle: Set the default editor
type: how_to
---
On the settings page, you can set your editor preference so that any newly created codespaces are opened automatically in either {% data variables.product.prodname_vscode %} for Web or the {% data variables.product.prodname_vscode %} desktop application.

View File

@@ -1,5 +1,6 @@
---
title: Setting your default region for Codespaces
shortTitle: Set the default region
intro: 'You can set your default region in the {% data variables.product.prodname_github_codespaces %} profile settings page to personalize where your data is held.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
@@ -9,7 +10,7 @@ redirect_from:
- /codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces
topics:
- Codespaces
shortTitle: Set the default region
type: how_to
---
You can manually select the region that your codespaces will be created in, allowing you to meet stringent security and compliance requirements. By default, your region is set automatically, based on your location.

View File

@@ -1,5 +1,6 @@
---
title: Setting your timeout period for Codespaces
shortTitle: Set the timeout
intro: 'You can set your default timeout for {% data variables.product.prodname_codespaces %} in your personal settings page.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
@@ -7,7 +8,7 @@ versions:
ghec: '*'
topics:
- Codespaces
shortTitle: Set the timeout
type: how_to
---
A codespace will stop running after a period of inactivity. You can specify the length of this timeout period. The updated setting will apply to any newly created codespace.
@@ -22,7 +23,7 @@ Some organizations may have a maximum idle timeout policy. If an organization po
{% webui %}
## Setting your default timeout
## Setting your default timeout period
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.codespaces-tab %}
@@ -33,7 +34,7 @@ Some organizations may have a maximum idle timeout policy. If an organization po
{% cli %}
## Setting your timeout period
## Setting the timeout period for a codespace
{% data reusables.cli.cli-learn-more %}
@@ -46,3 +47,11 @@ gh codespace create --idle-timeout 90m
If you don't specify a timeout period when you create a codespace, then the default timeout period will be used. For information about setting a default timeout period, click the "Web browser" tab on this page. You can't currently specify a default timeout period through {% data variables.product.prodname_cli %}.
{% endcli %}
{% vscode %}
## Setting a timeout period
You can set your default timeout period in your web browser, on {% data variables.product.prodname_dotcom_the_website %}. Alternatively, if you use {% data variables.product.prodname_cli %} to create a codespace you can set a timeout period for that particular codespace. For more information, click the appropriate tab above.
{% endvscode %}

View File

@@ -26,16 +26,26 @@ includeGuides:
- /codespaces/developing-in-codespaces/using-source-control-in-your-codespace
- /codespaces/developing-in-codespaces/using-codespaces-for-pull-requests
- /codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace
- /codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace
- /codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces
- /codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account
- /codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces
- /codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces
- /codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces
- /codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces
- /codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces
- /codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces
- /codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces
- /codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces
- /codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces
- /codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization
- /codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces
- /codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization
- /codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces
- /codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces
- /codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types
- /codespaces/managing-codespaces-for-your-organization/retricting-the-idle-timeout-period
- /codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces
- /codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports
- /codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces
- /codespaces/codespaces-reference/understanding-billing-for-codespaces
- /codespaces/codespaces-reference/using-the-command-palette-in-codespaces
- /codespaces/codespaces-reference/disaster-recovery-for-codespaces

View File

@@ -16,6 +16,7 @@ children:
- /restricting-access-to-machine-types
- /restricting-the-visibility-of-forwarded-ports
- /restricting-the-idle-timeout-period
- /restricting-the-retention-period-for-codespaces
shortTitle: Managing your organization
---

View File

@@ -57,8 +57,8 @@ If you add an organization-wide policy, you should set it to the largest choice
![Edit the machine type constraint](/assets/images/help/codespaces/edit-machine-constraint.png)
{% data reusables.codespaces.codespaces-policy-targets %}
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
1. After you have finished adding constraints to your policy, click **Save**.
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)," "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)," and "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
1. After you've finished adding constraints to your policy, click **Save**.
## Editing a policy
You can edit an existing policy. For example, you may want to add or remove constraints to or from a policy.

View File

@@ -18,7 +18,7 @@ By default, codespaces time out after 30 minutes of inactivity. When a codespace
The personal settings of a {% data variables.product.prodname_dotcom %} user allow them to define their own timeout period for codespaces they create. This may be longer than the default 30-minute period. For more information, see "[Setting your timeout period for Codespaces](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces)."
As an organization owner, you may want to configure constraints on the maximum idle timeout period for codespaces owned by your organization. This can help you limit costs associated with codespaces that are left to timeout after long periods of inactivity. You can set a maximum timeout for all codespaces owned by your organization, or for the codespaces of specific repositories.
As an organization owner, you may want to configure constraints on the maximum idle timeout period for codespaces created for repositories owned by your organization. This can help you to limit costs associated with codespaces that are left to timeout after long periods of inactivity. You can set a maximum timeout for the codespaces for all repositories owned by your organization, or for the codespaces of specific repositories.
{% note %}
@@ -55,11 +55,11 @@ If you add an organization-wide policy with a timeout constraint, you should set
1. Enter the maximum number of minutes codespaces can remain inactive before they time out, then click **Save**.
![Choose the port visibility options](/assets/images/help/codespaces/maximum-minutes-timeout.png)
![Set the maximum timeout in minutes](/assets/images/help/codespaces/maximum-minutes-timeout.png)
{% data reusables.codespaces.codespaces-policy-targets %}
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)" and "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)."
1. After you have finished adding constraints to your policy, click **Save**.
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)," "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)," and "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
1. After you've finished adding constraints to your policy, click **Save**.
The policy will be applied to all new codespaces that are created, and to existing codespaces the next time they are started.

View File

@@ -0,0 +1,78 @@
---
title: Restricting the retention period for codespaces
shortTitle: Restrict the retention period
intro: 'You can set a maximum retention period for any codespaces owned by your organization.'
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'To manage retention constraints for an organization''s codespaces, you must be an owner of the organization.'
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
---
## Overview
{% data variables.product.prodname_codespaces %} are automatically deleted after they have been stopped and have remained inactive for a defined number of days. The retention period for each codespace is set when the codespace is created and does not change.
Everyone who has access to {% data variables.product.prodname_github_codespaces %} can configure a retention period for the codespaces they create. The initial setting for this retention period is 30 days. Individual users can set this period within the range 0-30 days. For more information, see "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)."
As an organization owner, you may want to configure constraints on the maximum retention period for codespaces created for the repositories owned by your organization. This can help you to limit the storage costs associated with codespaces that are stopped and then left unused until they are automatically deleted. For more information about storage charges, see "[About billing for Codespaces](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)." You can set a maximum retention period for all, or for specific, repositories owned by your organization.
### Setting organization-wide and repository-specific policies
When you create a policy, you choose whether it applies to all repositories in your organization, or only to specified repositories. If you create an organization-wide policy with a codespace retention constraint, then the retention constraints in any policies that are targeted at specific repositories should be shorter than the restriction configured for the entire organization, or they will have no effect. The shortest retention period - in an organization-wide policy, a policy targeted at specified repositories, or in someone's personal settings - is applied.
If you add an organization-wide policy with a retention constraint, you should set the retention period to the longest acceptable period. You can then add separate policies that set the maximum retention to a shorter period for specific repositories in your organization.
## Adding a policy to set a maximum codespace retention period
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.codespaces.codespaces-org-policies %}
1. Click **Add constraint** and choose **Retention period**.
![Add a constraint for retention periods](/assets/images/help/codespaces/add-constraint-dropdown-retention.png)
1. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the constraint.
![Edit the timeout constraint](/assets/images/help/codespaces/edit-timeout-constraint.png)
1. Enter the maximum number of days codespaces can remain stopped before they are automatically deleted, then click **Save**.
![Set the retention period in days](/assets/images/help/codespaces/maximum-days-retention.png)
{% note %}
**Notes**:
* A day, in this context, is a 24-hour period, beginning at the time of day when the codespace was stopped.
* The valid range is 0-30 days.
* Setting the period to `0` will result in codespaces being immediately deleted when they are stopped, or when they timeout due to inactivity.
{% endnote %}
{% data reusables.codespaces.codespaces-policy-targets %}
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)," "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)," and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
1. After you've finished adding constraints to your policy, click **Save**.
The policy will be applied to all new codespaces that are created.
## Editing a policy
You can edit an existing policy. For example, you may want to add or remove constraints to or from a policy.
The retention period constraint is only applied to codespaces when they are created. Editing a policy has no effect on existing codespaces.
1. Display the "Codespace policies" page. For more information, see "[Adding a policy to set a maximum codespace retention period](#adding-a-policy-to-set-a-maximum-codespace-retention-period)."
1. Click the name of the policy you want to edit.
1. Make the required changes then click **Save**.
## Deleting a policy
You can delete a policy at any time. Deleting a policy has no effect on existing codespaces.
1. Display the "Codespace policies" page. For more information, see "[Adding a policy to set a maximum codespace retention period](#adding-a-policy-to-set-a-maximum-codespace-retention-period)."
1. Click the delete button to the right of the policy you want to delete.
![The delete button for a policy](/assets/images/help/codespaces/policy-delete.png)

View File

@@ -54,8 +54,8 @@ If you add an organization-wide policy, you should set it to the most lenient vi
![Choose the port visibility options](/assets/images/help/codespaces/choose-port-visibility-options.png)
{% data reusables.codespaces.codespaces-policy-targets %}
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
1. After you have finished adding constraints to your policy, click **Save**.
1. If you want to add another constraint to the policy, click **Add constraint** and choose another constraint. For information about other constraints, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)," "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)," and "[Restricting the retention period for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)."
1. After you've finished adding constraints to your policy, click **Save**.
## Editing a policy
You can edit an existing policy. For example, you may want to add or remove constraints to or from a policy.

View File

@@ -115,4 +115,4 @@ You can enable or disable {% data variables.product.prodname_copilot %} for all
## Further reading
- [The {% data variables.product.prodname_copilot %} website](https://copilot.github.com/)
- [{% data variables.product.prodname_copilot %} Licensing Information for JetBrains Plugin](/free-pro-team@latest/copilot/overview-of-github-copilot/about-github-copilot.md#github-copilot-licensing-information-for-jetbrains-plugin)
- [{% data variables.product.prodname_copilot %} Licensing Information for JetBrains Plugin](/copilot/overview-of-github-copilot/about-github-copilot#github-copilot-licensing-information-for-jetbrains-plugin)

View File

@@ -17,7 +17,7 @@ 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.1 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation.
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 %}

View File

@@ -28,11 +28,11 @@ You are responsible for ensuring the security and quality of your code. We recom
## 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 and maintainers of popular open source projects on {% data variables.product.prodname_dotcom %} are eligible to use {% data variables.product.prodname_copilot %} for free. For all other {% data variables.product.prodname_dotcom %} customers, a one-time 60 day free trial is available, 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. Verified students 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 %} Licensing Information for JetBrains Plugin
{% data variables.product.prodname_dotcom %}, Inc. is the licensor of the JetBrains plugin. The end user license agreement for this plugin is the [{% data variables.product.prodname_dotcom %} Terms of Service](/free-pro-team@latest/site-policy/github-terms-of-service) and use of this plugin is subject to those terms. JetBrains has no responsibility or liability in connection with the plugin or such agreement. By using the plugin, you agree to the foregoing terms.
{% data variables.product.prodname_dotcom %}, Inc. is the licensor of the JetBrains plugin. The end user license agreement for this plugin is the [{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot) and use of this plugin is subject to those terms. JetBrains has no responsibility or liability in connection with the plugin or such agreement. By using the plugin, you agree to the foregoing terms.
## Further reading

View File

@@ -23,17 +23,7 @@ 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.
{% data reusables.user-settings.access_settings %}
1. In the "Code, planning, and automation" section of the sidebar, click **GitHub Copilot**.
2. On the {% data variables.product.prodname_copilot %} settings page, click **Start your free trial**.
![Screenshot of GitHub Copilot settings with start your free trial button emphasized](/assets/images/help/copilot/copilot-settings-start-trial-button.png)
3. Choose whether you want to pay monthly or yearly, and click **Continue to get access to Copilot**.
- If your personal account meets the criteria for a free {% data variables.product.prodname_copilot %} subscription instead of a trial, you will automatically be taken to step 6.
![Screenshot of trial setup with Continue to get access to Copilot button emphasized](/assets/images/help/copilot/copilot-billing-cycle.png)
4. Confirm your payment details.
5. Select your preferences, then click **Save and get started**.
{% data reusables.copilot.signup-procedure %}
## Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %}

View File

@@ -63,7 +63,9 @@ Name | Description
**`user`** | Grants read/write access to profile info only. Note that this scope includes `user:email` and `user:follow`.
&emsp;`read:user`| Grants access to read a user's profile data.
&emsp;`user:email`| Grants read access to a user's email addresses.
&emsp;`user:follow`| Grants access to follow or unfollow other users.
&emsp;`user:follow`| Grants access to follow or unfollow other users.{% ifversion projects-oauth-scope %}
**`project`** | Grants read/write access to user and organization projects (beta).
&emsp;`read:project`| Grants read only access to user and organization projects (beta).{% endif %}
**`delete_repo`** | Grants access to delete adminable repositories.
**`write:discussion`** | Allows read and write access for team discussions.
&emsp;`read:discussion` | Allows read access for team discussions.

View File

@@ -17,6 +17,12 @@ Setting {% data variables.product.prodname_codespaces %} as the preferred editor
For assignments with complex setup environments, teachers can customize the dev container configuration for a repository's codespaces. This ensures that when a student creates a codespace, it automatically opens with the development environment configured by the teacher. For more information on dev containers, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)."
{% note %}
**Note**: Individual codespaces are automatically deleted if they are stopped and left unused for a prolonged period. For more information, see "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)."
{% endnote %}
## About the {% data variables.product.prodname_codespaces %} Education benefit for verified teachers
The {% data variables.product.prodname_codespaces %} Education benefit gives verified teachers a free monthly allowance of {% data variables.product.prodname_codespaces %} hours to use in {% data variables.product.prodname_classroom %}. The free allowance is estimated to be enough for a class of 50 with 5 assignments per month, on a 2 core machine with 1 codespace stored per student.

View File

@@ -47,6 +47,10 @@ In a wide browser window, the word "Enterprise" immediately follows the {% data
![Screenshot of address bar and {% data variables.product.prodname_ghe_server %} header in a browser](/assets/images/help/docs/header-ghes.png)
You can view the version of {% data variables.product.prodname_ghe_server %} that you're using in the footer of any page.
![Screenshot of the footer of {% data variables.product.prodname_ghe_server %}, with the version highlighted](/assets/images/help/docs/ghes-version-in-footer.png)
### {% data variables.product.prodname_ghe_managed %}
If you access {% data variables.product.prodname_dotcom %} at `https://*.githubenterprise.com`, `https://*.github.us`, or `https://*.ghe.com`, you're using {% data variables.product.prodname_ghe_managed %}.

View File

@@ -106,14 +106,14 @@ In addition to the features available with {% data variables.product.prodname_te
- {% data variables.contact.enterprise_support %}. For more information, see "<a href="/articles/github-enterprise-cloud-support" class="dotcom-only">{% data variables.product.prodname_ghe_cloud %} support</a>" and "<a href="/articles/github-enterprise-cloud-addendum" class="dotcom-only">{% data variables.product.prodname_ghe_cloud %} Addendum</a>."
- 50,000 {% data variables.product.prodname_actions %} minutes
- 50GB {% data variables.product.prodname_registry %} storage
- Access control for {% data variables.product.prodname_pages %} sites. For more information, see <a href="/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site" class="dotcom-only">Changing the visibility of your {% data variables.product.prodname_pages %} site</a>"
- Access control for {% data variables.product.prodname_pages %} sites. For more information, see "[Changing the visibility of your {% data variables.product.prodname_pages %} site](/enterprise-cloud@latest/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site)."
- A service level agreement for 99.9% monthly uptime
- The option to configure your enterprise for {% data variables.product.prodname_emus %}, so you can provision and manage members with your identity provider and restrict your member's contributions to just your enterprise. For more information, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)."
- The option to centrally manage policy and billing for multiple {% data variables.product.prodname_dotcom_the_website %} organizations with an enterprise account. For more information, see "[About enterprise accounts](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts)."
{% data variables.product.company_short %} bills for {% data variables.product.prodname_ghe_cloud %} on a per-user basis. For more information, see "[About per-user pricing]({% ifversion not ghec %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/about-per-user-pricing){% ifversion ghec %}."{% else %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %}
You can set up a trial to evaluate {% data variables.product.prodname_ghe_cloud %}. For more information, see "<a href="/articles/setting-up-a-trial-of-github-enterprise-cloud" class="dotcom-only">Setting up a trial of {% data variables.product.prodname_ghe_cloud %}</a>."
You can set up a trial to evaluate {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Setting up a trial of {% data variables.product.prodname_ghe_cloud %}](/enterprise-cloud@latest/articles/setting-up-a-trial-of-github-enterprise-cloud)."
For more information about hosting your own instance of {% data variables.product.prodname_ghe_server %}, including setting up a trial, see "[About {% data variables.product.prodname_ghe_server %}](/enterprise-server/admin/overview/about-github-enterprise-server)."

View File

@@ -21,7 +21,7 @@ topics:
{% ifversion fpt or ghec %}
You can store a variety of projects in {% data variables.product.prodname_dotcom %} repositories, including open source projects. With open source projects, you can share code to make better, more reliable software. You can use repositories to collaborate with others and track your work. For more information, see "[About repositories](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-repositories)." To learn more about open source projects, visit [OpenSource.org](http://opensource.org/about).
You can store a variety of projects in {% data variables.product.prodname_dotcom %} repositories, including open source projects. With open source projects, you can share code to make better, more reliable software. You can use repositories to collaborate with others and track your work. For more information, see "[About repositories](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-repositories)." To learn more about open source projects, visit [OpenSource.org](https://opensource.org/about).
{% elsif ghes or ghae %}

View File

@@ -33,7 +33,7 @@ Trials are also available for {% data variables.product.prodname_ghe_server %}.
## About trials of {% data variables.product.prodname_ghe_cloud %}
You can set up a 30-day trial to evaluate {% data variables.product.prodname_ghe_cloud %}. You do not need to provide a payment method during the trial unless you add {% data variables.product.prodname_marketplace %} apps to your organization that require a payment method. For more information, see "<a href="/articles/about-billing-for-github-marketplace/" class="dotcom-only">About billing for {% data variables.product.prodname_marketplace %}</a>."
You can set up a 30-day trial to evaluate {% data variables.product.prodname_ghe_cloud %}. You do not need to provide a payment method during the trial unless you add {% data variables.product.prodname_marketplace %} apps to your organization that require a payment method. For more information, see "[About billing for {% data variables.product.prodname_marketplace %}](/enterprise-cloud@latest/articles/about-billing-for-github-marketplace/)."
Your trial includes 50 seats. If you need more seats to evaluate {% data variables.product.prodname_ghe_cloud %}, contact {% data variables.contact.contact_enterprise_sales %}. At the end of the trial, you can choose a different number of seats.
@@ -45,7 +45,7 @@ For more information, see "[About identity and access management with SAML singl
## Setting up your trial of {% data variables.product.prodname_ghe_cloud %}
Before you can try {% data variables.product.prodname_ghe_cloud %}, you must be signed into a personal account. If you don't already have a personal account on {% data variables.product.prodname_dotcom_the_website %}, you must create one. For more information, see "<a href="/articles/signing-up-for-a-new-github-account" class="dotcom-only">Signing up for a new {% data variables.product.prodname_dotcom %} account</a>."
Before you can try {% data variables.product.prodname_ghe_cloud %}, you must be signed into a personal account. If you don't already have a personal account on {% data variables.product.prodname_dotcom_the_website %}, you must create one. For more information, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/free-pro-team@latest/articles/signing-up-for-a-new-github-account)."
1. Navigate to [{% data variables.product.prodname_dotcom %} for enterprises](https://github.com/enterprise).
1. Click **Start a free trial**.

View File

@@ -32,6 +32,22 @@ $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \
![Math expression as a block rendering](/assets/images/help/writing/math-expression-as-a-block-rendering.png)
{% ifversion math-fenced-blocks %}
Alternatively, you can use the <code>\`\`\`math</code> code block syntax to display a math expression as a block. With this syntax, you don't need to use `$$` delimiters.
````
**Here is some math!**
```math
\sqrt{3}
```
````
![Math expression in a fenced code block](/assets/images/help/writing/math-expression-as-a-fenced-code-block.png)
{% endif %}
## Writing dollar signs in line with and within mathematical expressions
To display a dollar sign as a character in the same line as a mathematical expression, you need to escape the non-delimiter `$` to ensure the line renders correctly.

View File

@@ -15,6 +15,8 @@ topics:
{% data reusables.projects.projects-beta %}
{% data reusables.projects.graphql-deprecation %}
## Introduction
You can add automation to help manage your project. Projects (beta) includes built-in workflows that you can configure through the UI. Additionally, you can write custom workflows with the GraphQL API and {% data variables.product.prodname_actions %}.
@@ -89,23 +91,32 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
projectV2(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
- name: Add PR to project
env:
@@ -114,14 +125,14 @@ jobs:
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $pr:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
projectNextItem {
addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Get date
run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
@@ -137,34 +148,39 @@ jobs:
$status_field: ID!
$status_value: String!
$date_field: ID!
$date_value: String!
$date_value: Date!
) {
set_status: updateProjectNextItemField(input: {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: $status_value
value: {
singleSelectOptionId: $status_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
set_date_posted: updateProjectNextItemField(input: {
set_date_posted: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $date_field
value: $date_value
value: {
date: $date_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value={% raw %}${{ env.TODO_OPTION_ID }}{% endraw %} -f date_field=$DATE_FIELD_ID -f date_value=$DATE --silent
```
### Example workflow authenticating with a personal access token
1. Create a personal access token with `org:write` scope. For more information, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
1. Create a personal access token with the `project` and `repo` scopes. For more information, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
2. Save the personal access token as a secret in your repository or organization.
3. In the following workflow, replace `YOUR_TOKEN` with the name of the secret. Replace `YOUR_ORGANIZATION` with the name of your organization. For example, `octo-org`. Replace `YOUR_PROJECT_NUMBER` with your project number. To find the project number, look at the project URL. For example, `https://github.com/orgs/octo-org/projects/5` has a project number of 5.
@@ -187,23 +203,32 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
projectV2(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
- name: Add PR to project
env:
@@ -212,14 +237,14 @@ jobs:
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $pr:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
projectNextItem {
addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Get date
run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
@@ -235,25 +260,29 @@ jobs:
$status_field: ID!
$status_value: String!
$date_field: ID!
$date_value: String!
$date_value: Date!
) {
set_status: updateProjectNextItemField(input: {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: $status_value
value: {
singleSelectOptionId: $status_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
set_date_posted: updateProjectNextItemField(input: {
set_date_posted: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $date_field
value: $date_value
value: {
date: $date_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
@@ -352,23 +381,34 @@ Replace <code>YOUR_PROJECT_NUMBER</code> with your project number. To find the p
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
projectV2(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
```
</td>
<td>
Uses <a href="https://cli.github.com/manual/">{% data variables.product.prodname_cli %}</a> to query the API for the ID of the project and for the ID, name, and settings for the first 20 fields in the project. The response is stored in a file called <code>project_data.json</code>.
<p>Uses <a href="https://cli.github.com/manual/">{% data variables.product.prodname_cli %}</a> to query the API for the ID of the project and return the name and ID of the first 20 fields in the project. <code>fields</code> returns a union and the query uses inline fragments (<code>... on</code>) to return information about any <code>ProjectV2Field</code> and <code>ProjectV2SingleSelectField</code> fields.</p>
<p>The response is stored in a file called <code>project_data.json</code>.</p>
</td>
</tr>
@@ -376,18 +416,18 @@ Uses <a href="https://cli.github.com/manual/">{% data variables.product.prodname
<td>
```yaml
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
```
</td>
<td>
Parses the response from the API query and stores the relevant IDs as environment variables. Modify this to get the ID for different fields or options. For example:
<ul>
<li>To get the ID of a field called <code>Team</code>, add <code>echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV</code>.</li>
<li>To get the ID of an option called <code>Octoteam</code> for the <code>Team</code> field, add <code>echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Team") |.settings | fromjson.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV</code></li>
<li>To get the ID of a field called <code>Team</code>, add <code>echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV</code>.</li>
<li>To get the ID of an option called <code>Octoteam</code> for the <code>Team</code> single select field, add <code>echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV</code></li>
</ul>
<strong>Note: </strong>This workflow assumes that you have a project with a single select field called "Status" that includes an option called "Todo" and a date field called "Date posted". You must modify this section to match the fields that are present in your table.
</td>
@@ -425,12 +465,12 @@ Sets environment variables for this step. <code>GITHUB_TOKEN</code> is described
```yaml
item_id="$( gh api graphql -f query='
mutation($project:ID!, $pr:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
projectNextItem {
addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')"
```
</td>
@@ -500,25 +540,29 @@ gh api graphql -f query='
$status_field: ID!
$status_value: String!
$date_field: ID!
$date_value: String!
$date_value: Date!
) {
set_status: updateProjectNextItemField(input: {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: $status_value
value: {
singleSelectOptionId: $status_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
set_date_posted: updateProjectNextItemField(input: {
set_date_posted: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $date_field
value: $date_value
value: {
date: $date_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}

View File

@@ -11,6 +11,8 @@ topics:
- Projects
---
{% data reusables.projects.graphql-deprecation %}
This article demonstrates how to use the GraphQL API to manage a project. For more information about how to use the API in a {% data variables.product.prodname_actions %} workflow, see "[Automating projects (beta)](/issues/trying-out-the-new-projects-experience/automating-projects)." For a full list of the available data types, see "[Reference](/graphql/reference)."
{% data reusables.projects.projects-beta %}
@@ -19,7 +21,7 @@ This article demonstrates how to use the GraphQL API to manage a project. For mo
{% curl %}
In all of the following cURL examples, replace `TOKEN` with a token that has the `read:org` scope (for queries) or `write:org` scope (for queries and mutations). The token can be a personal access token for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a personal access token, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
In all of the following cURL examples, replace `TOKEN` with a token that has the `read:project` scope (for queries) or `project` scope (for queries and mutations). The token can be a personal access token for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a personal access token, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
{% endcurl %}
@@ -27,7 +29,7 @@ In all of the following cURL examples, replace `TOKEN` with a token that has the
{% data reusables.cli.cli-learn-more %}
Before running {% data variables.product.prodname_cli %} commands, you must authenticate by running `gh auth login --scopes "write:org"`. If you only need to read, but not edit, projects, you can omit the `--scopes` argument. For more information on command line authentication, see "[gh auth login](https://cli.github.com/manual/gh_auth_login)."
Before running {% data variables.product.prodname_cli %} commands, you must authenticate by running `gh auth login --scopes "project"`. If you only need to read, but not edit, projects, you can provide the `read:project` scope instead of `project`. For more information on command line authentication, see "[gh auth login](https://cli.github.com/manual/gh_auth_login)."
{% endcli %}
@@ -43,7 +45,7 @@ my_num=5
gh api graphql -f query='
query($organization: String! $number: Int!){
organization(login: $organization){
projectNext(number: $number) {
projectV2(number: $number) {
id
}
}
@@ -69,7 +71,7 @@ You can find the node ID of an organization project if you know the organization
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"query{organization(login: \"<em>ORGANIZATION</em>\") {projectNext(number: <em>NUMBER</em>){id}}}"}'
--data '{"query":"query{organization(login: \"<em>ORGANIZATION</em>\") {projectV2(number: <em>NUMBER</em>){id}}}"}'
```
{% endcurl %}
@@ -78,7 +80,7 @@ curl --request POST \
gh api graphql -f query='
query{
organization(login: "<em>ORGANIZATION</em>"){
projectNext(number: <em>NUMBER</em>) {
projectV2(number: <em>NUMBER</em>) {
id
}
}
@@ -93,7 +95,7 @@ You can also find the node ID of all projects in your organization. The followin
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"{organization(login: \"<em>ORGANIZATION</em>\") {projectsNext(first: 20) {nodes {id title}}}}"}'
--data '{"query":"{organization(login: \"<em>ORGANIZATION</em>\") {projectsV2(first: 20) {nodes {id title}}}}"}'
```
{% endcurl %}
@@ -102,7 +104,7 @@ curl --request POST \
gh api graphql -f query='
query{
organization(login: "<em>ORGANIZATION</em>") {
projectsNext(first: 20) {
projectsV2(first: 20) {
nodes {
id
title
@@ -113,7 +115,7 @@ gh api graphql -f query='
```
{% endcli %}
### Finding the node ID of a user project
### Finding the node ID of a user project
To update your project through the API, you will need to know the node ID of the project.
@@ -124,7 +126,7 @@ You can find the node ID of a user project if you know the project number. Repla
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"query{user(login: \"<em>USER</em>\") {projectNext(number: <em>NUMBER</em>){id}}}"}'
--data '{"query":"query{user(login: \"<em>USER</em>\") {projectV2(number: <em>NUMBER</em>){id}}}"}'
```
{% endcurl %}
@@ -133,7 +135,7 @@ curl --request POST \
gh api graphql -f query='
query{
user(login: "<em>USER</em>"){
projectNext(number: <em>NUMBER</em>) {
projectV2(number: <em>NUMBER</em>) {
id
}
}
@@ -148,7 +150,7 @@ You can also find the node ID for all of your projects. The following example wi
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"{user(login: \"<em>USER</em>\") {projectsNext(first: 20) {nodes {id title}}}}"}'
--data '{"query":"{user(login: \"<em>USER</em>\") {projectsV2(first: 20) {nodes {id title}}}}"}'
```
{% endcurl %}
@@ -157,7 +159,7 @@ curl --request POST \
gh api graphql -f query='
query{
user(login: "<em>USER</em>") {
projectsNext(first: 20) {
projectsV2(first: 20) {
nodes {
id
title
@@ -172,14 +174,14 @@ gh api graphql -f query='
To update the value of a field, you will need to know the node ID of the field. Additionally, you will need to know the ID of the options for single select fields and the ID of the iterations for iteration fields.
The following example will return the ID, name, and settings for the first 20 fields in a project. Replace `PROJECT_ID` with the node ID of your project.
The following example will return the ID, name, settings, and configuration for the first 20 fields in a project. Replace `PROJECT_ID` with the node ID of your project.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"query{node(id: \"<em>PROJECT_ID</em>\") {... on ProjectNext {fields(first: 20) {nodes {id name settings}}}}}"}'
--data '{"query":"query{ node(id: \"<em>PROJECT_ID</em>\") { ... on ProjectV2 { fields(first: 20) { nodes { ... on ProjectV2Field { id name } ... on ProjectV2IterationField { id name configuration { iterations { startDate id }}} ... on ProjectV2SingleSelectField { id name options { id name }}}}}}}"}'
```
{% endcurl %}
@@ -187,18 +189,37 @@ curl --request POST \
```shell
gh api graphql -f query='
query{
node(id: "<em>PROJECT_ID</em>") {
... on ProjectNext {
fields(first: 20) {
nodes {
node(id: "<em>PROJECT_ID</em>") {
... on ProjectV2 {
fields(first: 20) {
nodes {
... on ProjectV2Field {
id
name
settings
}
... on ProjectV2IterationField {
id
name
configuration {
iterations {
startDate
id
}
}
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}'
}
}'
```
{% endcli %}
@@ -211,24 +232,42 @@ The response will look similar to the following example:
"fields": {
"nodes": [
{
"id": "MDE2OlByb2plY3ROZXh0RmllbGQxMzE1OQ==",
"name": "Title",
"settings": "null"
"id": "PVTF_lADOANN5s84ACbL0zgBZrZY",
"name": "Title"
},
{
"id": "MDE2OlByb2plY3ROZXh0RmllbGQxMzE2MA==",
"name": "Assignees",
"settings": "null"
"id": "PVTF_lADOANN5s84ACbL0zgBZrZc",
"name": "Assignees"
},
{
"id": "MDE2OlByb2plY3ROZXh0RmllbGQxMzE2MQ==",
"id": "PVTSSF_lADOANN5s84ACbL0zgBZrZg",
"name": "Status",
"settings": "{\"options\":[{\"id\":\"f75ad846\",\"name\":\"Todo\",\"name_html\":\"Todo\"},{\"id\":\"47fc9ee4\",\"name\":\"In Progress\",\"name_html\":\"In Progress\"},{\"id\":\"98236657\",\"name\":\"Done\",\"name_html\":\"Done\"}]}"
"options": [
{
"id": "f75ad846",
"name": "Todo"
},
{
"id": "47fc9ee4",
"name": "In Progress"
},
{
"id": "98236657",
"name": "Done"
}
]
},
{
"id": "MDE2OlByb2plY3ROZXh0RmllbGQ3NTEwNw==",
"id": "PVTIF_lADOANN5s84ACbL0zgBah28",
"name": "Iteration",
"settings": "{\"configuration\":{\"duration\":7,\"start_day\":5,\"iterations\":[{\"id\":\"c4d8e84d\",\"title\":\"Iteration 2\",\"duration\":7,\"start_date\":\"2021-10-08\",\"title_html\":\"Iteration 2\"},{\"id\":\"fafa9c9f\",\"title\":\"Iteration 3\",\"duration\":7,\"start_date\":\"2021-10-15\",\"title_html\":\"Iteration 3\"}],\"completed_iterations\":[{\"id\":\"fa62c118\",\"title\":\"Iteration 1\",\"duration\":7,\"start_date\":\"2021-10-01\",\"title_html\":\"Iteration 1\"}]}}"
"configuration": {
"iterations": [
{
"startDate": "2022-05-29",
"id": "cfc16e4d"
}
]
}
}
]
}
@@ -237,26 +276,86 @@ The response will look similar to the following example:
}
```
Each field has an ID. Additionally, single select fields and iteration fields have a `settings` value. In the single select settings, you can find the ID of each option for the single select. In the iteration settings, you can find the duration of the iteration, the start day of the iteration (from 1 for Monday to 7 for Sunday), the list of incomplete iterations, and the list of completed iterations. For each iteration in the lists of iterations, you can find the ID, title, duration, and start date of the iteration.
Each field has an ID and name. Single select fields are returned as a `ProjectV2SingleSelectField` object and have an `options` field where you can find the ID of each option for the single select. Iteration fields are returned as a `ProjectV2IterationField` object and have a `configuration` field which includes an `iterations` field containing the ID and information about each iteration.
### Finding information about items in a project
You can query the API to find information about items in your project.
{% note %}
**Note**: The API will not return information about draft issues.
{% endnote %}
The following example will return the title and ID for the first 20 items in a project. For each item, it will also return the value and name for the first 8 fields in the project. If the item is an issue or pull request, it will return the login of the first 10 assignees. Replace `PROJECT_ID` with the node ID of your project.
If you just need the name and ID of a field, and do not need information about iterations or a single select field's options, you can make use of the `ProjectV2FieldCommon` object.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"query{node(id: \"<em>PROJECT_ID</em>\") {... on ProjectNext {items(first: 20) {nodes{title id fieldValues(first: 8) {nodes{value projectField{name}}} content{...on Issue {assignees(first: 10) {nodes{login}}} ...on PullRequest {assignees(first: 10) {nodes{login}}}}}}}}}"}'
--data '{"query":"query{ node(id: \"<em>PROJECT_ID</em>\") { ... on ProjectV2 { fields(first: 20) { nodes { ... on ProjectV2FieldCommon { id name }}}}}}"}'
```
{% endcurl %}
{% cli %}
```shell
gh api graphql -f query='
query{
node(id: "<em>PROJECT_ID</em>") {
... on ProjectV2 {
fields(first: 20) {
nodes {
... on ProjectV2FieldCommon {
id
name
}
}
}
}
}
}
```
{% endcli %}
The response when using the `ProjectV2FieldCommon` object will look similar to the following example:
```json
{
"data": {
"node": {
"fields": {
"nodes": [
{
"__typename": "ProjectV2Field",
"id": "PVTF_lADOANN5s84ACbL0zgBZrZY",
"name": "Title"
},
{
"__typename": "ProjectV2Field",
"id": "PVTF_lADOANN5s84ACbL0zgBZrZc",
"name": "Assignees"
},
{
"__typename": "ProjectV2SingleSelectField",
"id": "PVTSSF_lADOANN5s84ACbL0zgBZrZg",
"name": "Status"
},
{
"__typename": "ProjectV2IterationField",
"id": "PVTIF_lADOANN5s84ACbL0zgBah28",
"name": "Iteration"
}
]
}
}
}
}
```
### Finding information about items in a project
You can query the API to find information about items in your project.
The following example will return the first 20 issues, pull requests, and draft issues in a project. For issues and pull requests, it will also return title and the first 10 assignees. For draft issue, it will return the title and body. The example will also return the field name and value for any text, date, or single select fields in the first 8 fields of the project. Replace `PROJECT_ID` with the node ID of your project.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"query{ node(id: \"<em>PROJECT_ID</em>\") { ... on ProjectV2 { items(first: 20) { nodes{ id fieldValues(first: 8) { nodes{ ... on ProjectV2ItemFieldTextValue { text field { ... on ProjectV2FieldCommon { name }}} ... on ProjectV2ItemFieldDateValue { date field { ... on ProjectV2FieldCommon { name } } } ... on ProjectV2ItemFieldSingleSelectValue { name field { ... on ProjectV2FieldCommon { name }}}}} content{ ... on DraftIssue { title body } ...on Issue { title assignees(first: 10) { nodes{ login }}} ...on PullRequest { title assignees(first: 10) { nodes{ login }}}}}}}}}"}'
```
{% endcurl %}
@@ -265,31 +364,57 @@ curl --request POST \
gh api graphql -f query='
query{
node(id: "<em>PROJECT_ID</em>") {
... on ProjectNext {
items(first: 20) {
nodes{
title
id
fieldValues(first: 8) {
nodes{
value
projectField{
name
}
... on ProjectV2 {
items(first: 20) {
nodes{
id
fieldValues(first: 8) {
nodes{
... on ProjectV2ItemFieldTextValue {
text
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldDateValue {
date
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldSingleSelectValue {
name
field {
... on ProjectV2FieldCommon {
name
}
}
}
}
}
}
content{
...on Issue {
assignees(first: 10) {
nodes{
login
content{
... on DraftIssue {
title
body
}
...on Issue {
title
assignees(first: 10) {
nodes{
login
}
}
}
}
...on PullRequest {
assignees(first: 10) {
nodes{
login
...on PullRequest {
title
assignees(first: 10) {
nodes{
login
}
}
}
}
@@ -297,29 +422,19 @@ gh api graphql -f query='
}
}
}
}
}'
}'
```
{% endcli %}
A project may contain items that a user does not have permission to view. In this case, the response will include a redacted item.
A project may contain items that a user does not have permission to view. In this case, the item type will be returned as `REDACTED`.
```shell
{
"node": {
"title": "You can't see this item",
...
}
}
```
## Updating projects
## Updating projects
Use mutations to update projects. For more information, see "[About mutations]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql#about-mutations)."
{% note %}
**Note:** You cannot add and update an item in the same call. You must use `addProjectNextItem` to add the item and then use `updateProjectNextItemField` to update the item.
**Note:** You cannot add and update an item in the same call. You must use `addProjectV2ItemById` to add the item and then use `updateProjectV2ItemFieldValue` to update the item.
{% endnote %}
@@ -332,7 +447,7 @@ The following example will add an issue or pull request to your project. Replace
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {addProjectNextItem(input: {projectId: \"<em>PROJECT_ID</em>\" contentId: \"<em>CONTENT_ID</em>\"}) {projectNextItem {id}}}"}'
--data '{"query":"mutation {addProjectV2ItemById(input: {projectId: \"<em>PROJECT_ID</em>\" contentId: \"<em>CONTENT_ID</em>\"}) {item {id}}}"}'
```
{% endcurl %}
@@ -340,8 +455,8 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
addProjectNextItem(input: {projectId: "<em>PROJECT_ID</em>" contentId: "<em>CONTENT_ID</em>"}) {
projectNextItem {
addProjectV2ItemById(input: {projectId: "<em>PROJECT_ID</em>" contentId: "<em>CONTENT_ID</em>"}) {
item {
id
}
}
@@ -354,9 +469,9 @@ The response will contain the node ID of the newly created item.
```json
{
"data": {
"addProjectNextItem": {
"projectNextItem": {
"id": "MDE1OlByb2plY3ROZXh0SXRlbTM0MjEz"
"addProjectV2ItemById": {
"item": {
"id": "PVTI_lADOANN5s84ACbL0zgBVd94"
}
}
}
@@ -365,16 +480,16 @@ The response will contain the node ID of the newly created item.
If you try to add an item that already exists, the existing item ID is returned instead.
### Updating a project's settings
### Adding a draft issue to a project
The following example will update your project's settings. Replace `PROJECT_ID` with the node ID of your project. Set `public` to `true` to make your project public on {% data variables.product.product_name %}. Modify `description` to make changes to your project's README.
The following example will add a draft issue to your project. Replace `PROJECT_ID` with the node ID of your project. Replace `TITLE` and `BODY` with the content you want for the new draft issue.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation { updateProjectNext(input: { projectId: \"<em>PROJECT_ID</em>\", title: \"Project title\", public: false, description: \"# Project README\n\nA long description\", shortDescription: \"A short description\"}) { projectNext { id, title, description, shortDescription }}}"}'
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {addProjectV2DraftIssue(input: {projectId: "<em>PROJECT_ID</em>" title: "<em>TITLE</em>" body: "<em>BODY</em>"}) {item {id}}}"}'
```
{% endcurl %}
@@ -382,19 +497,59 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
updateProjectNext(
addProjectV2DraftIssue(input: {projectId: "<em>PROJECT_ID</em>" title: "<em>TITLE</em>" body: "<em>BODY</em>"}) {
item {
id
}
}
}'
```
{% endcli %}
The response will contain the node ID of the newly created draft issue.
```json
{
"data": {
"addProjectV2ItemById": {
"item": {
"id": "PVTI_lADOANN5s84ACbL0zgBbxFc"
}
}
}
}
```
### Updating a project's settings
The following example will update your project's settings. Replace `PROJECT_ID` with the node ID of your project. Set `public` to `true` to make your project public on {% data variables.product.product_name %}. Modify `readme` to make changes to your project's README.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation { updateProjectV2(input: { projectId: \"<em>PROJECT_ID</em>\", title: \"Project title\", public: false, readme: \"# Project README\n\nA long description\", shortDescription: \"A short description\"}) { projectV2 { id, title, readme, shortDescription }}}"}'
```
{% endcurl %}
{% cli %}
```shell
gh api graphql -f query='
mutation {
updateProjectV2(
input: {
projectId: "<em>PROJECT_ID</em>",
title: "Project title",
public: false,
description: "# Project README\n\nA long description",
readme: "# Project README\n\nA long description",
shortDescription: "A short description"
}
) {
projectNext {
projectV2 {
id
title
description
readme
shortDescription
}
}
@@ -402,16 +557,16 @@ gh api graphql -f query='
```
{% endcli %}
### Updating a custom text, number, or date field
### Updating a custom text, number, or date field
The following example will update the value of a date field for an item. Replace `PROJECT_ID` with the node ID of your project. Replace `ITEM_ID` with the node ID of the item you want to update. Replace `FIELD_ID` with the ID of the field that you want to update.
The following example will update the value of a text field for an item. Replace `PROJECT_ID` with the node ID of your project. Replace `ITEM_ID` with the node ID of the item you want to update. Replace `FIELD_ID` with the ID of the field that you want to update.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {updateProjectNextItemField(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\" fieldId: \"<em>FIELD_ID</em>\" value: \"2021-5-11\"}) {projectNextItem {id}}}"}'
--data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "<em>PROJECT_ID</em>" itemId: "<em>ITEM_ID</em>" fieldId: "<em>FIELD_ID</em>" value: { text: "Updated text" }}) { projectV2Item { id }}}"}'
```
{% endcurl %}
@@ -419,15 +574,17 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
updateProjectNextItemField(
updateProjectV2ItemFieldValue(
input: {
projectId: "<em>PROJECT_ID</em>"
itemId: "<em>ITEM_ID</em>"
fieldId: "<em>FIELD_ID</em>"
value: "2021-5-11"
value: {
text: "Updated text"
}
}
) {
projectNextItem {
projectV2Item {
id
}
}
@@ -437,7 +594,7 @@ gh api graphql -f query='
{% note %}
**Note:** You cannot use `updateProjectNextItemField` to change `Assignees`, `Labels`, `Milestone`, or `Repository` because these fields are properties of pull requests and issues, not of project items. Instead, you must use the [addAssigneesToAssignable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#addassigneestoassignable), [removeAssigneesFromAssignable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#removeassigneesfromassignable), [addLabelsToLabelable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#addlabelstolabelable), [removeLabelsFromLabelable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#removelabelsfromlabelable), [updateIssue]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#updateissue), [updatePullRequest]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#updatepullrequest), or [transferIssue]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#transferissue) mutations.
**Note:** You cannot use `updateProjectV2ItemFieldValue` to change `Assignees`, `Labels`, `Milestone`, or `Repository` because these fields are properties of pull requests and issues, not of project items. Instead, you must use the [addAssigneesToAssignable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#addassigneestoassignable), [removeAssigneesFromAssignable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#removeassigneesfromassignable), [addLabelsToLabelable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#addlabelstolabelable), [removeLabelsFromLabelable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#removelabelsfromlabelable), [updateIssue]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#updateissue), [updatePullRequest]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#updatepullrequest), or [transferIssue]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/mutations#transferissue) mutations.
{% endnote %}
@@ -455,7 +612,7 @@ The following example will update the value of a single select field for an item
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {updateProjectNextItemField(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\" fieldId: \"<em>FIELD_ID</em>\" value: \"<em>OPTION_ID</em>\"}) {projectNextItem {id}}}"}'
--data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "<em>PROJECT_ID</em>" itemId: "<em>ITEM_ID</em>" fieldId: "<em>FIELD_ID</em>" value: { singleSelectOptionId: "<em>OPTION_ID</em>" }}) { projectV2Item { id }}}"}'
```
{% endcurl %}
@@ -463,15 +620,17 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
updateProjectNextItemField(
updateProjectV2ItemFieldValue(
input: {
projectId: "<em>PROJECT_ID</em>"
itemId: "<em>ITEM_ID</em>"
fieldId: "<em>FIELD_ID</em>"
value: "<em>OPTION_ID</em>"
value: {
singleSelectOptionId: "<em>OPTION_ID</em>"
}
}
) {
projectNextItem {
projectV2Item {
id
}
}
@@ -486,14 +645,14 @@ The following example will update the value of an iteration field for an item.
- `PROJECT_ID` - Replace this with the node ID of your project.
- `ITEM_ID` - Replace this with the node ID of the item you want to update.
- `FIELD_ID` - Replace this with the ID of the iteration field that you want to update.
- `ITERATION_ID` - Replace this with the ID of the desired iteration. This can be either an active iteration (from the `iterations` array) or a completed iteration (from the `completed_iterations` array).
- `ITERATION_ID` - Replace this with the ID of the desired iteration. This can be either an active or completed iteration.
{% curl %}
```shell
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {updateProjectNextItemField(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\" fieldId: \"<em>FIELD_ID</em>\" value: \"<em>ITERATION_ID</em>\"}) {projectNextItem {id}}}"}'
--data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "<em>PROJECT_ID</em>" itemId: "<em>ITEM_ID</em>" fieldId: "<em>FIELD_ID</em>" value: { singleSelectOptionId: "<em>OPTION_ID</em>" }}) { projectV2Item { id }}}"}'
```
{% endcurl %}
@@ -501,15 +660,17 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
updateProjectNextItemField(
updateProjectV2ItemFieldValue(
input: {
projectId: "<em>PROJECT_ID</em>"
itemId: "<em>ITEM_ID</em>"
fieldId: "<em>FIELD_ID</em>"
value: "<em>ITERATION_ID</em>"
value: {
iterationId: "<em>ITERATION_ID</em>"
}
}
) {
projectNextItem {
projectV2Item {
id
}
}
@@ -526,7 +687,7 @@ The following example will delete an item from a project. Replace `PROJECT_ID` w
curl --request POST \
--url https://api.github.com/graphql \
--header 'Authorization: token <em>TOKEN</em>' \
--data '{"query":"mutation {deleteProjectNextItem(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\"}) {deletedItemId}}"}'
--data '{"query":"mutation {deleteProjectV2Item(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\"}) {deletedItemId}}"}'
```
{% endcurl %}
@@ -534,7 +695,7 @@ curl --request POST \
```shell
gh api graphql -f query='
mutation {
deleteProjectNextItem(
deleteProjectV2Item(
input: {
projectId: "<em>PROJECT_ID</em>"
itemId: "<em>ITEM_ID</em>"

View File

@@ -39,7 +39,7 @@ To check the email address used for those commits and connect commits to your ac
2. To read a message about why the commit is not linked, hover over the blue {% octicon "question" aria-label="Question mark" %} to the right of the username.
![Commit hover message](/assets/images/help/commits/commit-hover-msg.png)
- **Unrecognized author (with email address)** If you see this message with an email address, the address you used to author the commit is not connected to your account on {% data variables.product.product_name %}. {% ifversion not ghae %}To link your commits, [add the email address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account).{% endif %} If the email address has a Gravatar associated with it, the Gravatar will be displayed next to the commit, rather than the default gray Octocat.
- **Unrecognized author (with email address)** If you see this message with an email address, the address you used to author the commit is not connected to your account on {% data variables.product.product_name %}. {% ifversion not ghae %}To link your commits, [add the email address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account).{% endif %}{% ifversion not ghae %} If the email address has a Gravatar associated with it, the Gravatar will be displayed next to the commit, rather than the default gray Octocat.{% endif %}
- **Unrecognized author (no email address)** If you see this message without an email address, you used a generic email address that can't be connected to your account on {% data variables.product.product_name %}.{% ifversion not ghae %} You will need to [set your commit email address in Git](/articles/setting-your-commit-email-address), then [add the new address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account) to link your future commits. Old commits will not be linked.{% endif %}
- **Invalid email** The email address in your local Git configuration settings is either blank or not formatted as an email address.{% ifversion not ghae %} You will need to [set your commit email address in Git](/articles/setting-your-commit-email-address), then [add the new address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account) to link your future commits. Old commits will not be linked.{% endif %}

View File

@@ -128,7 +128,9 @@ $ ssh -T git@{% data variables.command_line.codeblock %}
> provide shell access.
```
If the repository belongs to an organization and you're using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see "<a href="/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions" class="dotcom-only">About OAuth App access restrictions</a>."
{% ifversion fpt or ghec %}
If the repository belongs to an organization and you're using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see "[About OAuth App access restrictions](/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions)."
{% endif %}
For more information, see [Adding a new SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account).

View File

@@ -25,7 +25,7 @@ shortTitle: Manage releases
You can create new releases with release notes, @mentions of contributors, and links to binary files, as well as edit or delete existing releases.
{% ifversion fpt or ghec %}
You can also publish an action from a specific release in {% data variables.product.prodname_marketplace %}. For more information, see "<a href="/actions/creating-actions/publishing-actions-in-github-marketplace" class="dotcom-only">Publishing an action in the {% data variables.product.prodname_marketplace %}</a>."
You can also publish an action from a specific release in {% data variables.product.prodname_marketplace %}. For more information, see "[Publishing an action in the {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace)."
You can choose whether {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}) objects are included in the ZIP files and tarballs that {% data variables.product.product_name %} creates for each release. For more information, see "[Managing {% data variables.large_files.product_name_short %} objects in archives of your repository](/github/administering-a-repository/managing-git-lfs-objects-in-archives-of-your-repository)."
{% endif %}

View File

@@ -79,4 +79,10 @@ This can be useful when a few commits make extensive changes to your code. You c
git blame --ignore-revs-file .git-blame-ignore-revs
```
You can also configure your local git so it always ignores the revs in that file:
```shell
git config blame.ignoreRevsFile .git-blame-ignore-revs
```
{% endif %}

View File

@@ -252,6 +252,7 @@ When you click the paper icon on the right, you'll also see the changes made to
Maps on {% data variables.product.product_name %} use [Leaflet.js](http://leafletjs.com) and support all the geometry types outlined in [the geoJSON spec](http://www.geojson.org/geojson-spec.html) (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection). TopoJSON files should be type "Topology" and adhere to the [topoJSON spec](https://github.com/mbostock/topojson/wiki/Specification).
{% ifversion geoJSON-with-MapBox %}
### Styling features
You can customize the way features are displayed, such as specifying a particular color or adding a descriptive icon, by passing additional metadata within the geoJSON object's properties. The options are:
@@ -266,6 +267,7 @@ You can customize the way features are displayed, such as specifying a particula
* `fill-opacity` - the opacity of the interior of a polygon (0.0-1.0)
See [version 1.1.0 of the open simplestyle spec](https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0) for more information.
{% endif %}
### Embedding your map elsewhere
@@ -315,8 +317,12 @@ It may still be possible to render the data by converting the `.geojson` file to
### Further reading
{% ifversion geoJSON-with-MapBox %}
* [Leaflet.js documentation](https://leafletjs.com/)
* [MapBox marker-styling documentation](http://www.mapbox.com/developers/simplestyle/)
{%- else %}
* [Azure Maps documentation](https://docs.microsoft.com/en-us/azure/azure-maps/)
{%- endif %}
* [TopoJSON Wiki](https://github.com/mbostock/topojson/wiki)
## Working with Jupyter Notebook files on {% data variables.product.prodname_dotcom %}

View File

@@ -15,6 +15,7 @@ miniTocMaxHeadingLevel: 3
children:
- /artifacts
- /cache
- /oidc
- /permissions
- /secrets
- /self-hosted-runner-groups

View File

@@ -0,0 +1,11 @@
---
title: GitHub Actions OIDC
allowTitleToDifferFromFilename: true
shortTitle: OIDC
intro: 'The {% data variables.product.prodname_actions %} OIDC API allows you to customize the JWT token claims.'
topics:
- API
versions:
ghec: '*'
fpt: '*'
---

View File

@@ -9,8 +9,6 @@ topics:
miniTocMaxHeadingLevel: 3
---
{% data reusables.codespaces.codespaces-api-beta-note %}
## About the Codespaces API
The {% data variables.product.prodname_codespaces %} API enables you to manage {% data variables.product.prodname_codespaces %} using the REST API. This API is available for authenticated users and OAuth Apps, but not GitHub Apps. For more information, see "[{% data variables.product.prodname_codespaces %}](/codespaces)."

View File

@@ -10,6 +10,7 @@ topics:
miniTocMaxHeadingLevel: 3
children:
- /codespaces
- /organizations
- /machines
- /repository-secrets
- /secrets

View File

@@ -0,0 +1,22 @@
---
title: Codespaces organizations
allowTitleToDifferFromFilename: true
shortTitle: Organizations
intro: 'The Codespaces organizations API enables you to manage your organization members codespaces using the REST API.'
versions:
fpt: '*'
ghec: '*'
topics:
- API
miniTocMaxHeadingLevel: 3
---
{% data reusables.codespaces.codespaces-api-beta-note %}
## About the Codespaces organizations API
The {% data variables.product.prodname_codespaces %} organizations API enables
you to manage {% data variables.product.prodname_codespaces %} billed to your
organization using the REST API. This API is available for authenticated
organization admins and OAuth Apps, but not GitHub Apps. For more information,
see "[{% data variables.product.prodname_codespaces %}](/codespaces)."

View File

@@ -21,52 +21,23 @@ formats that other resources don't.
All {% data variables.product.product_name %} media types look like this:
application/vnd.github[.version].param[+json]
application/vnd.github.param[+json]
The most basic media types the API supports are:
application/json
application/vnd.github+json
Neither of these specify a [version][versions], so you will always get the
current default JSON representation of resources.
application/json
{% note %}
**Important:** The default version of the API may change in the
future. If you're building an application and care about the stability of
the API, be sure to request a specific version in the `Accept`
header as shown in the examples below.
**Note:** In the past, we recommended including `v3` in your `Accept` header. This is no longer required and will have no impact on your API requests.
{% endnote %}
You can specify a version like so:
application/vnd.github.v3+json
If you're specifying a property (such as full/raw/etc defined below),
put the version before the property:
put it after `github`:
application/vnd.github.v3.raw+json
You can check the current version through every response's headers. Look
for the `X-GitHub-Media-Type` header:
```shell
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I
> HTTP/2 200
> X-GitHub-Media-Type: github.v3
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I \
$ -H "Accept: application/vnd.github.full+json"
> HTTP/2 200
> X-GitHub-Media-Type: github.v3; param=full; format=json
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I \
$ -H "Accept: application/vnd.github.v3.full+json"
> HTTP/2 200
> X-GitHub-Media-Type: github.v3; param=full; format=json
```
application/vnd.github.raw+json
## Comment body properties
@@ -74,28 +45,28 @@ The body of a comment can be written in [GitHub Flavored Markdown][gfm], [issues
### Raw
application/vnd.github.VERSION.raw+json
application/vnd.github.raw+json
Return the raw markdown body. Response will include `body`. This is the
default if you do not pass any specific media type.
### Text
application/vnd.github.VERSION.text+json
application/vnd.github.text+json
Return a text only representation of the markdown body. Response will
include `body_text`.
### HTML
application/vnd.github.VERSION.html+json
application/vnd.github.html+json
Return HTML rendered from the body's markdown. Response will include
`body_html`.
### Full
application/vnd.github.VERSION.full+json
application/vnd.github.full+json
Return raw, text and HTML representations. Response will include `body`,
`body_text`, and `body_html`:
@@ -106,7 +77,7 @@ The following media types are allowed when [getting a blob](/rest/reference/git#
### JSON
application/vnd.github.VERSION+json
application/vnd.github+json
application/json
Return JSON representation of the blob with `content` as a base64
@@ -114,7 +85,7 @@ encoded string. This is the default if nothing is passed.
### Raw
application/vnd.github.VERSION.raw
application/vnd.github.raw
Return the raw blob data.
@@ -125,27 +96,27 @@ The [commits API](/rest/reference/repos#commits) and [pull requests API](/rest/r
### diff
application/vnd.github.VERSION.diff
application/vnd.github.diff
### patch
application/vnd.github.VERSION.patch
application/vnd.github.patch
### sha
application/vnd.github.VERSION.sha
application/vnd.github.sha
## Repository contents
### Raw
application/vnd.github.VERSION.raw
application/vnd.github.raw
Return the raw contents of a file. This is the default if you do not pass any specific media type.
### HTML
application/vnd.github.VERSION.html
application/vnd.github.html
For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the `.html` media type. Markup languages are rendered to HTML using our open-source [Markup library](https://github.com/github/markup).
@@ -153,13 +124,13 @@ For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTM
### Raw
application/vnd.github.VERSION.raw
application/vnd.github.raw
Return the raw contents of a gist. This is the default if you do not pass any specific media type.
### base64
application/vnd.github.VERSION.base64
application/vnd.github.base64
The gist contents are base64-encoded before being sent out. This can be useful if your gist contains any invalid UTF-8 sequences.

View File

@@ -20,7 +20,7 @@ miniTocMaxHeadingLevel: 3
{% ifversion fpt or ghes or ghec %}
{% note %}
**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "<a href="/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization" class="dotcom-only">Synchronizing teams between your identity provider and GitHub</a>."
**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization)."
{% endnote %}

View File

@@ -12,9 +12,9 @@ allowTitleToDifferFromFilename: true
## About the Team synchronization API
To use this API, the authenticated user must be a team maintainer or an owner of the organization associated with the team. The token you use to authenticate will also need to be authorized for use with your IdP (SSO) provider. For more information, see "<a href="/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on" class="dotcom-only">Authorizing a personal access token for use with a SAML single sign-on organization</a>."
To use this API, the authenticated user must be a team maintainer or an owner of the organization associated with the team. The token you use to authenticate will also need to be authorized for use with your IdP (SSO) provider. For more information, see "[Authorizing a personal access token for use with a SAML single sign-on organization](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)."
You can manage GitHub team members through your IdP with team synchronization. Team synchronization must be enabled to use the Team Synchronization API. For more information, see "<a href="/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization" class="dotcom-only">Synchronizing teams between your identity provider and GitHub</a>."
You can manage GitHub team members through your IdP with team synchronization. Team synchronization must be enabled to use the Team Synchronization API. For more information, see "[Synchronizing teams between your identity provider and GitHub](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization)."
{% note %}

View File

@@ -23,12 +23,13 @@ To include forks in the search results, you will need to add `fork:true` or `for
## Search by repository name, description, or contents of the README file
With the `in` qualifier you can restrict your search to the repository name, repository description, contents of the README file, or any combination of these. When you omit this qualifier, only the repository name and description are searched.
With the `in` qualifier you can restrict your search to the repository name, repository description, repository topics, contents of the README file, or any combination of these. When you omit this qualifier, only the repository name, description, and topics are searched.
| Qualifier | Example
| ------------- | -------------
| `in:name` | [**jquery in:name**](https://github.com/search?q=jquery+in%3Aname&type=Repositories) matches repositories with "jquery" in the repository name.
| `in:description` | [**jquery in:name,description**](https://github.com/search?q=jquery+in%3Aname%2Cdescription&type=Repositories) matches repositories with "jquery" in the repository name or description.
| `in:topics` | [**jquery in:topics**](https://github.com/search?q=jquery+in%3Atopics&type=Repositories) matches repositories labeled with "jquery" as a topic.
| `in:readme` | [**jquery in:readme**](https://github.com/search?q=jquery+in%3Areadme&type=Repositories) matches repositories mentioning "jquery" in the repository's README file.
| `repo:owner/name` | [**repo:octocat/hello-world**](https://github.com/search?q=repo%3Aoctocat%2Fhello-world) matches a specific repository name.

View File

@@ -46,9 +46,9 @@ There are two {% data variables.contact.premium_support %} plans: Premium and Pr
| Initial response time | <ul><li>30 minutes for {% data variables.product.support_ticket_priority_urgent %}</li><li>4 hours for {% data variables.product.support_ticket_priority_high %}</li></ul> | <ul><li>30 minutes for {% data variables.product.support_ticket_priority_urgent %}</li><li>4 hours for {% data variables.product.support_ticket_priority_high %}</li></ul> |
| Support channels | <ul><li>Online ticket submission</li><li>Phone support in English via callback request</li><li>Screen share for critical issues</li></ul> | <ul><li>Online ticket submission</li><li>Phone support in English via callback request</li><li>Screen share for critical issues</li></ul> |
| Training | Access to premium content | <ul><li>Access to premium content</li><li>1 virtual training class per year</li></ul> |
| Members with support entitlements | 10 | 25 |
| Members with support entitlements | 20 | 20 |
| Resources | Priority ticket handling | <ul><li>Priority ticket handling</li><li>Named Customer Reliability Engineer</li></ul> |
| Health Checks | Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)") | <ul><li>Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)")</li><li>Unlimited enhanced Health Checks, with findings, interpretations, and recommendations from a Customer Reliability Engineer (by request)</li></ul> |
| Health Checks | Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)") | <ul><li>Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)")</li><li>Quarterly enhanced Health Checks, with findings, interpretations, and recommendations from a Customer Reliability Engineer (by request)</li></ul> |
| Technical advisory hours| None | 4 hours per month |
| Application upgrade assistance | None | By request |
| Cloud planning | None | By request |

View File

@@ -95,9 +95,9 @@ Broken images include `assets/images/` in the URL and are often caused by images
For broken links to articles on our site, find the file that contains the link by searching the `docs` repository for the file name (e.g., `incorporating-feedback-in-your-pull-request`). Try the following fixes:
1. Make sure the link is versioned correctly. For example, if the article only exists for 2.17+, make sure the link is versioned for 2.17+.
2. If an article that is available for GHES links to a dotcom-only article, use a dotcom-only class to prevent the URL from automatically converting to include a GHES version number:
2. If an article that is available for GHES links to a dotcom-only article, include the version in the path to prevent the URL from automatically converting to include a GHES version number:
```
<a href="/articles/github-connect-addendum-to-the-github-enterprise-license-agreement/" class="dotcom-only">{{ site.data.variables.product.prodname_github_connect }} Addendum to the {{ site.data.variables.product.prodname_enterprise }} License Agreement</a>
[{{ site.data.variables.product.prodname_github_connect }} Addendum to the {{ site.data.variables.product.prodname_enterprise }} License Agreement](/free-pro-team@latest/articles/github-connect-addendum-to-the-github-enterprise-license-agreement/)"
```
## Check external links

View File

@@ -0,0 +1,8 @@
# Reference: #7340
# Extends actions-cache-management.yml (Issue #6154)
# Documentation for Actions cache list and delete APIs
versions:
fpt: '*'
ghec: '*'
ghes: '> 3.6'
ghae: 'issue-7340'

View File

@@ -0,0 +1,5 @@
# Reference: #7429
# Dotcom now uses Azure maps for geoJSON, but GHES/AE will still use the existing MapBox system
versions:
ghes: '*'
ghae: '*'

View File

@@ -1,6 +1,5 @@
# docs-content 7314. GHAS enablement webhook
versions:
fpt: '*'
ghec: '*'
ghes: '>3.6'
ghae: 'issue-7314'

View File

@@ -0,0 +1,7 @@
# Reference: #6035 #6036 #6037
# Documentation for enterprise policies that define where forks can be created.
versions:
ghec: '*'
ghes: '>3.6'
ghae: 'issue-6035'

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