Universe 2021 (#22246)
https://github.com/github/docs-internal/pull/22217 https://github.com/github/docs-internal/pull/22130 https://github.com/github/docs-internal/pull/22195 https://github.com/github/docs-internal/pull/22327 https://github.com/github/docs-internal/pull/22204 https://github.com/github/docs-internal/pull/21676 https://github.com/github/docs-internal/pull/22341 https://github.com/github/docs-internal/pull/22329 https://github.com/github/docs-internal/pull/21970 https://github.com/github/docs-internal/pull/22334 https://github.com/github/docs-internal/pull/22365 https://github.com/github/docs-internal/pull/21904
Двоичные данные
assets/images/help/command-palette/command-palette-command-change-theme.png
Normal file
После Ширина: | Высота: | Размер: 59 KiB |
После Ширина: | Высота: | Размер: 78 KiB |
После Ширина: | Высота: | Размер: 113 KiB |
Двоичные данные
assets/images/help/command-palette/command-palette-navigation-current-scope.png
Normal file
После Ширина: | Высота: | Размер: 565 KiB |
Двоичные данные
assets/images/help/command-palette/command-palette-navigation-repo-default.png
Normal file
После Ширина: | Высота: | Размер: 56 KiB |
После Ширина: | Высота: | Размер: 74 KiB |
После Ширина: | Высота: | Размер: 86 KiB |
После Ширина: | Высота: | Размер: 27 KiB |
После Ширина: | Высота: | Размер: 8.6 KiB |
После Ширина: | Высота: | Размер: 22 KiB |
После Ширина: | Высота: | Размер: 22 KiB |
После Ширина: | Высота: | Размер: 8.2 KiB |
После Ширина: | Высота: | Размер: 66 KiB |
После Ширина: | Высота: | Размер: 36 KiB |
После Ширина: | Высота: | Размер: 20 KiB |
После Ширина: | Высота: | Размер: 36 KiB |
После Ширина: | Высота: | Размер: 32 KiB |
После Ширина: | Высота: | Размер: 28 KiB |
После Ширина: | Высота: | Размер: 8.3 KiB |
После Ширина: | Высота: | Размер: 87 KiB |
После Ширина: | Высота: | Размер: 81 KiB |
После Ширина: | Высота: | Размер: 106 KiB |
После Ширина: | Высота: | Размер: 123 KiB |
После Ширина: | Высота: | Размер: 61 KiB |
После Ширина: | Высота: | Размер: 51 KiB |
После Ширина: | Высота: | Размер: 45 KiB |
После Ширина: | Высота: | Размер: 68 KiB |
После Ширина: | Высота: | Размер: 44 KiB |
После Ширина: | Высота: | Размер: 32 KiB |
После Ширина: | Высота: | Размер: 8.5 KiB |
|
@ -24,7 +24,9 @@ You may want to use a dark theme to reduce power consumption on certain devices,
|
|||
|
||||
**Note:** The colorblind themes are currently in public beta. For more information on enabling features in public beta, see "[Exploring early access releases with feature preview](/get-started/using-github/exploring-early-access-releases-with-feature-preview)."
|
||||
|
||||
{% endnote %}{% endif %}
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.user_settings.access_settings %}
|
||||
1. In the user settings sidebar, click **Appearance**.
|
||||
|
@ -39,6 +41,16 @@ You may want to use a dark theme to reduce power consumption on certain devices,
|
|||
{% ifversion fpt or ghae-issue-4619 or ghec %}
|
||||
- If you would like to choose a theme which is currently in public beta, you will first need to enable it with feature preview. For more information, see "[Exploring early access releases with feature preview](/get-started/using-github/exploring-early-access-releases-with-feature-preview)."{% endif %}
|
||||
|
||||
{% if command-palette %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can also change your theme settings with the command palette. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)".
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Setting a theme for {% data variables.product.prodname_desktop %}](/desktop/installing-and-configuring-github-desktop/setting-a-theme-for-github-desktop)"
|
||||
|
|
|
@ -27,7 +27,7 @@ Each audit log entry shows applicable information about an event, such as:
|
|||
- Which country the action took place in
|
||||
- The date and time the action occurred
|
||||
|
||||
You can search the audit log for specific events and export audit log data. For more information on searching the audit log and on specific organization events, see "[Reviewing the audit log for your organization](/articles/reviewing-the-audit-log-for-your-organization)."
|
||||
You can search the audit log for specific events and export audit log data. For more information on searching the audit log and on specific organization events, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
|
|
|
@ -443,7 +443,7 @@ If you only want to run custom queries, you can disable the default security que
|
|||
|
||||
### Specifying directories to scan
|
||||
|
||||
For the interpreted languages that {% data variables.product.prodname_codeql %} supports (Python and JavaScript/TypeScript), you can restrict {% data variables.product.prodname_code_scanning %} to files in specific directories by adding a `paths` array to the configuration file. You can exclude the files in specific directories from analysis by adding a `paths-ignore` array.
|
||||
For the interpreted languages that {% data variables.product.prodname_codeql %} supports (Python{% ifversion fpt or ghes > 3.3 or ghae-issue-5017 %}, Ruby{% endif %} and JavaScript/TypeScript), you can restrict {% data variables.product.prodname_code_scanning %} to files in specific directories by adding a `paths` array to the configuration file. You can exclude the files in specific directories from analysis by adding a `paths-ignore` array.
|
||||
|
||||
``` yaml
|
||||
paths:
|
||||
|
|
|
@ -77,12 +77,12 @@ If your workflow fails with an error `No source code was seen during the build`
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the list below
|
||||
# Supported options are:
|
||||
# ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
# Override automatic language detection by changing the list below.
|
||||
# Supported options are listed in a comment in the default workflow.
|
||||
language: ['go', 'javascript']
|
||||
```
|
||||
For more information, see the workflow extract in "[Automatic build for a compiled language fails](#automatic-build-for-a-compiled-language-fails)" above.
|
||||
|
||||
For more information, see the workflow extract in "[Automatic build for a compiled language fails](#automatic-build-for-a-compiled-language-fails)" above.
|
||||
1. Your {% data variables.product.prodname_code_scanning %} workflow is analyzing a compiled language (C, C++, C#, or Java), but the code was not compiled. By default, the {% data variables.product.prodname_codeql %} analysis workflow contains an `autobuild` step, however, this step represents a best effort process, and may not succeed in building your code, depending on your specific build environment. Compilation may also fail if you have removed the `autobuild` step and did not include build steps manually. For more information about specifying build steps, see "[Configuring the {% data variables.product.prodname_codeql %} workflow for compiled languages](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)."
|
||||
1. Your workflow is analyzing a compiled language (C, C++, C#, or Java), but portions of your build are cached to improve performance (most likely to occur with build systems like Gradle or Bazel). Since {% data variables.product.prodname_codeql %} observes the activity of the compiler to understand the data flows in a repository, {% data variables.product.prodname_codeql %} requires a complete build to take place in order to perform analysis.
|
||||
1. Your workflow is analyzing a compiled language (C, C++, C#, or Java), but compilation does not occur between the `init` and `analyze` steps in the workflow. {% data variables.product.prodname_codeql %} requires that your build happens in between these two steps in order to observe the activity of the compiler and perform analysis.
|
||||
|
|
|
@ -12,9 +12,47 @@ shortTitle: Private image registry
|
|||
|
||||
## About private image registries and {% data variables.product.prodname_codespaces %}
|
||||
|
||||
A registry is a secure space for storing and managing private container images, such as Azure Container Registry or DockerHub. You can create secrets in GitHub to store the access details for a private registry and use them to give your codespace access to images stored in the registry.
|
||||
A registry is a secure space for storing, managing, and fetching private container images. You may use one to store one or more devcontainers. There are many examples of registries, such as {% data variables.product.prodname_dotcom %} Container Registry, Azure Container Registry, or DockerHub.
|
||||
|
||||
When you launch a codespace, {% data variables.product.prodname_codespaces %} checks for three secrets, which define the server name, username, and personal access token (PAT) for a container registry. If these secrets are found, {% data variables.product.prodname_codespaces %} will make the registry available inside your codespace.
|
||||
{% data variables.product.prodname_dotcom %} Container Registry can be configured to pull container images seamlessly, without having to provide any authentication credentials to {% data variables.product.prodname_codespaces %}. For other image registries, you must create secrets in {% data variables.product.prodname_dotcom %} to store the access details, which will allow {% data variables.product.prodname_codespaces %} to access images stored in that registry.
|
||||
|
||||
## Accessing images stored in {% data variables.product.prodname_dotcom %} Container Registry
|
||||
|
||||
{% data variables.product.prodname_dotcom %} Container Registry is the easiest way for {% data variables.product.prodname_github_codespaces %} to consume devcontainer container images.
|
||||
|
||||
For more information, see "[Working with the Container registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)".
|
||||
|
||||
### Accessing an image published to the same repository as the codespace
|
||||
|
||||
If you publish a container image to {% data variables.product.prodname_dotcom %} Container Registry in the same repository that the codespace is being launched in, you will automatically be able to fetch that image on codespace creation. You won't have to provide any additional credentials, unless the **Inherit access from repo** option was unselected when the container image was published.
|
||||
|
||||
#### Inheriting access from the repository from which an image was published
|
||||
|
||||
By default, when you publish a container image to {% data variables.product.prodname_dotcom %} Container Registry, the image inherits the access setting of the repository from which the image was published. For example, if the repository is public, the image is also public. If the repository is private, the image is also private, but is accessible from the repository.
|
||||
|
||||
This behavior is controlled by the **Inherit access from repo** option. **Inherit access from repo** is selected by default when publishing via {% data variables.product.prodname_actions %}, but not when publishing directly to {% data variables.product.prodname_dotcom %} Container Registry using a Personal Access Token (PAT).
|
||||
|
||||
If the **Inherit access from repo** option was not selected when the image was published, you can manually add the repository to the published container image's access controls. For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#inheriting-access-for-a-container-image-from-a-repository)."
|
||||
|
||||
### Accessing an image published to the organization a codespace will be launched in
|
||||
|
||||
If you want a container image to be accessible to all codespaces in an organization, we recommend that you publish the container image with internal visibility. This will automatically make the image visible to all codespaces within the organization, unless the repository the codespace is launched from is public.
|
||||
|
||||
If the codespace is being launched from a public repository referencing an internal or private image, you must manually allow the public repository access to the internal container image. This prevents the internal image from being accidentally leaked publicly. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)."
|
||||
|
||||
### Accessing a private container from a subset of repositories in an organization
|
||||
|
||||
If you want to allow a subset of an organization's repositories to access a container image, or allow an internal or private image to be accessed from a codespace launched in a public repository, you can manually add repositories to a container <span class="x x-first x-last">image's</span> access settings. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)<span class="x x-first x-last">.</span>"
|
||||
|
||||
### Publishing a container image from a codespace
|
||||
|
||||
Seamless access from a codespace to {% data variables.product.prodname_dotcom %} Container Registry is limited to pulling container images. If you want to publish a container image from inside a codespace, you must use a personal access token (PAT) with the `write:packages` scope.
|
||||
|
||||
We recommend publishing images via {% data variables.product.prodname_actions %}. For more information, see "[Publishing Docker images](/actions/publishing-packages/publishing-docker-images)."
|
||||
|
||||
## Accessing images stored in other container registries
|
||||
|
||||
If you are accessing a container image from a registry that isn't {% data variables.product.prodname_dotcom %} Container Registry, {% data variables.product.prodname_codespaces %} checks for the presence of three secrets, which define the server name, username, and personal access token (PAT) for a container registry. If these secrets are found, {% data variables.product.prodname_codespaces %} will make the registry available inside your codespace.
|
||||
|
||||
- `<*>_CONTAINER_REGISTRY_SERVER`
|
||||
- `<*>_CONTAINER_REGISTRY_USER`
|
||||
|
@ -26,7 +64,7 @@ If you are setting the secrets at the user or organization level, make sure to a
|
|||
|
||||
![Image registry secret example](/assets/images/help/codespaces/secret-repository-access.png)
|
||||
|
||||
## Example secrets
|
||||
### Example secrets
|
||||
|
||||
For a private image registry in Azure, you could create the following secrets:
|
||||
|
||||
|
@ -42,16 +80,16 @@ For information on common image registries, see "[Common image registry servers]
|
|||
|
||||
Once you've added the secrets, you may need to stop and then start the codespace you are in for the new environment variables to be passed into the container. For more information, see "[Suspending or stopping a codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)."
|
||||
|
||||
## Common image registry servers
|
||||
### Common image registry servers
|
||||
|
||||
Some of the common image registry servers are listed below:
|
||||
|
||||
- [DockerHub](https://docs.docker.com/engine/reference/commandline/info/) - `https://index.docker.io/v1/`
|
||||
- [GitHub Container Registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - `ghcr.io`
|
||||
- [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) - `<registry name>.azurecr.io`
|
||||
- [Amazon Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `<aws_account_id>.dkr.ecr.<region>.amazonaws.com`
|
||||
- [AWS Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `<aws_account_id>.dkr.ecr.<region>.amazonaws.com`
|
||||
- [Google Cloud Container Registry](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US), `eu.gcr.io` (EU), `asia.gcr.io` (Asia)
|
||||
|
||||
### Accessing AWS Elastic Container Registry
|
||||
#### Accessing AWS Elastic Container Registry
|
||||
|
||||
If you want to access AWS Elastic Container Registry (ECR), you must provide an AWS authorization token in the `ECR_CONTAINER_REGISTRY_PASSWORD`. This authorization token is not the same as your secret key. You can obtain an AWS authorization token by using AWS's APIs or CLI. These tokens are short lived and will need to be refreshed periodically. For more information, see AWS ECR's ["Private registry authentication" documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html).
|
||||
If you want to access AWS Elastic Container Registry (ECR), you must provide an AWS authorization token in the `ECR_CONTAINER_REGISTRY_PASSWORD`. This authorization token is not the same as your secret key. You can obtain an AWS authorization token by using AWS's APIs or CLI. These tokens are short lived and will need to be refreshed periodically. For more information, see AWS ECR's "[Private registry authentication documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)."
|
||||
|
|
|
@ -8,7 +8,8 @@ product: '{% data reusables.gated-features.codespaces %}'
|
|||
children:
|
||||
- /understanding-billing-for-codespaces
|
||||
- /allowing-your-codespace-to-access-a-private-image-registry
|
||||
- /using-the-command-palette-in-codespaces
|
||||
- /using-github-copilot-in-codespaces
|
||||
- /using-the-vs-code-command-palette-in-codespaces
|
||||
- /security-in-codespaces
|
||||
- /disaster-recovery-for-codespaces
|
||||
---
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Using GitHub Copilot in Codespaces
|
||||
intro: 'You can use Copilot in Codespaces by adding the extension.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
- Copilot
|
||||
- Visual Studio Code
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
shortTitle: Copilot in Codespaces
|
||||
redirect_from:
|
||||
- /codespaces/codespaces-reference/using-copilot-in-codespaces
|
||||
---
|
||||
|
||||
## Using {% data variables.product.prodname_copilot %}
|
||||
|
||||
[{% data variables.product.prodname_copilot %}](https://copilot.github.com/), an AI pair programmer, can be used in any codespace. To start using {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_codespaces %}, install the [{% data variables.product.prodname_copilot_short %} extension from the {% data variables.product.prodname_vscode %} marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot).
|
||||
|
||||
To include {% data variables.product.prodname_copilot_short %}, or other extensions, in all of your codespaces, enable Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account#settings-sync)." Additionally, to include {% data variables.product.prodname_copilot_short %} in a given project for all users, you can specify `GitHub.copilot` as an extension in your `devcontainer.json` file. For information about configuring a `devcontainer.json` file, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/codespaces/customizing-your-codespace/configuring-codespaces-for-your-project#creating-a-custom-codespace-configuration)."
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
title: Using the Command Palette in Codespaces
|
||||
intro: 'You can use the Command Palette feature of {% data variables.product.prodname_vscode %} to access many commands in Codespaces.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
- Visual Studio Code
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
shortTitle: Command Palette
|
||||
---
|
||||
|
||||
## About the Command Palette
|
||||
|
||||
The Command Palette is one of the focal features of {% data variables.product.prodname_vscode %} and is available for you to use in Codespaces. The Command Palette allows you to access many commands for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information on using the Command Palette, see "[User Interface](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)" in the Visual Studio Code documentation.
|
||||
|
||||
## Accessing the Command Palette
|
||||
|
||||
You can access the Command Palette in a number of ways.
|
||||
|
||||
- `Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows).
|
||||
|
||||
Note that this command is a reserved keyboard shortcut in Firefox.
|
||||
- `F1`
|
||||
- From the Application Menu, click **View > Command Palette…**.
|
||||
|
||||
![The application menu](/assets/images/help/codespaces/codespaces-view-menu.png)
|
||||
|
||||
## Commands for {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
To see all commands related to {% data variables.product.prodname_github_codespaces %} access the Command Palette, then start typing "Codespaces".
|
||||
|
||||
![A list of all commands that relate to Codespaces](/assets/images/help/codespaces/codespaces-command-palette.png)
|
||||
|
||||
### Suspending or stopping a codespace
|
||||
|
||||
If you add a new secret or change the machine type, you'll have to stop and restart the codespace for it to apply your changes.
|
||||
|
||||
To suspend or stop your codespace's container, access the Command Palette, then start typing "stop". Select **Codespaces: Stop Current Codespace**.
|
||||
|
||||
![Command to stop a codespace](/assets/images/help/codespaces/codespaces-stop.png)
|
||||
|
||||
### Adding a dev container from a template
|
||||
|
||||
To add a dev container from a template, access the Command Palette, then start typing "dev container". Select **Codespaces: Add Development Container Configuration Files...**
|
||||
|
||||
![Command to add a dev container](/assets/images/help/codespaces/add-prebuilt-container-command.png)
|
||||
|
||||
### Rebuilding a codespace
|
||||
|
||||
If you add a dev container or edit any of the configuration files (`devcontainer.json` and `Dockerfile`), you'll have to rebuild your codespace for it to apply your changes.
|
||||
|
||||
To rebuild your container, access the Command Palette, then start typing "rebuild". Select **Codespaces: Rebuild Container**.
|
||||
|
||||
![Command to rebuild a codespace](/assets/images/help/codespaces/codespaces-rebuild.png)
|
||||
|
||||
### Codespaces logs
|
||||
|
||||
You can use the Command Palette to access the codespace creation logs, or you can use it export all logs.
|
||||
|
||||
To retrieve the logs for Codespaces, access the Command Palette, then start typing "log". Select **Codespaces: Export Logs** to export all logs related to Codespaces or select **Codespaces: View Creation Logs** to view logs related to the setup.
|
||||
|
||||
![Command to access logs](/assets/images/help/codespaces/codespaces-logs.png)
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
title: Using the Visual Studio Code Command Palette in Codespaces
|
||||
intro: 'You can use the Command Palette feature of {% data variables.product.prodname_vscode %} to access many commands in Codespaces.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
- Visual Studio Code
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
shortTitle: VS Code Command Palette
|
||||
allowTitleToDifferFromFilename: true
|
||||
redirect_from:
|
||||
- /codespaces/codespaces-reference/using-the-command-palette-in-codespaces
|
||||
---
|
||||
|
||||
## About the {% data variables.product.prodname_vscode %} Command Palette
|
||||
|
||||
The Command Palette is one of the focal features of {% data variables.product.prodname_vscode %} and is available for you to use in Codespaces. The {% data variables.product.prodname_vscode_command_palette %} allows you to access many commands for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information on using the {% data variables.product.prodname_vscode_command_palette %}, see "[User Interface](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)" in the Visual Studio Code documentation.
|
||||
|
||||
## Accessing the {% data variables.product.prodname_vscode_command_palette %}
|
||||
|
||||
You can access the {% data variables.product.prodname_vscode_command_palette %} in a number of ways.
|
||||
|
||||
- `Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows).
|
||||
|
||||
Note that this command is a reserved keyboard shortcut in Firefox.
|
||||
- `F1`
|
||||
- From the Application Menu, click **View > Command Palette…**.
|
||||
|
||||
![The application menu](/assets/images/help/codespaces/codespaces-view-menu.png)
|
||||
|
||||
## Commands for {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
To see all commands related to {% data variables.product.prodname_github_codespaces %}, [access the {% data variables.product.prodname_vscode_command_palette %}](#accessing-the-command-palette), then start typing "Codespaces".
|
||||
|
||||
![A list of all commands that relate to Codespaces](/assets/images/help/codespaces/codespaces-command-palette.png)
|
||||
|
||||
### Suspending or stopping a codespace
|
||||
|
||||
If you add a new secret or change the machine type, you'll have to stop and restart the codespace for it to apply your changes.
|
||||
|
||||
To suspend or stop your codespace's container, [access the {% data variables.product.prodname_vscode_command_palette %}](#accessing-the-command-palette), then start typing "stop". Select **Codespaces: Stop Current Codespace**.
|
||||
|
||||
![Command to stop a codespace](/assets/images/help/codespaces/codespaces-stop.png)
|
||||
|
||||
### Adding a dev container from a template
|
||||
|
||||
To add a dev container from a template, [access the {% data variables.product.prodname_vscode_command_palette %}](#accessing-the-command-palette), then start typing "dev container". Select **Codespaces: Add Development Container Configuration Files...**
|
||||
|
||||
![Command to add a dev container](/assets/images/help/codespaces/add-prebuilt-container-command.png)
|
||||
|
||||
### Rebuilding a codespace
|
||||
|
||||
If you add a dev container or edit any of the configuration files (`devcontainer.json` and `Dockerfile`), you'll have to rebuild your codespace for it to apply your changes.
|
||||
|
||||
To rebuild your container, [access the {% data variables.product.prodname_vscode_command_palette %}](#accessing-the-command-palette), then start typing "rebuild". Select **Codespaces: Rebuild Container**.
|
||||
|
||||
![Command to rebuild a codespace](/assets/images/help/codespaces/codespaces-rebuild.png)
|
||||
|
||||
### Codespaces logs
|
||||
|
||||
You can use the {% data variables.product.prodname_vscode_command_palette %} to access the codespace creation logs, or you can use it export all logs.
|
||||
|
||||
To retrieve the logs for Codespaces, [access the {% data variables.product.prodname_vscode_command_palette %}](#accessing-the-command-palette), then start typing "log". Select **Codespaces: Export Logs** to export all logs related to Codespaces or select **Codespaces: View Creation Logs** to view logs related to the setup.
|
||||
|
||||
![Command to access logs](/assets/images/help/codespaces/codespaces-logs.png)
|
|
@ -90,7 +90,7 @@ Using a predefined configuration is a great idea if you need some additional ext
|
|||
1. Click **OK**.
|
||||
![OK button](/assets/images/help/codespaces/prebuilt-container-ok-button.png)
|
||||
1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)."
|
||||
!["Codespaces: Rebuild Container" in the command palette](/assets/images/help/codespaces/rebuild-prompt.png)
|
||||
!["Codespaces: Rebuild Container" in the {% data variables.product.prodname_vscode_command_palette %}](/assets/images/help/codespaces/rebuild-prompt.png)
|
||||
|
||||
### Adding additional features to your `devcontainer.json` file
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ topics:
|
|||
|
||||
## About codespace creation
|
||||
|
||||
You can create a codespace on either {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_vscode %}. {% data reusables.codespaces.codespaces-are-personal %}
|
||||
You can create a codespace on {% data variables.product.prodname_dotcom_the_website %}, in {% data variables.product.prodname_vscode %}, or by using {% data variables.product.prodname_cli %}. {% data reusables.codespaces.codespaces-are-personal %}
|
||||
|
||||
Codespaces are associated with a specific branch of a repository and the repository cannot be empty. {% data reusables.codespaces.concurrent-codespace-limit %} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
|
||||
|
||||
|
@ -62,14 +62,52 @@ If you would like to create a codespace for a repository owned by your personal
|
|||
|
||||
## Creating a codespace
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.
|
||||
|
||||
![Branch drop-down menu](/assets/images/help/codespaces/branch-drop-down.png)
|
||||
![Branch drop-down menu](/assets/images/help/codespaces/branch-drop-down.png)
|
||||
|
||||
3. Under the repository name, use the **{% octicon "code" aria-label="The code icon" %} Code** drop-down menu, and in the **Codespaces** tab, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
|
||||
|
||||
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)
|
||||
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)
|
||||
|
||||
If you are a member of an organization and are creating a codespace on a repository owned by that organization, you can select the option of a different machine type. From the dialog, choose a machine type and then click **Create codespace**.
|
||||
![Machine type choice](/assets/images/help/codespaces/choose-custom-machine-type.png)
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To create a new codespace, use the `gh codespace create` subcommand.
|
||||
|
||||
```shell
|
||||
gh codespace create
|
||||
```
|
||||
|
||||
You are prompted to choose a repository, a branch, and a machine type (if more than one is available).
|
||||
|
||||
Alternatively, you can use flags to specify some or all of the options:
|
||||
|
||||
```shell
|
||||
gh codespace create -r <em>owner</em>/<em>repo</em> -b <em>branch</em> -m <em>machine-type</em>
|
||||
```
|
||||
|
||||
Replace `owner/repo` with the repository identifier. Replace `branch` with the name of the branch, or the full SHA hash of the commit, that you want to be initially checked out in the codespace. If you use the `-r` flag without the `b` flag, the codespace is created from the default branch.
|
||||
|
||||
Replace `machine-type` with a valid identifier for an available machine type. Identifiers are strings such as: `basicLinux32gb` and `standardLinux32gb`. The type of machines that are available depends on the repository, your user account, and your location. If you enter an invalid or unavailable machine type, the available types are shown in the error message. If you omit this flag and more than one machine type is available you will be prompted to choose one from a list.
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_create).
|
||||
|
||||
{% endcli %}
|
||||
|
|
|
@ -25,11 +25,37 @@ topics:
|
|||
|
||||
{% endnote %}
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. Navigate to the "Your Codespaces" page at [github.com/codespaces](https://github.com/codespaces).
|
||||
|
||||
2. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
|
||||
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
|
||||
|
||||
## Deleting a codespace in {% data variables.product.prodname_vscode %}
|
||||
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
|
||||
|
||||
For information on deleting a codespace in {% data variables.product.prodname_vscode %}, see "[Using Codespaces in Visual Studio Code](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code#deleting-a-codespace-in-visual-studio-code)."
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To delete a codespace use the `gh codespace delete` subcommand and then choose a codespace from the list that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace delete
|
||||
```
|
||||
|
||||
If you have unsaved changes, you'll be prompted to confirm deletion. You can use the `-f` flag to force deletion, avoiding this prompt.
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_delete).
|
||||
|
||||
{% endcli %}
|
||||
|
|
|
@ -49,9 +49,9 @@ For more information on using {% data variables.product.prodname_vscode %}, see
|
|||
|
||||
{% data reusables.codespaces.committing-link-to-procedure %}
|
||||
|
||||
### Using the Command Palette
|
||||
### Using the {% data variables.product.prodname_vscode_command_palette %}
|
||||
|
||||
The Command Palette allows you to access and manage many features for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information, see "[Using the Command Palette in {% data variables.product.prodname_codespaces %}](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces)."
|
||||
The {% data variables.product.prodname_vscode_command_palette %} allows you to access and manage many features for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode %}. For more information, see "[Using the {% data variables.product.prodname_vscode_command_palette %} in {% data variables.product.prodname_codespaces %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)."
|
||||
|
||||
## Navigating to an existing codespace
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ shortTitle: Forward ports
|
|||
|
||||
## About forwarded ports
|
||||
|
||||
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on port 4000, you can access the application from your browser to test and debug the application.
|
||||
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
|
||||
|
||||
When an application running inside a codespace outputs a port to the console, {% data variables.product.prodname_codespaces %} detects the localhost URL pattern and automatically forwards the port. You can click on the URL in the terminal to open the port in a browser. For example, if an application outputs `http://127.0.0.1:4000` or `http://localhost:4000` to the console, the log would automatically convert the output to a clickable URL for port 4000. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
|
||||
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_github_codespaces %} in the browser or in {% data variable.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
|
||||
|
||||
![Automatic port forwarding](/assets/images/help/codespaces/automatic-port-forwarding.png)
|
||||
|
||||
|
@ -29,11 +29,18 @@ You can also forward a port manually, label forwarded ports, share forwarded por
|
|||
|
||||
You can manually forward a port that wasn't forwarded automatically.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Under the list of ports, click **Add port**.
|
||||
![Add port button](/assets/images/help/codespaces/add-port-button.png)
|
||||
|
||||
![Add port button](/assets/images/help/codespaces/add-port-button.png)
|
||||
|
||||
1. Type the port number or address, then press enter.
|
||||
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
|
||||
|
||||
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
|
||||
|
||||
## Using HTTPS forwarding
|
||||
|
||||
|
@ -44,14 +51,37 @@ By default, {% data variables.product.prodname_codespaces %} forwards ports usin
|
|||
![Option to change port protocol](/assets/images/help/codespaces/update-port-protocol.png)
|
||||
1. Select the protocol needed for this port. The protocol that you select will be remembered for this port for the lifetime of the codespace.
|
||||
|
||||
## Labeling a port
|
||||
|
||||
You can label a port to make the port more easily identifiable in a list.
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Hover over the port you want to label, then click the label icon.
|
||||
![Label icon for port](/assets/images/help/codespaces/label-icon.png)
|
||||
{% data reusables.codespaces.type-port-label %}
|
||||
1. Under the list of ports, click **Add port**.
|
||||
|
||||
![Add port button](/assets/images/help/codespaces/add-port-button.png)
|
||||
|
||||
1. Type the port number or address, then press enter.
|
||||
|
||||
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To forward a port use the `gh codespace ports forward` subcommand. Replace `codespace-port:local-port` with the remote and local ports that you want to connect. After entering the command choose from the list of codespaces that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace ports forward <em>codespace-port</em>:<em>local-port</em>
|
||||
```
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_forward).
|
||||
|
||||
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Sharing a port
|
||||
|
||||
|
@ -61,7 +91,11 @@ You can label a port to make the port more easily identifiable in a list.
|
|||
|
||||
{% endnote %}
|
||||
|
||||
If you want to share a forwarded port with others, you can either make the port private to your organization or make the port public. After you make a port private to your organization, anyone in the organization with the port's URL can view the running application. After you make a port public, anyone with the port's URL can view the running application without needing to authenticate.
|
||||
If you want to share a forwarded port with others, you can either make the port private to your organization or make the port public. After you make a port private to your organization, anyone in the organization with the port's URL can view the running application. After you make a port public, anyone who knows the URL and port number can view the running application without needing to authenticate.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**.
|
||||
|
@ -70,6 +104,48 @@ If you want to share a forwarded port with others, you can either make the port
|
|||
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
|
||||
1. Send the copied URL to the person you want to share the port with.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Right click the port you want to share, then click **Make Public**.
|
||||
![Option to make port public in right-click menu](/assets/images/help/codespaces/make-public-option.png)
|
||||
1. To the right of the local address for the port, click the copy icon.
|
||||
![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
|
||||
1. Send the copied URL to the person you want to share the port with.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
To change the visibility of a forwarded port, use the `gh codespace ports visibility` subcommand. {% data reusables.codespaces.port-visibility-settings %}
|
||||
|
||||
Replace `codespace-port` with the forwarded port number. Replace `setting` with `private`, `org`, or `public`. After entering the command choose from the list of codespaces that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility <em>codespace-port</em>:<em>setting</em>
|
||||
```
|
||||
|
||||
You can set the visibility for multiple ports with one command. For example:
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility 80:private 3000:public 3306:org
|
||||
```
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_visibility).
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Labeling a port
|
||||
|
||||
You can label a port to make the port more easily identifiable in a list.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Hover over the port you want to label, then click the label icon.
|
||||
![Label icon for port](/assets/images/help/codespaces/label-icon.png)
|
||||
{% data reusables.codespaces.type-port-label %}
|
||||
|
||||
## Adding a port to the codespace configuration
|
||||
|
||||
You can add a forwarded port to the {% data variables.product.prodname_codespaces %} configuration for the repository, so the port will automatically be forwarded for all codespaces created from the repository. After you update the configuration, any previously created codespaces must be rebuilt for the change to apply. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#applying-changes-to-your-configuration)."
|
||||
|
|
|
@ -16,5 +16,6 @@ children:
|
|||
- /forwarding-ports-in-your-codespace
|
||||
- /changing-the-machine-type-for-your-codespace
|
||||
- /using-codespaces-in-visual-studio-code
|
||||
- /using-codespaces-with-github-cli
|
||||
---
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ Use the {% data variables.product.prodname_vs %} Marketplace to install the [{%
|
|||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
|
||||
|
||||
![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png)
|
||||
|
||||
3. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
4. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
|
||||
|
@ -40,9 +42,13 @@ Use the {% data variables.product.prodname_vs %} Marketplace to install the [{%
|
|||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
|
||||
|
||||
![The {% data variables.product.prodname_codespaces %} header](/assets/images/help/codespaces/codespaces-header-vscode.png)
|
||||
|
||||
3. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
|
||||
|
||||
![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png)
|
||||
|
||||
4. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
5. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
|
||||
|
@ -50,22 +56,14 @@ Use the {% data variables.product.prodname_vs %} Marketplace to install the [{%
|
|||
|
||||
## Creating a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
After you connect your account on {% data variables.product.product_location %} to the {% data variables.product.prodname_github_codespaces %} extension, you can develop in a codespace that you created on {% data variables.product.product_name %} or in {% data variables.product.prodname_vscode %}.
|
||||
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Click the Add icon, then click **Create New Codespace**.
|
||||
![The Create new Codespace option in {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/create-codespace-vscode.png)
|
||||
3. Type, then click the repository's name you want to develop in.
|
||||
![Searching for repository to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-repository-vscode.png)
|
||||
4. Click the branch you want to develop on.
|
||||
![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-branch-vscode.png)
|
||||
5. Click the machine type you want to develop in.
|
||||
![Instance types for a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-sku-vscode.png)
|
||||
## Opening a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
2. Under "Codespaces", click the codespace you want to develop in.
|
||||
3. Click the Connect to Codespace icon.
|
||||
|
||||
![The Connect to Codespace icon in {% data variables.product.prodname_vscode %}](/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png)
|
||||
|
||||
## Changing the machine type in {% data variables.product.prodname_vscode %}
|
||||
|
@ -76,15 +74,17 @@ You can change the machine type of your codespace at any time.
|
|||
|
||||
1. In {% data variables.product.prodname_vscode %}, open the Command Palette (`shift command P` / `shift control P`).
|
||||
2. Search for and select "Codespaces: Change Machine Type."
|
||||
|
||||
![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-type-option.png)
|
||||
|
||||
3. Click the codespace that you want to change.
|
||||
|
||||
![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-choose-repo.png)
|
||||
|
||||
4. Choose the machine type you want to use.
|
||||
|
||||
If the codespace is currently running, a message is displayed asking if you would like to restart and reconnect to your codespace now. Click **Yes** if you want to change the machine type used for this codespace immediately. If you click **No**, or if the codespace is not currently running, the change will take effect the next time the codespace restarts.
|
||||
|
||||
## Deleting a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
1. Under "Codespaces", right-click the codespace you want to delete.
|
||||
2. In the drop-down menu, click **Delete Codespace**.
|
||||
![Deleting a codespace in {% data variables.product.prodname_dotcom %}](/assets/images/help/codespaces/delete-codespace-vscode.png)
|
||||
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
---
|
||||
title: Using Codespaces with GitHub CLI
|
||||
shortTitle: GitHub CLI
|
||||
intro: 'You can work with {% data variables.product.prodname_github_codespaces %} directly from your command line by using `gh`, the {% data variables.product.product_name %} command line interface.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
fpt: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Codespaces
|
||||
- CLI
|
||||
- Developer
|
||||
---
|
||||
|
||||
## About {% data variables.product.prodname_cli %}
|
||||
|
||||
{% data reusables.cli.about-cli %} For more information, see "[About {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)."
|
||||
|
||||
You can work with {% data variables.product.prodname_codespaces %} in the {% data variables.product.prodname_cli %} to:
|
||||
- [List your codespaces](#list-all-of-your-codespaces)
|
||||
- [Create a codespace](#create-a-new-codespace)
|
||||
- [Stop a codespace](#stop-a-codespace)
|
||||
- [Delete a codespace](#delete-a-codespace)
|
||||
- [SSH into a codespace](#ssh-into-a-codespace)
|
||||
- [Open a codespace in {% data variables.product.prodname_vscode %}](#open-a-codespace-in-visual-studio-code)
|
||||
- [Copying a file to/from a codespace](#copying-a-file-tofrom-a-codespace)
|
||||
- [Modify ports in a codespace](#modify-ports-in-a-codespace)
|
||||
- [Access codespace logs](#access-codespace-logs)
|
||||
|
||||
## Installing {% data variables.product.prodname_cli %}
|
||||
|
||||
{% data reusables.cli.cli-installation %}
|
||||
|
||||
## Using {% data variables.product.prodname_cli %}
|
||||
|
||||
If you have not already done so, run `gh auth login` to authenticate with your {% data variables.product.prodname_dotcom %} account.
|
||||
|
||||
To use `gh` to work with {% data variables.product.prodname_codespaces %}, type `gh codespace <COMMAND>` or its alias `gh cs <COMMAND>`.
|
||||
|
||||
As an example of a series of commands you might use to work with {% data variables.product.prodname_github_codespaces %}, you could:
|
||||
|
||||
* List your current codespaces, to check whether you have a codespace for a particular repository:<br>
|
||||
`gh codespace list`
|
||||
* Create a new codespace for the required repository branch:<br>
|
||||
`gh codespace create -r github/docs -b main`
|
||||
* SSH into the new codespace:<br>
|
||||
`gh codespace ssh -c mona-github-docs-v4qxrv7rfwv9w`
|
||||
* Forward a port to your local machine:<br>
|
||||
`gh codespace ports forward 8000:8000 -c mona-github-docs-v4qxrv7rfwv9w`
|
||||
|
||||
## `gh` commands for {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
The sections below give example commands for each of the available operations.
|
||||
|
||||
For a complete reference of `gh` commands for {% data variables.product.prodname_github_codespaces %}, including details of all available options for each command, see the {% data variables.product.prodname_cli %} online help for "[gh codespace](https://cli.github.com/manual/gh_codespace)." Alternatively, use `gh codespace [<SUBCOMMAND>...] --help` on the command line.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The `-c <em>codespace-name</em>` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### List all of your codespaces
|
||||
|
||||
```shell
|
||||
gh codespace list
|
||||
```
|
||||
|
||||
The list includes the unique name of each codespace, which you can use in other `gh codespace` commands.
|
||||
|
||||
### Create a new codespace
|
||||
|
||||
```shell
|
||||
gh codespace create -r <em>owner/repository</em> [-b <em>branch</em>]
|
||||
```
|
||||
|
||||
For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
|
||||
|
||||
### Stop a codespace
|
||||
|
||||
```shell
|
||||
gh codespace stop -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
For more information, see "[Deep dive into Codespaces](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)."
|
||||
|
||||
### Delete a codespace
|
||||
|
||||
```shell
|
||||
gh codespace delete -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
For more information, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
|
||||
|
||||
### SSH into a codespace
|
||||
|
||||
To run commands on the remote codespace machine, from your terminal, you can SSH into the codespace.
|
||||
|
||||
```shell
|
||||
gh codespace ssh -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} copies your GitHub SSH keys into the codespace on creation for a seamless authentication experience. You may be asked to enter the passphrase for your SSH key, after which you will get a command prompt from the remote codespace machine.
|
||||
|
||||
If you don't have any SSH keys, follow the instructions in "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)."
|
||||
|
||||
### Open a codespace in {% data variables.product.prodname_vscode %}
|
||||
|
||||
```shell
|
||||
gh codespace code -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
For more information, see "[Using {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)."
|
||||
|
||||
### Copy a file to/from a codespace
|
||||
|
||||
```shell
|
||||
gh codespace cp [-r] <em>source(s)</em> <em>destination</em>
|
||||
```
|
||||
|
||||
Use the prefix `remote:` on a file or directory name to indicate that it's on the codespace. As with the UNIX `cp` command, the first argument specifies the source and the last specifies the destination. If the destination is a directory, you can specify multiple sources. Use the `-r` (recursive) flag if any of the sources is a directory.
|
||||
|
||||
The location of files and directories on the codespace is relative to the home directory of the remote user.
|
||||
|
||||
#### Examples
|
||||
|
||||
* Copy a file from the local machine to the `$HOME` directory of a codespace:
|
||||
|
||||
`gh codespace cp myfile.txt remote:`
|
||||
|
||||
* Copy a file to the directory in which a repository is checked out in a codespace:
|
||||
|
||||
`gh codespace cp myfile.txt remote:/workspaces/<REPOSITORY-NAME>`
|
||||
|
||||
* Copy a file from a codespace to the current directory on the local machine:
|
||||
|
||||
`gh codespace cp remote:myfile.txt .`
|
||||
|
||||
* Copy three local files to the `$HOME/temp` directory of a codespace:
|
||||
|
||||
`gh codespace cp a1.txt a2.txt a3.txt remote:temp`
|
||||
|
||||
* Copy three files from a codespace to the current working directory on the local machine:
|
||||
|
||||
`gh codespace cp remote:a1.txt remote:a2.txt remote:a3.txt .`
|
||||
|
||||
* Copy a local directory into the `$HOME` directory of a codespace:
|
||||
|
||||
`gh codespace cp -r mydir remote:`
|
||||
|
||||
* Copy a directory from a codespace to the local machine, changing the directory name:
|
||||
|
||||
`gh codespace cp -r remote:mydir mydir-localcopy`
|
||||
|
||||
For more information about the `gh codespace cp` command, including additional flags you can use, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_cp).
|
||||
|
||||
### Modify ports in a codespace
|
||||
|
||||
You can forward a port on a codespace to a local port. The port remains forwarded as long as the process is running. To stop forwarding the port, press <kbd>control</kbd>+<kbd>c</kbd>.
|
||||
|
||||
```shell
|
||||
gh codespace ports forward <em>codespace-port-number</em>:<em>local-port-number</em> -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
|
||||
|
||||
You can set the visibility of a forwarded port. {% data reusables.codespaces.port-visibility-settings %}
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility <em>codespace-port</em>:<em>private|org|public</em> -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
You can set the visibility for multiple ports with one command. For example:
|
||||
|
||||
```shell
|
||||
gh codespace ports visibility 80:private 3000:public 3306:org -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
|
||||
### Access codespace logs
|
||||
|
||||
You can see the creation log for a codespace. After entering this command you will be asked to enter the passphrase for your SSH key.
|
||||
|
||||
```shell
|
||||
gh codespace logs -c <em>codespace-name</em>
|
||||
```
|
||||
|
||||
For more information about the creation log, see "[Codespaces logs](/codespaces/troubleshooting/codespaces-logs#creation-logs)."
|
|
@ -59,7 +59,7 @@ As you develop in your codespace, it will save any changes to your files every f
|
|||
|
||||
### Closing or stopping your codespace
|
||||
|
||||
To stop your codespace you can [use the command palette](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace) (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)). If you exit your codespace without running the stop command (for example, closing the browser tab), or if you leave the codespace running without interaction, the codespace and its running processes will continue until a window of inactivity occurs, after which the codespace will stop. By default, the window of inactivity is 30 minutes.
|
||||
To stop your codespace you can [use the {% data variables.product.prodname_vscode_command_palette %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces#suspending-or-stopping-a-codespace) (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)). If you exit your codespace without running the stop command (for example, closing the browser tab), or if you leave the codespace running without interaction, the codespace and its running processes will continue until a window of inactivity occurs, after which the codespace will stop. By default, the window of inactivity is 30 minutes.
|
||||
|
||||
When you close or stop your codespace, all uncommitted changes are preserved until you connect to the codespace again.
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ includeGuides:
|
|||
- /codespaces/developing-in-codespaces/deleting-a-codespace
|
||||
- /codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-with-github-cli
|
||||
- /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
|
||||
|
|
|
@ -23,26 +23,79 @@ Information on {% data variables.product.prodname_codespaces %} is output to thr
|
|||
|
||||
These logs contain detailed information about the codespace, the container, the session, and the {% data variables.product.prodname_vscode %} environment. They are useful for diagnosing connection issues and other unexpected behavior. For example, the codespace freezes but the "Reload Windows" option unfreezes it for a few minutes, or you are randomly disconnected from the codespace but able to reconnect immediately.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, ensure that you are connected to the codespace you want to debug.
|
||||
2. Open the Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
|
||||
3. Define where to save the zip archive of logs then click **Save** (desktop) or click **OK** (web).
|
||||
4. If you are using {% data variables.product.prodname_codespaces %} in the browser, right-click on the zip archive of logs from the Explorer view and select **Download…** to download them to your local machine.
|
||||
1. Open the {% data variables.product.prodname_vscode %} Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
|
||||
1. Define where to save the zip archive of logs then click **Save** (desktop) or click **OK** (web).
|
||||
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, right-click on the zip archive of logs from the Explorer view and select **Download…** to download them to your local machine.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
1. Open the {% data variables.product.prodname_vscode %} Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
|
||||
1. Define where to save the zip archive of logs then click **Save** (desktop) or click **OK** (web).
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
Currently you can't use {% data variables.product.prodname_cli %} to access these logs. To access them, open your codespace in {% data variables.product.prodname_vscode %} or in a browser.
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Creation logs
|
||||
|
||||
These logs contain information about the container, dev container, and their configuration. They are useful for debugging configuration and setup problems.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. Connect to the codespace you want to debug.
|
||||
2. Open the Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
|
||||
2. Open the {% data variables.product.prodname_vscode_command_palette %} (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
|
||||
|
||||
If you want to share the log with support, you can copy the text from the creation log into a text editor and save the file locally.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
Open the Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
|
||||
|
||||
If you want to share the log with support, you can copy the text from the creation log into a text editor and save the file locally.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To see the creation log use the `gh codespace logs` subcommand. After entering the command choose from the list of codespaces that's displayed.
|
||||
|
||||
```shell
|
||||
gh codespace logs
|
||||
```
|
||||
|
||||
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_logs).
|
||||
|
||||
If you want to share the log with support, you can save the output to a file:
|
||||
|
||||
```shell
|
||||
gh codespace logs -c <CODESPACE-NAME> > /path/to/logs.txt
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Extension logs
|
||||
|
||||
These logs are available for {% data variables.product.prodname_vscode %} desktop users only. They are useful if it seems like the {% data variables.product.prodname_codespaces %} extension or {% data variables.product.prodname_vscode %} editor are having issues that prevent creation or connection.
|
||||
|
||||
1. In {% data variables.product.prodname_vscode %}, open the Command Palette.
|
||||
2. Type **Logs** and select **Developer: Open Extension Logs Folder** from the list to open the extension log folder in your system's file explorer.
|
||||
1. Type **Logs** and select **Developer: Open Extension Logs Folder** from the list to open the extension log folder in your system's file explorer.
|
||||
|
||||
From this view, you can access logs generated by the various extensions that you use in {% data variables.product.prodname_vscode %}. You will see logs for GitHub Codespaces, GitHub Authentication, and Git, in addition to any other extensions you have enabled.
|
||||
|
||||
|
@ -51,6 +104,6 @@ From this view, you can access logs generated by the various extensions that you
|
|||
These logs are useful only if you want to debug problems with using {% data variables.product.prodname_codespaces %} in the browser. They are useful for debugging problems creating and connecting to {% data variables.product.prodname_codespaces %}.
|
||||
|
||||
1. In the browser window for the codespace you want to debug, open the developer tools window.
|
||||
2. Display the "Console" tab and click **errors** in the left side bar to show only the errors.
|
||||
3. In the log area on the right, right-click and select **Save as** to save a copy of the errors to your local machine.
|
||||
1. Display the "Console" tab and click **errors** in the left side bar to show only the errors.
|
||||
1. In the log area on the right, right-click and select **Save as** to save a copy of the errors to your local machine.
|
||||
![Save errors](/assets/images/help/codespaces/browser-console-log-save.png)
|
||||
|
|
|
@ -54,4 +54,4 @@ Some more destructive options:
|
|||
This codespace is currently running in recovery mode due to a container error.
|
||||
```
|
||||
|
||||
Review the creation logs, update the configuration as needed, and run **Codespaces: Rebuild Container** in the command palette to retry. For more information, see " [Codespaces logs](/codespaces/troubleshooting/codespaces-logs)" and "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
Review the creation logs, update the configuration as needed, and run **Codespaces: Rebuild Container** in the {% data variables.product.prodname_vscode_command_palette %} to retry. For more information, see " [Codespaces logs](/codespaces/troubleshooting/codespaces-logs)" and "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
|
|
|
@ -74,6 +74,7 @@ Name | Description
|
|||
**`admin:gpg_key`** | Fully manage GPG keys.
|
||||
 `write:gpg_key`| Create, list, and view details for GPG keys.
|
||||
 `read:gpg_key`| List and view details for GPG keys.{% ifversion fpt or ghec %}
|
||||
**`codespace`** | Grants the ability to create and manage codespaces. Codespaces can expose a GITHUB_TOKEN which may have a different set of scopes. For more information, see "[Security in Codespaces](/codespaces/codespaces-reference/security-in-codespaces#authentication)."
|
||||
**`workflow`** | Grants the ability to add and update {% data variables.product.prodname_actions %} workflow files. Workflow files can be committed without this scope if the same file (with both the same path and contents) exists on another branch in the same repository. Workflow files can expose `GITHUB_TOKEN` which may have a different set of scopes. For more information, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)."{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
|
|
@ -60,4 +60,3 @@ children:
|
|||
- /getting-started-with-git
|
||||
- /using-git
|
||||
---
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ Let's commit a change to the *README* file.
|
|||
|
||||
Now that you have created a project, you can start committing changes.
|
||||
|
||||
*README* files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The contents of your *README* file are automatically shown on the front page of your repository. Follow these steps to add a *README* file.
|
||||
*README* files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The contents of your *README* file are automatically shown on the front page of your repository. Follow these steps to add a *README* file.
|
||||
|
||||
1. In the command line, navigate to the root directory of your new project. (This directory was created when you ran the `gh repo create` command.)
|
||||
1. Create a *README* file with some information about the project.
|
||||
|
|
|
@ -0,0 +1,213 @@
|
|||
---
|
||||
title: GitHub Command Palette
|
||||
intro: 'Use the command palette in {% data variables.product.product_name %} to navigate, search, and run commands directly from your keyboard.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
feature: 'command-palette'
|
||||
shortTitle: GitHub Command Palette
|
||||
---
|
||||
|
||||
{% data reusables.command-palette.beta-note %}
|
||||
|
||||
## About the {% data variables.product.prodname_command_palette %}
|
||||
|
||||
You can navigate, search, and run commands on {% data variables.product.product_name %} with the {% data variables.product.prodname_command_palette %}. The command palette is an on-demand way to show suggestions based on your current context and resources you've used recently. You can open the command palette with a keyboard shortcut from anywhere on {% data variables.product.product_name %}, which saves you time and keeps your hands on the keyboard.
|
||||
|
||||
### Fast navigation
|
||||
|
||||
When you open the command palette, the suggestions are optimized to give you easy access from anywhere in a repository, user account, or organization to top-level pages like the Issues page. If the location you want isn't listed, start entering the name or number for the location to refine the suggestions.
|
||||
|
||||
![Command palette repository suggestions](/assets/images/help/command-palette/command-palette-navigation-repo-default.png)
|
||||
|
||||
### Easy access to commands
|
||||
|
||||
The ability to run commands directly from your keyboard, without navigating through a series of menus, may change the way you use {% data variables.product.prodname_dotcom %}. For example, you can switch themes with a few keystrokes, making it easy to toggle between themes as your needs change.
|
||||
|
||||
![Command palette change theme](/assets/images/help/command-palette/command-palette-command-change-theme.png)
|
||||
|
||||
## Opening the {% data variables.product.prodname_command_palette %}
|
||||
|
||||
Open the command palette using one of the following keyboard shortcuts:
|
||||
- Windows and Linux: <kbd>Ctl</kbd><kbd>k</kbd> or <kbd>Ctl</kbd><kbd>alt</kbd><kbd>k</kbd>
|
||||
- Mac: <kbd>⌘</kbd><kbd>k</kbd> or <kbd>⌘</kbd><kbd>option</kbd><kbd>k</kbd>
|
||||
|
||||
When you open the command palette, it shows your location at the top left and uses it as the scope for suggestions (for example, the `mashed-avocado` organization).
|
||||
|
||||
![Command palette launch](/assets/images/help/command-palette/command-palette-launch.png)
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes:**
|
||||
- If you are editing Markdown text, open the command palette with <kbd>Ctl</kbd><kbd>alt</kbd><kbd>k</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>option</kbd><kbd>k</kbd> (Mac).
|
||||
- If you are working on a project (beta), a project-specific command palette is displayed instead. For more information, see "[Customizing your project (beta) views](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Navigating with the {% data variables.product.prodname_command_palette %}
|
||||
|
||||
You can use the command palette to navigate to any page that you have access to on {% data variables.product.product_name %}.
|
||||
|
||||
{% data reusables.command-palette.open-palette %}
|
||||
|
||||
2. Start typing the path you want to navigate to. The suggestions in the command palette change to match your text.
|
||||
|
||||
![Command palette navigation current scope](/assets/images/help/command-palette/command-palette-navigation-current-scope.png)
|
||||
|
||||
{% data reusables.command-palette.change-scope %}
|
||||
|
||||
You can also use keystrokes to narrow your search. For more information, see "[Keystroke functions](#keystroke-functions)."
|
||||
|
||||
4. Finish entering the path, or use the arrow keys to highlight the path you want from the list of suggestions.
|
||||
|
||||
5. Use <kbd>Enter</kbd> to jump to your chosen location. Alternatively, use <kbd>Ctl</kbd><kbd>Enter</kbd> (Windows and Linx) or <kbd>⌘</kbd><kbd>Enter</kbd> (Mac) to open the location in a new browser tab.
|
||||
|
||||
## Searching with the {% data variables.product.prodname_command_palette %}
|
||||
|
||||
You can use the command palette to search for anything on {% data variables.product.product_location %}.
|
||||
|
||||
{% data reusables.command-palette.open-palette %}
|
||||
|
||||
{% data reusables.command-palette.change-scope %}
|
||||
|
||||
3. Optionally, use keystrokes to find specific types of resource:
|
||||
|
||||
- <kbd>#</kbd> Search for issues, pull requests, discussions, and projects
|
||||
- <kbd>!</kbd> Search for projects
|
||||
- <kbd>@</kbd> Search for users, organizations, and repositories
|
||||
- <kbd>/</kbd> Search for files within a repository scope
|
||||
|
||||
![Command palette search files](/assets/images/help/command-palette/command-palette-search-files.png)
|
||||
|
||||
4. Begin entering your search terms. The command palette will offer you a range of suggested searches based on your search scope.
|
||||
|
||||
{% tip %}
|
||||
|
||||
You can also use the full syntax of {% data variables.product.prodname_dotcom %}'s integrated search within the command palette. For more information, see "[Searching for information on {% data variables.product.prodname_dotcom %}](/search-github)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
5. Use the arrow keys to highlight the search result you want and use <kbd>Enter</kbd> to jump to your chosen location. Alternatively, use <kbd>Ctl</kbd><kbd>Enter</kbd> (Windows and Linx) or <kbd>⌘</kbd><kbd>Enter</kbd> (Mac) to open the location in a new browser tab.
|
||||
|
||||
## Running commands from the {% data variables.product.prodname_command_palette %}
|
||||
|
||||
You can use the {% data variables.product.prodname_command_palette %} to run commands. For example, you can create a new repository or issue, or change your theme. When you run a command, the location for its action is determined by either the underlying page or the scope shown in the command palette.
|
||||
|
||||
- Pull request and issue commands always run on the underlying page.
|
||||
- Higher-level commands, for example, repository commands, run in the scope shown in the command palette.
|
||||
|
||||
For a full list of supported commands, see "[{% data variables.product.prodname_command_palette %} reference](##github-command-palette-reference)."
|
||||
|
||||
1. Use <kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>k</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>Shift</kbd><kbd>k</kbd> (Mac) to open the command palette in command mode. If you already have the command palette open, press <kbd>></kbd> to switch to command mode. {% data variables.product.prodname_dotcom %} suggests commands based on your location.
|
||||
|
||||
![Command palette command mode](/assets/images/help/command-palette/command-palette-command-mode.png)
|
||||
|
||||
{% data reusables.command-palette.change-scope %}
|
||||
|
||||
3. If the command you want is not displayed, check your scope then start entering the command name in the text box.
|
||||
|
||||
4. Use the arrow keys to highlight the command you want and use <kbd>Enter</kbd> to run it.
|
||||
|
||||
## {% data variables.product.prodname_command_palette %} reference
|
||||
|
||||
### Keystroke functions
|
||||
|
||||
These keystrokes are available when the command palette is in navigation and search modes, that is, they are not available in command mode.
|
||||
|
||||
| Keystroke | Function |
|
||||
| :- | :- |
|
||||
|<kbd>></kbd>| Enter command mode. For more information, see "[Running commands from the {% data variables.product.prodname_command_palette %}](#running-commands-from-the-github-command-palette)." |
|
||||
|<kbd>#</kbd>| Search for issues, pull requests, discussions, and projects. For more information, see "[Searching with the {% data variables.product.prodname_command_palette %}](#searching-with-the-github-command-palette)."|
|
||||
|<kbd>@</kbd>| Search for users, organizations, and repositories. For more information, see "[Searching with the {% data variables.product.prodname_command_palette %}](#searching-with-the-github-command-palette)."|
|
||||
|<kbd>/</kbd>| Search for files within a repository scope or repositories within an organization scope. For more information, see "[Searching with the {% data variables.product.prodname_command_palette %}](#searching-with-the-github-command-palette)." |
|
||||
|<kbd>!</kbd>| Search just for projects. For more information, see "[Searching with the {% data variables.product.prodname_command_palette %}](#searching-with-the-github-command-palette)."|
|
||||
|<kbd>Ctrl</kbd><kbd>c</kbd> or <kbd>⌘</kbd><kbd>c</kbd>| Copy the search or navigation URL for the highlighted result to the clipboard.|
|
||||
|<kbd>Enter</kbd>| Jump to the highlighted result or run the highlighted command.|
|
||||
|<kbd>Ctrl</kbd><kbd>Enter</kbd> or <kbd>⌘</kbd><kbd>Enter</kbd>| Open the highlighted search or navigation result in a new brower tab.|
|
||||
|<kbd>?</kbd>| Display help within the command palette.|
|
||||
|
||||
### Global commands
|
||||
|
||||
These commands are available from all scopes.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- | :- |
|
||||
|`Import repository`|Create a new repository by importing a project from another version control system. For more information, see "[Importing a repository with GitHub importer](/github/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer)." |
|
||||
|`New gist`|Open a new gist. For more information, see "[Creating a gist](/github/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)." |
|
||||
|`New organization`|Create a new organization. For more information, see "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)." |
|
||||
|`New project`|Create a new project board. For more information, see "[Creating a project](/issues/trying-out-the-new-projects-experience/creating-a-project)." |
|
||||
|`New repository`|Create a new repository from scratch. For more information, see "[Creating a new repository](/repositories/creating-and-managing-repositories/creating-a-new-repository)." |
|
||||
|`Switch theme to <theme name>`|Change directly to a different theme for the UI. For more information, see "[Managing your theme settings](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)." |
|
||||
|
||||
|
||||
### Organization commands
|
||||
|
||||
These commands are available only within the scope of an organization.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
| `New team`| Create a new team in the current organization. For more information, see "[Creating a team](/organizations/organizing-members-into-teams/creating-a-team)."
|
||||
|
||||
### Repository commands
|
||||
|
||||
Most of these commands are available only on the home page of the repository. If a command is also available on other pages, this is noted in the behavior column.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
|`Clone repository: <URL type>`|Copy the URL needed to clone the repository using {% data variables.product.prodname_cli %}, HTTPS, or SSH to the clipboard. For more information, see "[Cloning a repository](/repositories/creating-and-managing-repositories/cloning-a-repository)."|
|
||||
|`New discussion`|Create a new discussion in the repository. For more information, see "[Creating a new discussion](/discussions/quickstart#creating-a-new-discussion)."|
|
||||
|`New file`|Create a new file from any page in the repository. For more information, see "[Adding a file to a repository](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository)."
|
||||
|`New issue`|Open a new issue from any page in the repository. For more information, see "[Creating an issue](/issues/tracking-your-work-with-issues/creating-an-issue)."|
|
||||
|`Open in new codespace`|Create and open a codespace for this repository. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."|
|
||||
|`Open in github.dev editor`|Open the current repository in the github.dev editor. For more information, see "[Opening the web based editor](/codespaces/the-githubdev-web-based-editor#opening-the-web-based-editor)."|
|
||||
|
||||
### File commands
|
||||
|
||||
These commands are available only when you open the command palette from a file in a repository.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
|`Copy permalink`|Create a link to the file that includes the current commit SHA and copy the link to the clipboard. For more information, see "[Getting permanent links to files](/repositories/working-with-files/using-files/getting-permanent-links-to-files#press-y-to-permalink-to-a-file-in-a-specific-commit)."
|
||||
|`Open in github.dev editor`|Open the currently displayed file in github.dev editor. For more information, see "[Opening the web based editor](/codespaces/the-githubdev-web-based-editor#opening-the-web-based-editor)."|
|
||||
|
||||
### Discussion commands
|
||||
|
||||
These commands are available only when you open the command palette from a discussion. They act on your current page and are not affected by the scope set in the command palette.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
|`Delete discussion...`|Permanently delete the discussion. For more information, see "[Managing discussions in your repository](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository#deleting-a-discussion)."
|
||||
|`Edit discussion body`|Open the main body of the discussion ready for editing.
|
||||
|`Subscribe`/`unsubscribe`|Opt in or out of notifications for additions to the discussion. For more information, see "[About notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)."
|
||||
|`Transfer discussion...`|Move the discussion to a different repository. For more information, see "[Managing discussions in your repository](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository#transferring-a-discussion)."
|
||||
|
||||
### Issue commands
|
||||
|
||||
These commands are available only when you open the command palette from an issue. They act on your current page and are not affected by the scope set in the command palette.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
|`Close`/`reopen issue`|Close or reopen the current issue. For more information, see "[About issues](/issues/tracking-your-work-with-issues/about-issues)."|
|
||||
|`Convert issue to discussion...`|Convert the current issue into a discussion. For more information, see "[Moderating discussions](/discussions/managing-discussions-for-your-community/moderating-discussions#converting-an-issue-to-a-discussion)."
|
||||
|`Delete issue...`|Delete the current issue. For more information, see "[Deleting an issue](/issues/tracking-your-work-with-issues/deleting-an-issue)."|
|
||||
|`Edit issue body`|Open the main body of the issue ready for editing.
|
||||
|`Edit issue title`|Open the title of the issue ready for editing.
|
||||
|`Lock issue`|Limit new comments to users with write access to the repository. For more information, see "[Locking conversations](/communities/moderating-comments-and-conversations/locking-conversations)."
|
||||
|`Pin`/`unpin issue`|Change whether or not the issue is shown in the pinned issues section for the repository. For more information, see "[Pinning an issue to your repository](/issues/tracking-your-work-with-issues/pinning-an-issue-to-your-repository)."|
|
||||
|`Subscribe`/`unscubscribe`|Opt in or out of notifications for changes to this issue. For more information, see "[About notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)."
|
||||
|`Transfer issue...`|Transfer the issue to another repository. For more information, see "[Transferring an issue to another repository](/issues/tracking-your-work-with-issues/transferring-an-issue-to-another-repository)."|
|
||||
|
||||
### Pull request commands
|
||||
|
||||
These commands are available only when you open the command palette from a pull request. They act on your current page and are not affected by the scope set in the command palette.
|
||||
|
||||
| Command | Behavior|
|
||||
| :- | :- |
|
||||
|`Close`/`reopen pull request`|Close or reopen the current pull request. For more information, see "[About pull requests](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."|
|
||||
|`Convert to draft`/`Mark pull request as ready for review`|Change the state of the pull request to show it as ready, or not ready, for review. For more information, see "[Changing the state of a pull request](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request)."|
|
||||
|`Copy current branch name`| Add the name of the head branch for the pull request to the clipboard.
|
||||
|`Edit pull request body`|Open the main body of the pull request ready for editing.
|
||||
|`Edit pull request title`|Open the title of the pull request ready for editing.
|
||||
|`Open in new codespace`|Create and open a codespace for the head branch of the pull request. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
|
||||
|`Subscribe`/`unscubscribe`|Opt in or out of notifications for changes to this pull request. For more information, see "[About notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)."
|
||||
|`Update current branch`|Update the head branch of the pull request with changes from the base branch. This is available only for pull requests that target the default branch of the repository. For more information, see "[About branches](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)."|
|
|
@ -16,6 +16,6 @@ children:
|
|||
- /github-desktop
|
||||
- /github-for-mobile
|
||||
- /keyboard-shortcuts
|
||||
- /github-command-palette
|
||||
- /troubleshooting-connectivity-problems
|
||||
---
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ versions:
|
|||
Typing <kbd>?</kbd> on {% data variables.product.prodname_dotcom %} brings up a dialog box that lists the keyboard shortcuts available for that page. You can use these keyboard shortcuts to perform actions across the site without using your mouse to navigate.
|
||||
|
||||
Below is a list of some of the available keyboard shortcuts.
|
||||
{% if command-palette %}
|
||||
The {% data variables.product.prodname_command_palette %} also gives you quick access to a wide range of actions, without the need to remember keyboard shortcuts. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)."{% endif %}
|
||||
|
||||
## Site wide shortcuts
|
||||
|
||||
|
@ -27,6 +29,7 @@ Below is a list of some of the available keyboard shortcuts.
|
|||
|<kbd>s</kbd> or <kbd>/</kbd> | Focus the search bar. For more information, see "[About searching on {% data variables.product.company_short %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github)."
|
||||
|<kbd>g</kbd> <kbd>n</kbd> | Go to your notifications. For more information, see {% ifversion fpt or ghes or ghae or ghec %}"[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications){% else %}"[About notifications](/github/receiving-notifications-about-activity-on-github/about-notifications){% endif %}."
|
||||
|<kbd>esc</kbd> | When focused on a user, issue, or pull request hovercard, closes the hovercard and refocuses on the element the hovercard is in
|
||||
{% if command-palette %}|<kbd>control</kbd><kbd>k</kbd> or <kbd>command</kbd><kbd>k</kbd> | Opens the {% data variables.product.prodname_command_palette %}. If you are editing Markdown text, open the command palette with <kbd>Ctl</kbd><kbd>alt</kbd><kbd>k</kbd> or <kbd>⌘</kbd><kbd>option</kbd><kbd>k</kbd>. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)."{% endif %}
|
||||
|
||||
## Repositories
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ For more information about what you can do with {% data variables.product.prodna
|
|||
|
||||
## Installing {% data variables.product.prodname_cli %}
|
||||
|
||||
View installation instructions {% data variables.product.prodname_cli %} for macOS, Windows, and Linux on the [{% data variables.product.prodname_cli %} page](https://cli.github.com).
|
||||
{% data reusables.cli.cli-installation %}
|
||||
|
||||
## Sharing feedback
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ featuredLinks:
|
|||
- /github-cli/github-cli/creating-github-cli-extensions
|
||||
- /github-cli/github-cli/using-github-cli-extensions
|
||||
- /actions/guides/using-github-cli-in-workflows
|
||||
- /codespaces/developing-in-codespaces/using-codespaces-with-github-cli
|
||||
popular:
|
||||
- /github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
|
||||
- /issues/tracking-your-work-with-issues/creating-an-issue
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
title: Adding a pull request to the merge queue
|
||||
intro: If merge queues are enabled for the repository, you can add your pull requests to the merge queue once all the required checks have passed. {% data variables.product.product_name %} will merge the pull requests for you.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Add PR to merge queue
|
||||
---
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-beta %}
|
||||
|
||||
## About pull request merge queue
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-overview-short %}
|
||||
{% data reusables.pull_requests.merge-queue-references %}
|
||||
|
||||
## Adding a pull request to the merge queue
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
1. In the "Pull Requests" list, click the pull request you'd like to add to the merge queue.
|
||||
1. Click **Add to merge queue** to add your pull request to the merge queue. This enables the default **Queue and merge in a group** option. Alternatively, you can:
|
||||
- Add your pull request to the front of the queue by selecting the **Add to merge queue** drop down menu, and clicking **Jump the queue** (only available to repository maintainers and administrators).
|
||||
- Directly merge your pull request by selecting the **Add to merge queue** drop down menu, and clicking **Directly merge** (only available to repository administrators).
|
||||
![Merge queue options](/assets/images/help/pull_requests/merge-queue-options.png)
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** The **Add to merge queue** button is only enabled once the pull request meets all the review/approval and status check requirements.
|
||||
|
||||
{% endtip %}
|
||||
2. Confirm you want to add the pull request to the merge queue by clicking **Confirm add to merge queue**.
|
||||
{% data variables.product.product_name %} adds the pull request to the merge queue and will merge it for you.
|
||||
|
||||
## Viewing the merge queue
|
||||
|
||||
You can view the merge queue in various places on {% data variables.product.product_name %}.
|
||||
|
||||
- On the **Branches** page for the repository. We recommend you use this route if you don't have or don't know about a pull request already in the queue, and if you want to see what's in the queue. For more information, see "[Viewing branches in your repository](/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/viewing-branches-in-your-repository)."
|
||||
|
||||
![View merge queue in Branches page](/assets/images/help/pull_requests/merge-queue-branches-page.png)
|
||||
|
||||
- On the **Pull requests** page of your repository, click {% octicon "clock" aria-label="The clock symbol" %}.
|
||||
|
||||
![View merge queue on Pull requests page](/assets/images/help/pull_requests/clock-icon-in-pull-request-list.png)
|
||||
|
||||
- On your pull request, scroll down to the section with the checks, and click **View merge queue**.
|
||||
|
||||
![View Merge queue button on pull request](/assets/images/help/pull_requests/view-merge-queue-button.png)
|
||||
|
||||
The merge queue view shows the pull requests that are currently in the queue, with your pull requests clearly marked.
|
||||
|
||||
![Merge queue view](/assets/images/help/pull_requests/merge-queue-view.png)
|
||||
|
||||
## Handling pull requests removed from the merge queue
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-reject %}
|
|
@ -15,6 +15,7 @@ children:
|
|||
- /about-pull-request-merges
|
||||
- /merging-a-pull-request
|
||||
- /automatically-merging-a-pull-request
|
||||
- /adding-a-pull-request-to-the-merge-queue
|
||||
- /closing-a-pull-request
|
||||
- /reverting-a-pull-request
|
||||
shortTitle: Incorporate changes
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Issues guides
|
||||
shortTitle: Guides
|
||||
intro: 'Learn how you can use {% data variables.product.prodname_github_issues %} to plan and track your work.'
|
||||
allowTitleToDifferFromFilename: true
|
||||
layout: product-sublanding
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
includeGuides:
|
||||
- /issues/trying-out-the-new-projects-experience/automating-projects
|
||||
- /issues/trying-out-the-new-projects-experience/creating-a-project
|
||||
- /issues/trying-out-the-new-projects-experience/customizing-your-project-views
|
||||
- /issues/trying-out-the-new-projects-experience/quickstart
|
||||
- /issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects
|
||||
- /issues/tracking-your-work-with-issues/quickstart
|
||||
- /issues/tracking-your-work-with-issues/creating-an-issue
|
||||
- /issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests
|
||||
- /issues/tracking-your-work-with-issues/planning-and-tracking-work-for-your-team-or-project
|
||||
- /issues/tracking-your-work-with-issues/viewing-all-of-your-issues-and-pull-requests
|
||||
- /issues/organizing-your-work-with-project-boards/managing-project-boards/configuring-automation-for-project-boards
|
||||
- /issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board
|
||||
- /issues/using-labels-and-milestones-to-track-work/managing-labels
|
||||
- /issues/using-labels-and-milestones-to-track-work/creating-and-editing-milestones-for-issues-and-pull-requests
|
||||
---
|
|
@ -15,7 +15,8 @@ featuredLinks:
|
|||
guideCards:
|
||||
- /issues/trying-out-the-new-projects-experience/automating-projects
|
||||
- /issues/tracking-your-work-with-issues/creating-issues/linking-a-pull-request-to-an-issue
|
||||
- /issues/organizing-your-work-with-project-boards/managing-project-boards/configuring-automation-for-project-boards
|
||||
- '{% ifversion ghes or ghae %}/issues/organizing-your-work-with-project-boards/managing-project-boards/configuring-automation-for-project-boards{% endif %}'
|
||||
- /issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects
|
||||
popular:
|
||||
- /issues/tracking-your-work-with-issues/creating-issues/about-issues
|
||||
- /issues/trying-out-the-new-projects-experience/about-projects
|
||||
|
@ -23,7 +24,7 @@ featuredLinks:
|
|||
- /communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates
|
||||
- /issues/using-labels-and-milestones-to-track-work/managing-labels
|
||||
- /github/managing-your-work-on-github/viewing-all-of-your-issues-and-pull-requests
|
||||
- /issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards
|
||||
- '{% ifversion ghes or ghae %}/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards{% endif %}'
|
||||
changelog:
|
||||
label: issues
|
||||
layout: product-landing
|
||||
|
@ -38,6 +39,7 @@ children:
|
|||
- /trying-out-the-new-projects-experience
|
||||
- /organizing-your-work-with-project-boards
|
||||
- /using-labels-and-milestones-to-track-work
|
||||
- /guides
|
||||
redirect_from:
|
||||
- /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests
|
||||
- /github/managing-your-work-on-github/managing-your-work-with-issues
|
||||
|
|
|
@ -12,7 +12,11 @@ versions:
|
|||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Projects
|
||||
- Issues
|
||||
- Project management
|
||||
shortTitle: Configure automation
|
||||
type: how_to
|
||||
---
|
||||
{% data reusables.projects.project_boards_old %}
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@ versions:
|
|||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Issues
|
||||
- Projects
|
||||
- Project management
|
||||
type: how_to
|
||||
---
|
||||
{% data reusables.projects.project_boards_old %}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ topics:
|
|||
- Issues
|
||||
- Project management
|
||||
shortTitle: Create an issue
|
||||
type: how_to
|
||||
---
|
||||
|
||||
Issues can be used to keep track of bugs, enhancements, or other requests. For more information, see "[About issues](/issues/tracking-your-work-with-issues/about-issues)."
|
||||
|
|
|
@ -42,6 +42,7 @@ topics:
|
|||
- Issues
|
||||
- Pull requests
|
||||
shortTitle: Filter and search
|
||||
type: how_to
|
||||
---
|
||||
|
||||
{% data reusables.cli.filter-issues-and-pull-requests-tip %}
|
||||
|
|
|
@ -6,6 +6,10 @@ versions:
|
|||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
type: overview
|
||||
topics:
|
||||
- Project management
|
||||
- Projects
|
||||
---
|
||||
## Introduction
|
||||
You can use {% data variables.product.prodname_dotcom %} repositories, issues, project boards, and other tools to plan and track your work, whether working on an individual project or cross-functional team.
|
||||
|
@ -88,13 +92,13 @@ Below is an example of a `front-end` label that we created and added to the issu
|
|||
## Adding issues to a project board
|
||||
{% ifversion fpt or ghec %}You can use projects on {% data variables.product.prodname_dotcom %}, currently in limited public beta, to plan and track the work for your team. A project is a customizable spreadsheet that integrates with your issues and pull requests on {% data variables.product.prodname_dotcom %}, automatically staying up-to-date with the information on {% data variables.product.prodname_dotcom %}. You can customize the layout by filtering, sorting, and grouping your issues and PRs. To get started with projects, see "[Quickstart for projects (beta)](/issues/trying-out-the-new-projects-experience/quickstart)."
|
||||
### Project (beta) example
|
||||
Here is the table view of an example project, populated with the Project Octocat issues we have created.
|
||||
Here is the table layout of an example project, populated with the Project Octocat issues we have created.
|
||||
|
||||
![Projects (beta) table view example](/assets/images/help/issues/quickstart-projects-table-view.png)
|
||||
![Projects (beta) table layout example](/assets/images/help/issues/quickstart-projects-table-view.png)
|
||||
|
||||
We can also view the same project as a board.
|
||||
|
||||
![Projects (beta) board view example](/assets/images/help/issues/quickstart-projects-board-view.png)
|
||||
![Projects (beta) board layout example](/assets/images/help/issues/quickstart-projects-board-view.png)
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -57,4 +57,4 @@ gh issue transfer <em>issue</em> <em>{% ifversion ghes %}hostname/{% endif %}own
|
|||
|
||||
- "[About issues](/articles/about-issues)"
|
||||
- "[Reviewing your security log](/articles/reviewing-your-security-log)"
|
||||
- "[Reviewing the audit log for your organization](/articles/reviewing-the-audit-log-for-your-organization)"
|
||||
- "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)"
|
||||
|
|
|
@ -13,7 +13,9 @@ versions:
|
|||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Issues
|
||||
shortTitle: View all your issues & PRs
|
||||
type: how_to
|
||||
---
|
||||
Your issues and pull request dashboards are available at the top of any page. On each dashboard, you can filter the list to find issues or pull requests you created, that are assigned to you, or in which you're mentioned. You can also find pull requests that you've been asked to review.
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ You can use custom fields to add metadata to your tasks. For example, you can tr
|
|||
- a number field to track the complexity of a task
|
||||
- a single select field to track whether a task is Low, Medium, or High priority
|
||||
- a text field to add a quick note
|
||||
- an iteration field to plan work week-by-week
|
||||
|
||||
### Viewing your project from different perspectives
|
||||
|
||||
|
@ -46,17 +47,17 @@ To help you focus on specific aspects of your project, you can group, sort, or f
|
|||
|
||||
For more information, see "[Customizing your project views](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)."
|
||||
|
||||
### Working with the command palette
|
||||
### Working with the project command palette
|
||||
|
||||
You can use the command palette to quickly change views or add fields. The command palette guides you so that you don't need to memorize custom keyboard shortcuts. For more information, see "[Customizing your project views](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)."
|
||||
You can use the project command palette to quickly change views or add fields. The command palette guides you so that you don't need to memorize custom keyboard shortcuts. For more information, see "[Customizing your project views](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)."
|
||||
|
||||
### Automating project management tasks
|
||||
|
||||
You can use the GraphQL API and {% data variables.product.prodname_actions %} to automate routine project management tasks. For more information, see "[Using the API to manage projects](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)" and "[Automating projects](/issues/trying-out-the-new-projects-experience/automating-projects)."
|
||||
Projects (beta) offers built-in workflows. For example, when an issue is closed, you can automatically set the status to "Done." You can also use the GraphQL API and {% data variables.product.prodname_actions %} to automate routine project management tasks. For more information, see "[Automating projects](/issues/trying-out-the-new-projects-experience/automating-projects)" and "[Using the API to manage projects](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)."
|
||||
|
||||
## Comparing projects (beta) with the non-beta projects
|
||||
|
||||
Projects (beta) is a new, customizable version of projects. Projects (beta) is currently only available to a limited number of beta users. The non-beta version of projects is available to all users. To learn more about the beta, see [{% data variables.product.prodname_github_issues %}](https://github.com/features/issues). For more information about the non-beta version of projects, see "[Organizing your work with project boards](/issues/organizing-your-work-with-project-boards)."
|
||||
Projects (beta) is a new, customizable version of projects. For more information about the non-beta version of projects, see "[Organizing your work with project boards](/issues/organizing-your-work-with-project-boards)."
|
||||
|
||||
## Sharing feedback
|
||||
|
||||
|
|
|
@ -1,38 +1,69 @@
|
|||
---
|
||||
title: Automating projects (beta)
|
||||
intro: 'You can use the API and {% data variables.product.prodname_actions %} to manage your projects.'
|
||||
intro: 'You can use built-in workflows or the API and {% data variables.product.prodname_actions %} to manage your projects.'
|
||||
allowTitleToDifferFromFilename: true
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
type: tutorial
|
||||
topics:
|
||||
- Projects
|
||||
- Workflows
|
||||
- Project management
|
||||
---
|
||||
|
||||
{% data reusables.projects.projects-beta %}
|
||||
|
||||
## Introduction
|
||||
|
||||
This article demonstrates how to use the GraphQL API and {% data variables.product.prodname_actions %} to add a pull request to a project. When the pull request is marked as "ready for review", a new task is added to the project with a "Status" field set to "Todo", and the current date is added to a custom "Date posted" field.
|
||||
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 %}.
|
||||
|
||||
## Built-in workflows
|
||||
|
||||
{% data reusables.projects.about-workflows %}
|
||||
|
||||
You can enable or disable the built-in workflows for your project.
|
||||
|
||||
{% data reusables.projects.enable-basic-workflow %}
|
||||
|
||||
## {% data variables.product.prodname_actions %} workflows
|
||||
|
||||
This section demonstrates how to use the GraphQL API and {% data variables.product.prodname_actions %} to add a pull request to an organization project. In the example workflows, when the pull request is marked as "ready for review", a new task is added to the project with a "Status" field set to "Todo", and the current date is added to a custom "Date posted" field.
|
||||
|
||||
You can copy one of the workflows below and modify it as described in the table below to meet your needs.
|
||||
|
||||
A project can span multiple repositories, but a workflow is specific to a repository. Add the workflow to each repository that you want your project to track. For more information about creating workflow files, see "[Quickstart for {% data variables.product.prodname_actions %}](/actions/quickstart)."
|
||||
|
||||
This article assumes that you have a basic understanding of {% data variables.product.prodname_actions %}. For more information about {% data variables.product.prodname_actions %}, see "[{% data variables.product.prodname_actions %}](/actions)."
|
||||
|
||||
{% data reusables.projects.projects-beta %}
|
||||
|
||||
{% data reusables.projects.api-beta %}
|
||||
For more information about other changes you can make to your project through the API, see "[Using the API to manage projects](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** `GITHUB_TOKEN` does not have the necessary scopes to access projects (beta). You must create a token with `org:write` scope and save it as a secret in your repository or organization. In the following workflow, replace `YOUR_TOKEN` with the name of the secret. For more information, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
**Note:** `GITHUB_TOKEN` is scoped to the repository level and cannot access projects (beta). To access projects (beta) you can either create a {% data variables.product.prodname_github_app %} (recommended for organization projects) or a personal access token (recommended for user projects). Workflow examples for both approaches are shown below.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Example workflow
|
||||
### Example workflow authenticating with a {% data variables.product.prodname_github_app %}
|
||||
|
||||
You can copy this workflow and modify it as described in the table below to meet your needs. A project can span multiple repositories, but a workflow is specific to a repository. Add this workflow to each repository that you want your project to track. For more information about creating workflow files, see "[Quickstart for {% data variables.product.prodname_actions %}](/actions/quickstart)."
|
||||
1. Create a {% data variables.product.prodname_github_app %} or choose an existing {% data variables.product.prodname_github_app %} owned by your organization. For more information, see "[Creating a {% data variables.product.prodname_github_app %}](/developers/apps/building-github-apps/creating-a-github-app)."
|
||||
2. Give your {% data variables.product.prodname_github_app %} read and write permissions to organization projects. For more information, see "[Editing a {% data variables.product.prodname_github_app %}'s permissions](/developers/apps/managing-github-apps/editing-a-github-apps-permissions)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can control your app's permission to organization projects and to repository projects. You must give permission to read and write organization projects; permission to read and write repository projects will not be sufficient.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
3. Install the {% data variables.product.prodname_github_app %} in your organization. Install it for all repositories that your project needs to access. For more information, see "[Installing {% data variables.product.prodname_github_apps %}](/developers/apps/managing-github-apps/installing-github-apps#installing-your-private-github-app-on-your-repository)."
|
||||
4. Store your {% data variables.product.prodname_github_app %}'s ID as a secret in your repository or organization. In the following workflow, replace `APP_ID` with the name of the secret. You can find your app ID on the settings page for your app or through the App API. For more information, see "[Apps](/rest/reference/apps#get-an-app)."
|
||||
5. Generate a private key for your app. Store the contents of the resulting file as a secret in your repository or organization. (Store the entire contents of the file, including `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----`.) In the following workflow, replace `APP_PEM` with the name of the secret. For more information, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)."
|
||||
6. In the following workflow, 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.
|
||||
|
||||
```yaml{:copy}
|
||||
{% data reusables.actions.actions-not-certified-by-github-comment %}
|
||||
|
||||
name: Add PR to project
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -42,13 +73,20 @@ jobs:
|
|||
track_pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0
|
||||
with:
|
||||
app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %}
|
||||
private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %}
|
||||
|
||||
- name: Get project data
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
ORGANIZATION: YOUR_ORGANIZATION
|
||||
PROJECT_NUMBER: YOUR_PROJECT_NUMBER
|
||||
run: |
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org){
|
||||
projectNext(number: $number) {
|
||||
|
@ -71,10 +109,10 @@ jobs:
|
|||
|
||||
- name: Add PR to project
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %}
|
||||
run: |
|
||||
item_id="$( gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
item_id="$( gh api graphql -f query='
|
||||
mutation($project:ID!, $pr:ID!) {
|
||||
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
|
||||
projectNextItem {
|
||||
|
@ -90,9 +128,107 @@ jobs:
|
|||
|
||||
- name: Set fields
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
run: |
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation (
|
||||
$project: ID!
|
||||
$item: ID!
|
||||
$status_field: ID!
|
||||
$status_value: String!
|
||||
$date_field: ID!
|
||||
$date_value: String!
|
||||
) {
|
||||
set_status: updateProjectNextItemField(input: {
|
||||
projectId: $project
|
||||
itemId: $item
|
||||
fieldId: $status_field
|
||||
value: $status_value
|
||||
}) {
|
||||
projectNextItem {
|
||||
id
|
||||
}
|
||||
}
|
||||
set_date_posted: updateProjectNextItemField(input: {
|
||||
projectId: $project
|
||||
itemId: $item
|
||||
fieldId: $date_field
|
||||
value: $date_value
|
||||
}) {
|
||||
projectNextItem {
|
||||
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)."
|
||||
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.
|
||||
|
||||
```yaml{:copy}
|
||||
name: Add PR to project
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- ready_for_review
|
||||
jobs:
|
||||
track_pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get project data
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
ORGANIZATION: YOUR_ORGANIZATION
|
||||
PROJECT_NUMBER: YOUR_PROJECT_NUMBER
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org){
|
||||
projectNext(number: $number) {
|
||||
id
|
||||
fields(first:20) {
|
||||
nodes {
|
||||
id
|
||||
name
|
||||
settings
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -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
|
||||
|
||||
- name: Add PR to project
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %}
|
||||
run: |
|
||||
item_id="$( gh api graphql -f query='
|
||||
mutation($project:ID!, $pr:ID!) {
|
||||
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
|
||||
projectNextItem {
|
||||
id
|
||||
}
|
||||
}
|
||||
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
|
||||
|
||||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
|
||||
|
||||
- name: Get date
|
||||
run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
|
||||
- name: Set fields
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
mutation (
|
||||
$project: ID!
|
||||
$item: ID!
|
||||
|
@ -125,7 +261,9 @@ jobs:
|
|||
|
||||
```
|
||||
|
||||
The following table explains sections of the workflow and shows you how to adapt it for your own use.
|
||||
### Workflow explanation
|
||||
|
||||
The following table explains sections of the example workflows and shows you how to adapt the workflows for your own use.
|
||||
|
||||
<table class="table-fixed">
|
||||
|
||||
|
@ -148,9 +286,46 @@ This workflow runs whenever a pull request in the repository is marked as "ready
|
|||
<tr>
|
||||
<td>
|
||||
|
||||
{% data variables.product.prodname_github_app %} only:
|
||||
|
||||
```yaml
|
||||
- name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0
|
||||
with:
|
||||
app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %}
|
||||
private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %}
|
||||
```
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Uses the <a href="https://github.com/tibdex/github-app-token">tibdex/github-app-token action</a> to generate an installation access token for your app from the app ID and private key. The installation access token is accessed later in the workflow as <code>{% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}</code>.
|
||||
<br>
|
||||
<br>
|
||||
Replace <code>APP_ID</code> with the name of the secret that contains your app ID.
|
||||
<br>
|
||||
<br>
|
||||
Replace <code>APP_PEM</code> with the name of the secret that contains your app private key.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
{% data variables.product.prodname_github_app %}:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
ORGANIZATION: YOUR_ORGANIZATION
|
||||
PROJECT_NUMBER: YOUR_PROJECT_NUMBER
|
||||
```
|
||||
|
||||
Personal access token:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
ORGANIZATION: YOUR_ORGANIZATION
|
||||
PROJECT_NUMBER: YOUR_PROJECT_NUMBER
|
||||
```
|
||||
|
@ -160,7 +335,7 @@ env:
|
|||
Sets environment variables for this step.
|
||||
<br>
|
||||
<br>
|
||||
Create a token with <code>org:write</code> scope and save it as a secret in your repository or organization. Replace <code>YOUR_TOKEN</code> with the name of the secret.
|
||||
If you are using a personal access token, replace <code>YOUR_TOKEN</code> with the name of the secret that contains your personal access token.
|
||||
<br>
|
||||
<br>
|
||||
Replace <code>YOUR_ORGANIZATION</code> with the name of your organization. For example, <code>octo-org</code>.
|
||||
|
@ -174,7 +349,7 @@ Replace <code>YOUR_PROJECT_NUMBER</code> with your project number. To find the p
|
|||
<td>
|
||||
|
||||
```yaml
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org){
|
||||
projectNext(number: $number) {
|
||||
|
@ -221,9 +396,19 @@ Parses the response from the API query and stores the relevant IDs as environmen
|
|||
<tr>
|
||||
<td>
|
||||
|
||||
{% data variables.product.prodname_github_app %}:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %}
|
||||
```
|
||||
|
||||
Personal access token:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %}
|
||||
```
|
||||
|
||||
|
@ -238,7 +423,7 @@ Sets environment variables for this step. <code>GITHUB_TOKEN</code> is described
|
|||
<td>
|
||||
|
||||
```yaml
|
||||
item_id="$( gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
item_id="$( gh api graphql -f query='
|
||||
mutation($project:ID!, $pr:ID!) {
|
||||
addProjectNextItem(input: {projectId: $project, contentId: $pr}) {
|
||||
projectNextItem {
|
||||
|
@ -283,9 +468,18 @@ Saves the current date as an environment variable in <code>yyyy-mm-dd</code> for
|
|||
<tr>
|
||||
<td>
|
||||
|
||||
{% data variables.product.prodname_github_app %}:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{secrets.YOUR_TOKEN}}{% endraw %}
|
||||
GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %}
|
||||
```
|
||||
|
||||
Personal access token:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %}
|
||||
```
|
||||
|
||||
</td>
|
||||
|
@ -299,7 +493,7 @@ Sets environment variables for this step. <code>GITHUB_TOKEN</code> is described
|
|||
<td>
|
||||
|
||||
```yaml
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation (
|
||||
$project: ID!
|
||||
$item: ID!
|
||||
|
@ -337,8 +531,4 @@ Sets the value of the <code>Status</code> field to <code>Todo</code>. Sets the v
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
## Next steps
|
||||
|
||||
For more information about other changes you can make to your project through the API, see "[Using the API to manage projects](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)." For more information about {% data variables.product.prodname_actions %}, see "[{% data variables.product.prodname_actions %}](/actions)."
|
||||
</table>
|
|
@ -47,8 +47,22 @@ To prevent information from getting out of sync, maintain a single source of tru
|
|||
|
||||
## Use automation
|
||||
|
||||
Automating tasks lets you spend less time on busy work and more time on the project itself. The less you need to remember to do manually, the more likely your project will stay up to date. {% data variables.product.prodname_actions %} and the GraphQL API enable you to automate routine project management tasks. For example, to keep track of pull requests awaiting review, you can create a workflow that adds a pull request to a project and sets the status to "needs review"; this process can be automatically triggered when a pull request is marked as "ready for review".
|
||||
You can automate tasks to spend less time on busy work and more time on the project itself. The less you need to remember to do manually, the more likely your project will stay up to date.
|
||||
|
||||
- For an example workflow, see "[Automating projects](/issues/trying-out-the-new-projects-experience/automating-projects)."
|
||||
Projects (beta) offers built-in workflows. For example, when an issue is closed, you can automatically set the status to "Done."
|
||||
|
||||
Additionally, {% data variables.product.prodname_actions %} and the GraphQL API enable you to automate routine project management tasks. For example, to keep track of pull requests awaiting review, you can create a workflow that adds a pull request to a project and sets the status to "needs review"; this process can be automatically triggered when a pull request is marked as "ready for review."
|
||||
|
||||
- For an example workflow, see "[Automating projects](/issues/trying-out-the-new-projects-experience/automating-projects)."
|
||||
- For more information about the API, see "[Using the API to manage projects](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)."
|
||||
- For more information about {% data variables.product.prodname_actions %}, see ["{% data variables.product.prodname_actions %}](/actions)."
|
||||
|
||||
## Use different field types
|
||||
|
||||
Take advantage of the various field types to meet your needs.
|
||||
|
||||
Use an iteration field to schedule work or create a timeline. You can group by iteration to see if items are balanced between iterations, or you can filter to focus on a single iteration. Iteration fields also let you view work that you completed in past iterations, which can help with velocity planning and reflecting on your team's accomplishments.
|
||||
|
||||
Use a single select field to track information about a task based on a preset list of values. For example, track priority or project phase. Since the values are selected from a preset list, you can easily group or filter to focus on items with a specific value.
|
||||
|
||||
For more information about the different field types, see "[Creating a project (beta)](/issues/trying-out-the-new-projects-experience/creating-a-project#adding-custom-fields)."
|
||||
|
|
|
@ -6,7 +6,7 @@ miniTocMaxHeadingLevel: 3
|
|||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: quick_start
|
||||
type: tutorial
|
||||
topics:
|
||||
- Projects
|
||||
---
|
||||
|
@ -17,8 +17,14 @@ Projects are a customizable collection of items that stay up-to-date with {% dat
|
|||
|
||||
## Creating a project
|
||||
|
||||
### Creating an organization project
|
||||
|
||||
{% data reusables.projects.create-project %}
|
||||
|
||||
### Creating a user project
|
||||
|
||||
{% data reusables.projects.create-user-project %}
|
||||
|
||||
## Adding items to your project
|
||||
|
||||
Your project can track draft issues, issues, and pull requests.
|
||||
|
@ -30,6 +36,8 @@ Draft issues are useful to quickly capture ideas.
|
|||
1. Place your cursor in the bottom row of the project, next to the {% octicon "plus" aria-label="plus icon" %}.
|
||||
2. Type your idea, then press **Enter**.
|
||||
|
||||
You can convert draft issues into issues. For more information, see [Converting draft issues to issues](#converting-draft-issues-to-issues).
|
||||
|
||||
### Issues and pull requests
|
||||
|
||||
#### Paste the URL of an issue or pull request
|
||||
|
@ -53,16 +61,42 @@ Draft issues are useful to quickly capture ideas.
|
|||
|
||||
![Project sidebar](/assets/images/help/issues/project_side_bar.png)
|
||||
|
||||
## Converting draft issues to issues
|
||||
|
||||
In table layout:
|
||||
|
||||
1. Click the {% octicon "triangle-down" aria-label="the item menu" %} on the draft issue that you want to convert.
|
||||
2. Select **Convert to issue**.
|
||||
3. Select the repository that you want to add the issue to.
|
||||
4. Alternatively, edit the `assignee`, `labels`, `milestone`, or `repository` fields of the draft issue that you want to convert.
|
||||
|
||||
In board layout:
|
||||
|
||||
1. Click the {% octicon "kebab-horizontal" aria-label="the item menu" %} on the draft issue that you want to convert.
|
||||
2. Select **Convert to issue**.
|
||||
3. Select the repository that you want to add the issue to.
|
||||
|
||||
## Removing items from your project
|
||||
|
||||
You can archive an item to keep the context about the item in the project but remove it from the project views. You can delete an item to remove it from the project entirely.
|
||||
|
||||
1. Select the item(s) to archive or delete. To select multiple items, do one of the following:
|
||||
- `cmd + click` (Mac) or `ctrl + click` (Windows/Linux) each item.
|
||||
- Select an item then `shift + arrow-up` or `shift + arrow-down` to select additional items above or below the intitially selected item.
|
||||
- Select an item then `shift + click` another item to select all items between the two items.
|
||||
- Enter `cmd + a` (Mac) or `ctrl + a` (Windows/Linux) to select all items in a column in a board layout or all items in a table layout.
|
||||
2. To archive all selected items, enter `e`. To delete all selected items, enter `del`. Alternatively, select the {% octicon "triangle-down" aria-label="the item menu" %} (in table layout) or the {% octicon "kebab-horizontal" aria-label="the item menu" %} (in board layout), then select the desired action.
|
||||
|
||||
You can restore archived items but not deleted items. For more information, see [Restoring archived items](#restoring-archived-items).
|
||||
|
||||
## Restoring archived items
|
||||
|
||||
To restore an archived item, navigate to the issue or pull request. In the project side bar on the issue or pull request, click **Restore** for the project that you want to restore the item to. Draft issues cannot be restored.
|
||||
|
||||
## Adding fields
|
||||
|
||||
As field values change, they are automatically synced so that your project and the items that it tracks are up-to-date.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You cannot edit or add fields until you add at least one item to your project.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Showing existing fields
|
||||
|
||||
Your project tracks up-to-date information about issues and pull requests, including any changes to the title, assignees, labels, milestones, and repository. When your project initializes, "title" and "assignees" are displayed; the other fields are hidden. You can change the visibility of these fields in your project.
|
||||
|
@ -79,7 +113,15 @@ Alternatively, you can do this in the UI:
|
|||
|
||||
### Adding custom fields
|
||||
|
||||
You can add custom fields to your project. Custom fields can be text, number, date, or single select. Custom fields will display on the side bar of issues and pull requests in the project.
|
||||
You can add custom fields to your project. Custom fields will display on the side bar of issues and pull requests in the project.
|
||||
|
||||
Custom fields can be text, number, date, single select, or iteration:
|
||||
|
||||
- Text: The value can be any text.
|
||||
- Number: The value must be a number.
|
||||
- Date: The value must be a date.
|
||||
- Single select: The value must be selected from a set of specified values.
|
||||
- Iteration: The value must be selected from a set of date ranges (iterations). Iterations in the past are automatically marked as "completed", and the iteration covering the current date range is marked as "current".
|
||||
|
||||
1. {% data reusables.projects.open-command-palette %} Start typing any part of "Create new field". When "Create new field" displays in the command palette, select it.
|
||||
2. Alternatively, click {% octicon "plus" aria-label="the plus icon" %} in the rightmost field header. A drop-down menu with the project fields will appear. Click **New field**.
|
||||
|
@ -87,8 +129,24 @@ You can add custom fields to your project. Custom fields can be text, number, da
|
|||
![New field](/assets/images/help/issues/projects_new_field.png)
|
||||
4. In the text box, enter a name for the new field.
|
||||
5. Select the dropdown menu and click the desired type.
|
||||
6. If you specified "single select" as the type, enter the options.
|
||||
6. If you specified **Single select** as the type, enter the options.
|
||||
7. If you specified **Iteration** as the type, enter the start date of the first iteration and the duration of the iteration. Three iterations are automatically created, and you can add additional iterations on the project's settings page.
|
||||
|
||||
## Customize your views
|
||||
You can later edit the drop down options for single select and iteration fields.
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Under **Fields**, select the field that you want to edit.
|
||||
1. For single select fields, you can add, delete, or reorder the options.
|
||||
2. For iteration fields, you can add or delete iterations, change iteration names, and change the start date and duration of the iteration.
|
||||
|
||||
## Customizing your views
|
||||
|
||||
You can view your project as a table or board, group items by field, filter item, and more. For more information, see "[Customizing your project (beta) views](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)."
|
||||
|
||||
## Configuring built-in automation
|
||||
|
||||
{% data reusables.projects.about-workflows %}
|
||||
|
||||
You can enable or disable the built-in workflows for your project.
|
||||
|
||||
{% data reusables.projects.enable-basic-workflow %}
|
||||
|
|
|
@ -12,9 +12,9 @@ topics:
|
|||
|
||||
{% data reusables.projects.projects-beta %}
|
||||
|
||||
## Command palette
|
||||
## Project command palette
|
||||
|
||||
Use the command palette to quickly change settings and run commands in your project.
|
||||
Use the project command palette to quickly change settings and run commands in your project.
|
||||
|
||||
1. {% data reusables.projects.open-command-palette %}
|
||||
2. Start typing any part of a command or navigate through the command palette window to find a command. See the next sections for more examples of commands.
|
||||
|
@ -30,7 +30,9 @@ You can view your project as a table or as a board.
|
|||
|
||||
## Show or hide fields
|
||||
|
||||
In table layout, you can show or hide a specific field.
|
||||
You can show or hide a specific field.
|
||||
|
||||
In table layout:
|
||||
|
||||
1. {% data reusables.projects.open-command-palette %}
|
||||
2. Start typing the action you want to take ("show" or "hide") or the name of the field.
|
||||
|
@ -38,6 +40,12 @@ In table layout, you can show or hide a specific field.
|
|||
4. Alternatively, click {% octicon "plus" aria-label="the plus icon" %} to the right of the table. In the drop-down menu that appears, indicate which fields to show or hide. A {% octicon "check" aria-label="check icon" %} indicates which fields are displayed.
|
||||
5. Alternatively, select the drop-down menu next to the field name and click **Hide field**.
|
||||
|
||||
In board layout:
|
||||
|
||||
1. Select the drop-down menu next to the view name.
|
||||
2. Under **configuration**, click {% octicon "list-unordered" aria-label="the unordered list icon" %}.
|
||||
3. In the menu that appears, select fields to add them and deselect fields to remove them from the view.
|
||||
|
||||
## Reorder fields
|
||||
|
||||
You can change the order of fields.
|
||||
|
@ -98,22 +106,22 @@ Follow similar steps to remove a grouping.
|
|||
|
||||
## Filter
|
||||
|
||||
In table layout, you can filter by field values.
|
||||
Click {% octicon "search" aria-label="the search icon" %} at the top of the table to show the "Filter by keyword or field" bar. Start typing the field name and value that you want to filter by. As you type, possible values will appear.
|
||||
|
||||
- To filter for multiple values, separate the values with a comma. For example `label:"good first issue",bug` will list all issues with a label `good first issue` or `bug`.
|
||||
- To filter for the absence of a specific value, place `-` before your filter. For example, `-label:"bug"` will only show items that do not have the label `bug`.
|
||||
- To filter for the absence of all values, enter `no:` followed by the field name. For example, `no:assignee` will only show items that do not have an assignee.
|
||||
- To filter by state, enter `is:`. For example, `is: issue` or `is:open`.
|
||||
- Separate multiple filters with a space. For example, `status:"In progress" -label:"bug" no:assignee` will show only items that have a status of `In progress`, do not have the label `bug`, and do not have an assignee.
|
||||
|
||||
Alternatively, use the command palette.
|
||||
|
||||
1. {% data reusables.projects.open-command-palette %}
|
||||
2. Start typing "Filter by" or the name of the field you want to filter by.
|
||||
3. Select the desired command (e.g. "Filter by Status").
|
||||
4. Enter the value that you want to filter for (for example: "In progress"). You can also filter for the absence of specific values (for example: "Exclude status") or the absence of all values (for example: "No status").
|
||||
5. Alternatively, click {% octicon "search" aria-label="the search icon" %} at the top of the table to show the "Filter by keyword or field" bar. Enter the field name and value that you want to filter by. As you type, possible values will appear.
|
||||
|
||||
To filter for multiple values, separate the values with a comma. For example `label:"good first issue",bug` will list all issues with a label `good first issue` or `bug`.
|
||||
|
||||
To filter for the absence of a specific value, place `-` before your filter. For example, `-label:"bug"` will only show items that do not have the label `bug`.
|
||||
|
||||
To filter for the absence of all values, enter `no:` followed by the field name. For example, `no:assignee` will only show items that do not have an assignee.
|
||||
|
||||
Separate multiple filters with a space. For example, `status:"In progress" -label:"bug" no:assignee` will show only items that have a status of `In progress`, do not have the label `bug`, and do not have an assignee.
|
||||
6. Alternatively, select the drop-down menu next to the view name and click the menu item that indicates the desired filter.
|
||||
In board layout, you can click on item data to filter for items with that value. For example, click on an assignee to show only items for that assignee. To remove the filter, click the item data again.
|
||||
|
||||
## Save views
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ children:
|
|||
- /customizing-your-project-views
|
||||
- /using-the-api-to-manage-projects
|
||||
- /automating-projects
|
||||
- /managing-the-visibility-of-your-projects
|
||||
- /managing-access-to-projects
|
||||
- /best-practices-for-managing-projects
|
||||
---
|
||||
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
title: Managing access to projects (beta)
|
||||
intro: 'You can control who can view, edit, or manage your projects.'
|
||||
allowTitleToDifferFromFilename: true
|
||||
miniTocMaxHeadingLevel: 2
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Projects
|
||||
- Organizations
|
||||
---
|
||||
|
||||
{% data reusables.projects.projects-beta %}
|
||||
|
||||
## About project access
|
||||
|
||||
Admins of organization-level projects can manage access to their organization's projects for everyone in the organization. Organization project admins can also manage access for individual organization members.
|
||||
|
||||
Admins of user-level projects can invite collaborators and manage access for individual collaborators.
|
||||
|
||||
Project admins can also control the visibility of their project for everyone on the internet. For more information, see "[Managing the visibility of your projects](/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects)."
|
||||
|
||||
## Managing access for organization-level projects
|
||||
|
||||
### Managing access for everyone in your organization
|
||||
|
||||
The default base role is `write`, meaning that everyone in the organization can see and edit your project. To change project access for everyone in the organization, you can change the base role. Changes to the base role only affect organization members who are not organization owners and who are not granted individual access.
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Click **Manage access**.
|
||||
2. Under **Base role**, select the default role.
|
||||
- **No access**: Only organization owners and users granted individual access can see the project. Organization owners are also admins for the project.
|
||||
- **Read**: Everyone in the organization can see the project. Organization owners are also admins for the project.
|
||||
- **Write**: Everyone in the organization can see and edit the project. Organization owners are also admins for the project.
|
||||
- **Admin**: Everyone in the organization is an admin for the project.
|
||||
|
||||
### Managing access for individual members of your organization
|
||||
|
||||
You can also add individual organization members as collaborators to your project. Only organization members can be added as collaborators to organization projects.
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Click **Manage access**.
|
||||
1. Under **Invite collaborators**, search for the organization member that you want to invite.
|
||||
1. Select the role for the collaborator.
|
||||
- **Read**: The individual can view the project.
|
||||
- **Write**: The individual can view and edit the project.
|
||||
- **Admin**: The individual can view, edit, and add new collaborators to the project.
|
||||
1. Click **Invite**.
|
||||
|
||||
### Managing access of an existing collaborator on your project
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Click **Manage access**.
|
||||
1. Under **Manage access**, find the collaborator(s) whose permissions you want to modify.
|
||||
1. Edit the role for the collaborator(s) or click {% octicon "trash" aria-label="the trash icon" %} to remove the collaborator(s).
|
||||
|
||||
## Managing access for user-level projects
|
||||
|
||||
### Granting a collaborator access to your project
|
||||
|
||||
{% note %}
|
||||
|
||||
This only affects collaborators for your project, not for repositories in your project. To view an item on the project, someone must have the required permissions for the repository that the item belongs to. If your project includes items from a private repository, people who are not collaborators in the repository will not be able to view items from that repository. For more information, see "[Setting repository visibility](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility)" and "[Managing teams and people with access to your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Click **Manage access**.
|
||||
2. Under **Invite collaborators**, search for the user that you want to invite.
|
||||
3. Select the role for the collaborator.
|
||||
- **Read**: The individual can view the project.
|
||||
- **Write**: The individual can view and edit the project.
|
||||
- **Admin**: The individual can view, edit, and add new collaborators to the project.
|
||||
4. Click **Invite**.
|
||||
|
||||
### Managing access of an existing collaborator on your project
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Click **Manage access**.
|
||||
1. Under **Manage access**, find the collaborator(s) whose permissions you want to modify.
|
||||
1. Edit the role for the collaborator(s) or click {% octicon "trash" aria-label="the trash icon" %} to remove the collaborator(s).
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Managing the visibility of your projects (beta)
|
||||
intro: 'You can control who can view your projects.'
|
||||
allowTitleToDifferFromFilename: true
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Projects
|
||||
- Organizations
|
||||
---
|
||||
|
||||
{% data reusables.projects.projects-beta %}
|
||||
|
||||
## About project visibility
|
||||
|
||||
Projects (beta) can be public or private. For public projects, everyone on the internet can view the project. For private projects, only users granted at least read access can see the project.
|
||||
|
||||
Only the project visibility is affected; to view an item on the project, someone must have the required permissions for the repository that the item belongs to. If your project includes items from a private repository, people who are not collaborators in the repository will not be able to view items from that repository.
|
||||
|
||||
![Project with hidden item](/assets/images/help/projects/hidden-items.png)
|
||||
|
||||
Only project admins can control project visibility.
|
||||
|
||||
Project admins can also manage write and admin access to their project and control read access for individual users. For more information, see "[Managing access to projects](/issues/trying-out-the-new-projects-experience/managing-access-to-projects)."
|
||||
|
||||
## Changing project visibility
|
||||
|
||||
{% data reusables.projects.project-settings %}
|
||||
1. Under **Visibility**, select **Private** or **Public**.
|
|
@ -19,16 +19,22 @@ This guide demonstrates how to use projects (beta) to plan and track work. In th
|
|||
|
||||
## Prerequisites
|
||||
|
||||
To create a project, you need a {% data variables.product.prodname_dotcom %} organization that is a part of the projects beta. For more information about creating an organization, see "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)." For more information about the beta, see "[About projects (beta)](/issues/trying-out-the-new-projects-experience/about-projects)."
|
||||
You can either create an organization project or a user project. To create an organization project, you need a {% data variables.product.prodname_dotcom %} organization. For more information about creating an organization, see "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)."
|
||||
|
||||
In this guide, you will add existing issues from repositories in your organization to your new project. For more information about creating issues, see "[Creating an issue](/issues/tracking-your-work-with-issues/creating-an-issue)."
|
||||
In this guide, you will add existing issues from repositories owned by your organization (for organization projects) or by you (for user projects) to your new project. For more information about creating issues, see "[Creating an issue](/issues/tracking-your-work-with-issues/creating-an-issue)."
|
||||
|
||||
## Creating a project
|
||||
|
||||
First, create a project from your organization’s project page.
|
||||
First, create an organization project or a user project.
|
||||
|
||||
### Creating an organization project
|
||||
|
||||
{% data reusables.projects.create-project %}
|
||||
|
||||
### Creating a user project
|
||||
|
||||
{% data reusables.projects.create-user-project %}
|
||||
|
||||
## Adding issues to your project
|
||||
|
||||
Next, add a few issues to your project.
|
||||
|
@ -91,11 +97,11 @@ You can share the URL with your team to keep everyone aligned on the project pri
|
|||
|
||||
When a view is saved, anyone who opens the project will see the saved view. Here, you grouped by priority, but you can also add other modifiers such as sort, filter, or layout. Next, you will create a new view with the layout modified.
|
||||
|
||||
## Adding a board view
|
||||
## Adding a board layout
|
||||
|
||||
To view the progress of your project's issues, you can switch to board layout.
|
||||
|
||||
The board view is based on the status field, so specify a status for each issue in your project.
|
||||
The board layout is based on the status field, so specify a status for each issue in your project.
|
||||
|
||||
![Example status](/assets/images/help/projects/status_example.png)
|
||||
|
||||
|
@ -122,6 +128,16 @@ To indicate the purpose of the view, give it a descriptive name.
|
|||
|
||||
![Example priorities](/assets/images/help/projects/project-view-switch.gif)
|
||||
|
||||
## Configure built-in automation
|
||||
|
||||
Finally, add a built in workflow to set the status to **Todo** when an item is added to your project.
|
||||
|
||||
1. In your project, click {% octicon "workflow" aria-label="the workflow icon" %}.
|
||||
2. Under **Default workflows**, click **Item added to project**.
|
||||
3. Next to **When**, ensure that both `issues` and `pull requests` are selected.
|
||||
4. Next to **Set**, select **Status:Todo**.
|
||||
5. Click the **Disabled** toggle to enable the workflow.
|
||||
|
||||
## Next steps
|
||||
|
||||
You can use projects for a wide range of purposes. For example:
|
||||
|
|
|
@ -11,19 +11,17 @@ topics:
|
|||
- Projects
|
||||
---
|
||||
|
||||
This article demonstrates how to use the GraphQL API to manage a project.
|
||||
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 %}
|
||||
|
||||
{% data reusables.projects.api-beta %}
|
||||
|
||||
## Authentication
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% 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). For more information about creating a token, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
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)."
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
|
@ -31,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` and providing an authentication token that has the `read:org` scope (for queries) or `write:org` scope (for queries and mutations). During the beta, you will not be able to authenticate using a web browser. For more information on command line authentication, see "[gh auth login](https://cli.github.com/manual/gh_auth_login)." For more information about creating a token, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
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)."
|
||||
|
||||
{% endcli %}
|
||||
|
||||
|
@ -44,7 +42,7 @@ In all of the following examples, you can use variables to simplify your scripts
|
|||
```shell
|
||||
my_org="octo-org"
|
||||
my_num=5
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query($organization: String! $number: Int!){
|
||||
organization(login: $organization){
|
||||
projectNext(number: $number) {
|
||||
|
@ -62,11 +60,11 @@ For more information, see "[Forming calls with GraphQL]({% ifversion ghec%}/free
|
|||
|
||||
Use queries to get data about projects. For more information, see "[About queries]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql#about-queries)."
|
||||
|
||||
### Finding the node ID of a project
|
||||
### Finding the node ID of an organization project
|
||||
|
||||
To update your project through the API, you will need to know the node ID of the project.
|
||||
|
||||
You can find the node ID of a project if you know the organization name and project number. Replace `ORGANIZATION` with the name of your organization. For example, `octo-org`. Replace `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.
|
||||
You can find the node ID of an organization project if you know the organization name and project number. Replace `ORGANIZATION` with the name of your organization. For example, `octo-org`. Replace `NUMBER` with the 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.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
|
@ -75,14 +73,13 @@ You can find the node ID of a project if you know the organization name and proj
|
|||
curl --request POST \
|
||||
--url https://api.github.com/graphql \
|
||||
--header 'Authorization: token <em>TOKEN</em>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--data '{"query":"query{organization(login: \"<em>ORGANIZATION</em>\") {projectNext(number: <em>NUMBER</em>){id}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
organization(login: "<em>ORGANIZATION</em>"){
|
||||
projectNext(number: <em>NUMBER</em>) {
|
||||
|
@ -102,14 +99,13 @@ 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>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--data '{"query":"{organization(login: \"<em>ORGANIZATION</em>\") {projectsNext(first: 20) {nodes {id title}}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
organization(login: "<em>ORGANIZATION</em>") {
|
||||
projectsNext(first: 20) {
|
||||
|
@ -123,9 +119,68 @@ gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
|||
```
|
||||
{% endcli %}
|
||||
|
||||
### 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.
|
||||
|
||||
You can find the node ID of a user project if you know the project number. Replace `USER` with your user name. For example, `octocat`. Replace `NUMBER` with your project number. To find the project number, look at the project URL. For example, `https://github.com/users/octocat/projects/5` has a project number of 5.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% curl %}
|
||||
```shell
|
||||
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}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
user(login: "<em>USER</em>"){
|
||||
projectNext(number: <em>NUMBER</em>) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}'
|
||||
```
|
||||
{% endcli %}
|
||||
|
||||
You can also find the node ID for all of your projects. The following example will return the node ID and title of your first 20 projects. Replace `USER` with your username. For example, `octocat`.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% curl %}
|
||||
```shell
|
||||
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}}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
user(login: "<em>USER</em>") {
|
||||
projectsNext(first: 20) {
|
||||
nodes {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}'
|
||||
```
|
||||
{% endcli %}
|
||||
|
||||
### Finding the node ID of a field
|
||||
|
||||
To update the value of a field, you will need to know the node ID of the field. Additionally, for single select fields, you will need to know the ID of the options.
|
||||
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.
|
||||
|
||||
|
@ -136,14 +191,13 @@ The following example will return the ID, name, and settings for the first 20 fi
|
|||
curl --request POST \
|
||||
--url https://api.github.com/graphql \
|
||||
--header 'Authorization: token <em>TOKEN</em>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--data '{"query":"query{node(id: \"<em>PROJECT_ID</em>\") {... on ProjectNext {fields(first: 20) {nodes {id name settings}}}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
node(id: "<em>PROJECT_ID</em>") {
|
||||
... on ProjectNext {
|
||||
|
@ -182,6 +236,11 @@ The response will look similar to the following example:
|
|||
"id": "MDE2OlByb2plY3ROZXh0RmllbGQxMzE2MQ==",
|
||||
"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\"}]}"
|
||||
},
|
||||
{
|
||||
"id": "MDE2OlByb2plY3ROZXh0RmllbGQ3NTEwNw==",
|
||||
"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\"}]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -190,7 +249,7 @@ The response will look similar to the following example:
|
|||
}
|
||||
```
|
||||
|
||||
Each field has an ID. Additionally, each option in a single select field has an ID.
|
||||
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.
|
||||
|
||||
### Finding information about items in a project
|
||||
|
||||
|
@ -205,14 +264,13 @@ The following example will return the title and ID for the first 20 items in a p
|
|||
curl --request POST \
|
||||
--url https://api.github.com/graphql \
|
||||
--header 'Authorization: token <em>TOKEN</em>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--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}}}}}}}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
query{
|
||||
node(id: "<em>PROJECT_ID</em>") {
|
||||
... on ProjectNext {
|
||||
|
@ -284,14 +342,13 @@ 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>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--data '{"query":"mutation {addProjectNextItem(input: {projectId: \"<em>PROJECT_ID</em>\" contentId: \"<em>CONTENT_ID</em>\"}) {projectNextItem {id}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation {
|
||||
addProjectNextItem(input: {projectId: "<em>PROJECT_ID</em>" contentId: "<em>CONTENT_ID</em>"}) {
|
||||
projectNextItem {
|
||||
|
@ -318,9 +375,9 @@ The response will contain the node ID of the newly created item.
|
|||
|
||||
If you try add an item that already exists, the existing item ID is returned instead.
|
||||
|
||||
### Updating a custom, non-single select field
|
||||
### Updating a custom text, number, or date field
|
||||
|
||||
The following example will update a date field. 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 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.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
|
@ -329,14 +386,13 @@ The following example will update a date field. Replace `PROJECT_ID` with the no
|
|||
curl --request POST \
|
||||
--url https://api.github.com/graphql \
|
||||
--header 'Authorization: token <em>TOKEN</em>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--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}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation {
|
||||
updateProjectNextItemField(
|
||||
input: {
|
||||
|
@ -360,13 +416,14 @@ gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
|||
|
||||
{% endnote %}
|
||||
|
||||
### Updating a single-select field
|
||||
### Updating a single select field
|
||||
|
||||
The following example will update the value of a single select field for an item.
|
||||
|
||||
The following example will update a date field.
|
||||
- `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 field that you want to update.
|
||||
- `OPTION_ID` - Replace this with the ID of the desired value.
|
||||
- `FIELD_ID` - Replace this with the ID of the single select field that you want to update.
|
||||
- `OPTION_ID` - Replace this with the ID of the desired single select option.
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
|
@ -375,14 +432,13 @@ The following example will update a date field.
|
|||
curl --request POST \
|
||||
--url https://api.github.com/graphql \
|
||||
--header 'Authorization: token <em>TOKEN</em>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--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}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation {
|
||||
updateProjectNextItemField(
|
||||
input: {
|
||||
|
@ -400,6 +456,46 @@ gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
|||
```
|
||||
{% endcli %}
|
||||
|
||||
### Updating an iteration field
|
||||
|
||||
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).
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% 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}}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql -f 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
|
||||
}
|
||||
}
|
||||
}'
|
||||
```
|
||||
{% endcli %}
|
||||
|
||||
### Deleting an item from a project
|
||||
|
||||
The following example will delete an item from a project. Replace `PROJECT_ID` with the node ID of your project. Replace `ITEM_ID` with the node ID of the item you want to delete.
|
||||
|
@ -411,14 +507,13 @@ 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>' \
|
||||
--header 'GraphQL-Features: projects_next_graphql' \
|
||||
--data '{"query":"mutation {deleteProjectNextItem(input: {projectId: \"<em>PROJECT_ID</em>\" itemId: \"<em>ITEM_ID</em>\"}) {deletedItemId}}"}'
|
||||
```
|
||||
{% endcurl %}
|
||||
|
||||
{% cli %}
|
||||
```shell
|
||||
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
||||
gh api graphql -f query='
|
||||
mutation {
|
||||
deleteProjectNextItem(
|
||||
input: {
|
||||
|
@ -431,263 +526,3 @@ gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query='
|
|||
}'
|
||||
```
|
||||
{% endcli %}
|
||||
|
||||
## Reference
|
||||
|
||||
### Objects
|
||||
|
||||
#### ProjectNext
|
||||
|
||||
- [Closable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#closable)
|
||||
- [Node]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#node)
|
||||
- [Updatable]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#updatable)
|
||||
|
||||
**Fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`closed` (`Boolean!`) | `true` if the project is closed.
|
||||
`closedAt` (`DateTime!`) | Identifies the date and time when the object was closed.
|
||||
`createdAt` (`DateTime!`) | Identifies the date and time when the object was created.
|
||||
`creator` (`Actor`) | The actor who originally created the project.
|
||||
`databaseId` (`Int`) | Identifies the primary key from the database.
|
||||
`description` (`String`) | The project's description.
|
||||
`fields` (`[ProjectNextField]!`) | List of fields in the project.<br><br>**Arguments**<br>`after` (`String`): Returns the elements in the list that come after the specified cursor.<br>`before` (`String`): Returns the elements in the list that come before the specified cursor.<br>`first` (`Int`): Returns the first *n* elements from the list.<br>`last` (`Int`): Returns the last *n* elements from the list.
|
||||
`items` (`[ProjectNextItem]`) | List of items in the project.<br><br>**Arguments**<br>`after` (`String`): Returns the elements in the list that come after the specified cursor.<br>`before` (`String`): Returns the elements in the list that come before the specified cursor.<br>`first` (`Int`): Returns the first *n* elements from the list.<br>`last` (`Int`): Returns the last *n* elements from the list.
|
||||
`number` (`Int!`) | The project's number.
|
||||
`owner` (`ProjectNextOwner!`) | The project's owner. Currently limited to organizations.
|
||||
`title` (`String!`) | The project's name.
|
||||
`updatedAt` (`DateTime!`) | Identifies the date and time when the object was last updated.
|
||||
`viewerCanUpdate` (`Boolean!`) | Check if the current viewer can update this object.
|
||||
|
||||
#### ProjectNextConnection
|
||||
|
||||
The connection type for ProjectNext.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`edges` ([ProjectNextEdge]) | A list of edges.
|
||||
`nodes` ([ProjectNext]) | A list of nodes.
|
||||
`pageInfo` (PageInfo!) | Information to aid in pagination.
|
||||
`totalCount` (Int!) | Identifies the total count of items in the connection.
|
||||
|
||||
#### ProjectNextEdge
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`cursor` (String!) | A cursor for use in pagination.
|
||||
`node` (ProjectCard) | The item at the end of the edge.
|
||||
|
||||
#### ProjectNextField
|
||||
|
||||
A field inside a project.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`createdAt` (`DateTime!`) | Identifies the date and time when the object was created.
|
||||
`name` (`String!`) | The project field's name.
|
||||
`project` (`ProjectNext!`) | The project that contains this field.
|
||||
`settings` (`String`) | String representation of project field settings.
|
||||
`updatedAt` (`DateTime!`) | Identifies the date and time when the object was last updated.
|
||||
|
||||
#### ProjectNextFieldConnection
|
||||
|
||||
The connection type for ProjectNextField.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`edges` ([ProjectNextFieldEdge]) | A list of edges.
|
||||
`nodes` ([ProjectNextField]) | A list of nodes.
|
||||
`pageInfo` (PageInfo!) | Information to aid in pagination.
|
||||
`totalCount` (Int!) | Identifies the total count of items in the connection.
|
||||
|
||||
#### ProjectNextFieldEdge
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`cursor` (String!) | A cursor for use in pagination.
|
||||
`node` (ProjectCard) | The item at the end of the edge.
|
||||
|
||||
#### ProjectNextItem
|
||||
|
||||
- [Node]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#node)
|
||||
|
||||
An item in a `ProjectNext`.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`content` (`ProjectNextItemContent`) | The content of the referenced issue or pull request.
|
||||
`createdAt` (DateTime!) | Identifies the date and time when the object was created.
|
||||
`creator` (`Actor`) | The actor who created this item.
|
||||
`databaseId` (`Int`) | Identifies the primary key from the database.
|
||||
`fieldValues` (`[ProjectNextItemFieldValue]!`) | List of field values for the item.<br><br>**Arguments**<br>`after` (`String`): Returns the elements in the list that come after the specified cursor.<br>`before` (`String`): Returns the elements in the list that come before the specified cursor.<br>`first` (`Int`): Returns the first *n* elements from the list.<br>`last` (`Int`): Returns the last *n* elements from the list.
|
||||
`project` (`ProjectNext!`) | The project that contains this item.
|
||||
`title` (`String!`) | Title of the item.
|
||||
`updatedAt` (DateTime!) | Identifies the date and time when the object was last updated.
|
||||
|
||||
#### ProjectNextItemContent
|
||||
|
||||
Content associated with a `ProjectNextItem`.
|
||||
|
||||
**Types:**
|
||||
|
||||
- `issue` - Reference to an issue
|
||||
- `pull request` - Reference to a pull request.
|
||||
|
||||
#### ProjectNextItemConnection
|
||||
|
||||
The connection type for ProjectNextItem.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`edges` ([`ProjectNextItemEdge`]) | A list of edges.
|
||||
`nodes` ([`ProjectNextItem`]) | A list of nodes.
|
||||
`pageInfo` (`PageInfo!`) | Information to aid in pagination.
|
||||
`totalCount` (`Int!`) | Identifies the total count of items in the connection.
|
||||
|
||||
#### ProjectNextItemEdge
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`cursor` (`String!`) | A cursor for use in pagination.
|
||||
`node` (`ProjectCard`) | The item at the end of the edge.
|
||||
|
||||
#### ProjectNextItemFieldValue
|
||||
|
||||
- [Node]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#node)
|
||||
|
||||
A value of a field in an item in a `ProjectNext`.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`createdAt` (`DateTime!`) | Identifies the date and time when the object was created.
|
||||
`creator` (`Actor`) | The actor who created this item.
|
||||
`databaseId` (`Int`) | Identifies the primary key from the database.
|
||||
`projectField` (`ProjectNextField!`) | The project field that contains this value.
|
||||
`projectItem` (`ProjectNextItem!`) | The project item that contains this value.
|
||||
`updatedAt` (`DateTime!`) | Identifies the date and time when the object was last updated.
|
||||
`value` | Value of the field.
|
||||
|
||||
#### ProjectNextItemFieldValueConnection
|
||||
|
||||
The connection type for ProjectNextItemFieldValue.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`edges` ([`ProjectNextItemFieldValueEdge`]) | A list of edges.
|
||||
`nodes` ([`ProjectNextItemFieldValue`]) | A list of nodes.
|
||||
`pageInfo` (`PageInfo!`) | Information to aid in pagination.
|
||||
`totalCount` (`Int!`) | Identifies the total count of items in the connection.
|
||||
|
||||
#### ProjectNextItemEdge
|
||||
|
||||
An edge in a connection.
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`cursor` (`String!`) | A cursor for use in pagination.
|
||||
`node` (`ProjectCard`) | The item at the end of the edge.
|
||||
|
||||
### Interfaces
|
||||
|
||||
#### ProjectNextOwner
|
||||
|
||||
Represents an owner of a project.
|
||||
|
||||
**Implemented by**
|
||||
|
||||
- `Organization`
|
||||
|
||||
**Fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`projectNext` (`ProjectNext`) | Find project by number.<br><br>**Arguments**<br>`number` (`Int!`): The project number to find.
|
||||
`projectsNext` (`ProjectNextConnection!`) | A list of project next items under the owner.<br><br>**Arguments**<br>`after` (`String`): Returns the elements in the list that come after the specified cursor.<br>`before` (`String`): Returns the elements in the list that come before the specified cursor.<br>`first` (`Int`): Returns the first *n* elements from the list.<br>`last` (`Int`): Returns the last *n* elements from the list.
|
||||
|
||||
### Mutations
|
||||
|
||||
#### addProjectNextItem
|
||||
|
||||
Adds an existing item (Issue or PullRequest) to a project.
|
||||
|
||||
**Input fields**
|
||||
|
||||
- `input`(`AddProjectNextItemInput!`)
|
||||
|
||||
**Return fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`projectNextItem` (`ProjectNextItem`) | The item added to the project.
|
||||
|
||||
#### updateProjectNextItemField
|
||||
|
||||
Updates a field of an item from a project.
|
||||
|
||||
**Input fields**
|
||||
|
||||
- `input`(`UpdateProjectNextItemFieldInput!`)
|
||||
|
||||
**Return fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`projectNextItem` (`ProjectNextItem`) | The item added to the project.
|
||||
|
||||
#### deleteProjectNextItem
|
||||
|
||||
Deletes an item from a project.
|
||||
|
||||
**Input fields**
|
||||
|
||||
- `input`(`DeleteProjectNextItemInput!`)
|
||||
|
||||
**Return fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`deletedItemId` (`ID`) | The ID of the deleted item.
|
||||
|
||||
### Input Objects
|
||||
|
||||
#### DeleteProjectNextItemInput
|
||||
|
||||
Autogenerated input type of AddProjectNextItem.
|
||||
|
||||
**Input fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`contentId` (`ID!`) | The ID of the item (Issue or PullRequest) to add.
|
||||
`projectId` (`ID!`) | The ID of the Project to add the item to.
|
||||
|
||||
#### UpdateProjectNextItemFieldInput
|
||||
|
||||
Autogenerated input type of UpdateProjectNextItemField.
|
||||
|
||||
**Input fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`fieldId` (`ID!`) | The ID of the field to be updated. Currently supports custom fields and status.
|
||||
`itemId` (`ID!`) | The ID of the item to be updated.
|
||||
`projectId` (`ID!`) | The ID of the Project.
|
||||
`value` (`String!`) | The value which will be set on the field.
|
||||
|
||||
#### DeleteProjectNextItemInput
|
||||
|
||||
Autogenerated input type of DeleteProjectNextItem.
|
||||
|
||||
**Input fields**
|
||||
|
||||
Name | Description
|
||||
--- | ---
|
||||
`clientMutationId` (`String`) | A unique identifier for the client performing the mutation.
|
||||
`itemId` (`ID!`) | The ID of the item to be removed.
|
||||
`projectId` (`ID!`) | The ID of the Project from which the item should be removed.
|
||||
|
|
|
@ -13,7 +13,10 @@ versions:
|
|||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Issues
|
||||
- Project management
|
||||
shortTitle: Create & edit milestones
|
||||
type: how_to
|
||||
---
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-issue-pr %}
|
||||
|
|
|
@ -27,6 +27,9 @@ versions:
|
|||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Issues
|
||||
- Project management
|
||||
type: how_to
|
||||
---
|
||||
## About labels
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Before you require use of two-factor authentication, we recommend notifying {% i
|
|||
|
||||
## Viewing people who were removed from your organization
|
||||
|
||||
To view people who were automatically removed from your organization for non-compliance when you required two-factor authentication, you can [search your organization's audit log](/articles/reviewing-the-audit-log-for-your-organization/#accessing-the-audit-log) for people removed from your organization. The audit log event will show if a person was removed for 2FA non-compliance.
|
||||
To view people who were automatically removed from your organization for non-compliance when you required two-factor authentication, you can [search your organization's audit log](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log) for people removed from your organization. The audit log event will show if a person was removed for 2FA non-compliance.
|
||||
|
||||
![Audit log event showing a user removed for 2FA non-compliance](/assets/images/help/2fa/2fa_noncompliance_audit_log_search.png)
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ To search for specific events, use the `action` qualifier in your query. Actions
|
|||
| [`enterprise`](#enterprise-category-actions) | Contains activities related to enterprise settings. | {% endif %}
|
||||
| [`hook`](#hook-category-actions) | Contains all activities related to webhooks.
|
||||
| [`integration_installation_request`](#integration_installation_request-category-actions) | Contains all activities related to organization member requests for owners to approve integrations for use in the organization. |
|
||||
| [`ip_allow_list`](#ip_allow_list) | Contains activitites related to enabling or disabling the IP allow list for an organization.
|
||||
| [`ip_allow_list_entry`](#ip_allow_list_entry) | Contains activities related to the creation, deletion, and editing of an IP allow list entry for an organization.
|
||||
| [`ip_allow_list`](#ip_allow_list) | Contains activitites related to enabling or disabling the IP allow list for an organization.
|
||||
| [`ip_allow_list_entry`](#ip_allow_list_entry) | Contains activities related to the creation, deletion, and editing of an IP allow list entry for an organization.
|
||||
| [`issue`](#issue-category-actions) | Contains activities related to deleting an issue. {% ifversion fpt or ghec %}
|
||||
| [`marketplace_agreement_signature`](#marketplace_agreement_signature-category-actions) | Contains all activities related to signing the {% data variables.product.prodname_marketplace %} Developer Agreement.
|
||||
| [`marketplace_listing`](#marketplace_listing-category-actions) | Contains all activities related to listing apps in {% data variables.product.prodname_marketplace %}.{% endif %}{% ifversion fpt or ghes > 3.0 or ghec %}
|
||||
|
@ -71,7 +71,8 @@ To search for specific events, use the `action` qualifier in your query. Actions
|
|||
| [`repository_dependency_graph`](#repository_dependency_graph-category-actions) | Contains repository-level activities related to enabling or disabling the dependency graph for a {% ifversion fpt or ghec %}private {% endif %}repository. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)."{% endif %}
|
||||
| [`repository_secret_scanning`](#repository_secret_scanning-category-actions) | Contains repository-level activities related to secret scanning. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)." {% ifversion fpt or ghes or ghae-issue-4864 or ghec %}
|
||||
| [`repository_vulnerability_alert`](#repository_vulnerability_alert-category-actions) | Contains all activities related to [{% data variables.product.prodname_dependabot_alerts %} for vulnerable dependencies](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies).{% endif %}{% ifversion fpt or ghec %}
|
||||
| [`repository_vulnerability_alerts`](#repository_vulnerability_alerts-category-actions) | Contains repository-level configuration activities for {% data variables.product.prodname_dependabot %} alerts. {% endif %}
|
||||
| [`repository_vulnerability_alerts`](#repository_vulnerability_alerts-category-actions) | Contains repository-level configuration activities for {% data variables.product.prodname_dependabot %} alerts.{% endif %}{% ifversion ghec %}
|
||||
| [`role`](#role-category-actions) | Contains all activities related to [custom repository roles](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).{% endif %}
|
||||
| [`secret_scanning`](#secret_scanning-category-actions) | Contains organization-level configuration activities for secret scanning in existing repositories. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
|
||||
| [`secret_scanning_new_repos`](#secret_scanning_new_repos-category-actions) | Contains organization-level configuration activities for secret scanning for new repositories created in the organization. {% ifversion fpt or ghec %}
|
||||
| [`sponsors`](#sponsors-category-actions) | Contains all events related to sponsor buttons (see "[Displaying a sponsor button in your repository](/articles/displaying-a-sponsor-button-in-your-repository)"){% endif %}
|
||||
|
@ -598,7 +599,7 @@ For more information, see "[Managing the publication of {% data variables.produc
|
|||
| `remove_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is removed.{% endif %}
|
||||
| `remove_member` | Triggered when a user is [removed from a repository as a collaborator](/articles/removing-a-collaborator-from-a-personal-repository).
|
||||
| `register_self_hosted_runner` | Triggered when a new self-hosted runner is registered. For more information, see "[Adding a self-hosted runner to a repository](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository)."
|
||||
| `remove_self_hosted_runner` | Triggered when a self-hosted runner is removed. For more information, see "[Removing a runner from a repository](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-a-repository)."
|
||||
| `remove_self_hosted_runner` | Triggered when a self-hosted runner is removed. For more information, see "[Removing a runner from a repository](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-a-repository)."
|
||||
| `remove_topic` | Triggered when a repository admin removes a topic from a repository.
|
||||
| `rename` | Triggered when [a repository is renamed](/articles/renaming-a-repository).{% ifversion fpt or ghes > 3.1 or ghae-issue-1157 or ghec %}
|
||||
| `self_hosted_runner_online` | Triggered when the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)."
|
||||
|
@ -669,7 +670,16 @@ For more information, see "[Managing the publication of {% data variables.produc
|
|||
| `disable` | Triggered when a repository owner or person with admin access to the repository disables {% data variables.product.prodname_dependabot_alerts %}.
|
||||
| `enable` | Triggered when a repository owner or person with admin access to the repository enables {% data variables.product.prodname_dependabot_alerts %}.
|
||||
|
||||
{% endif %}{% ifversion ghec %}
|
||||
### `role` category actions
|
||||
| Action | Description
|
||||
|------------------|-------------------
|
||||
|`create` | Triggered when an organization owner creates a new custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
|
||||
|`destroy` | Triggered when a organization owner deletes a custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
|
||||
|`update` | Triggered when an organization owner edits an existing custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
### `secret_scanning` category actions
|
||||
|
||||
| Action | Description
|
||||
|
@ -717,9 +727,9 @@ For more information, see "[Managing the publication of {% data variables.produc
|
|||
| `change_parent_team` | Triggered when a child team is created or [a child team's parent is changed](/articles/moving-a-team-in-your-organization-s-hierarchy).
|
||||
| `change_privacy` | Triggered when a team's privacy level is changed.
|
||||
| `create` | Triggered when a new team is created.
|
||||
`demote_maintainer` | Triggered when a user was demoted from a team maintainer to a team member. For more information, see "[Giving "team maintainer" permissions to an organization member](/organizations/managing-peoples-access-to-your-organization-with-roles/giving-team-maintainer-permissions-to-an-organization-member)."
|
||||
| `demote_maintainer` | Triggered when a user was demoted from a team maintainer to a team member. For more information, see "[Assigning the team maintainer role to a team member](/organizations/organizing-members-into-teams/assigning-the-team-maintainer-role-to-a-team-member)."
|
||||
| `destroy` | Triggered when a team is deleted from the organization.
|
||||
`team.promote_maintainer` | Triggered when a user was promoted from a team member to a team maintainer. For more information, see "[Giving "team maintainer" permissions to an organization member](/organizations/managing-peoples-access-to-your-organization-with-roles/giving-team-maintainer-permissions-to-an-organization-member)."
|
||||
| `team.promote_maintainer` | Triggered when a user was promoted from a team member to a team maintainer. For more information, see "[Assigning the team maintainer role to a team member](/organizations/organizing-members-into-teams/assigning-the-team-maintainer-role-to-a-team-member)."
|
||||
| `remove_member` | Triggered when a member of an organization is [removed from a team](/articles/removing-organization-members-from-a-team).
|
||||
| `remove_repository` | Triggered when a repository is no longer under a team's control.
|
||||
|
||||
|
|
|
@ -15,16 +15,26 @@ topics:
|
|||
- Organizations
|
||||
- Teams
|
||||
shortTitle: Manage individual access
|
||||
permissions: People with admin access to a repository can manage access to the repository.
|
||||
---
|
||||
|
||||
People with admin permissions can manage the access of organization members and outside collaborators to an organization repository.
|
||||
|
||||
## Removing access to repositories
|
||||
## About access to organization repositories
|
||||
|
||||
When you remove a collaborator from a repository in your organization, the collaborator loses read and write access to the repository. If the repository is private and the collaborator has forked the repository, then their fork is also deleted, but the collaborator will still retain any local clones of your repository.
|
||||
|
||||
{% data reusables.repositories.deleted_forks_from_private_repositories_warning %}
|
||||
|
||||
## Giving a person access to a repository
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.repositories.navigate-to-manage-access %}
|
||||
{% data reusables.organizations.invite-teams-or-people %}
|
||||
5. In the search field, start typing the name of the person to invite, then click a name in the list of matches.
|
||||
![Search field for typing the name of a team or person to invite to the repository](/assets/images/help/repository/manage-access-invite-search-field.png)
|
||||
6. Under "Choose a role", select the repository role to assign the person, then click **Add NAME to REPOSITORY**.
|
||||
![Selecting permissions for the team or person](/assets/images/help/repository/manage-access-invite-choose-role-add.png)
|
||||
|
||||
## Managing an individual's access to an organization repository
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
|
|
|
@ -29,6 +29,12 @@ From least access to most access, the roles for an organization repository are:
|
|||
- **Maintain**: Recommended for project managers who need to manage the repository without access to sensitive or destructive actions
|
||||
- **Admin**: Recommended for people who need full access to the project, including sensitive and destructive actions like managing security or deleting a repository
|
||||
|
||||
{% ifversion fpt %}
|
||||
If your organization uses {% data variables.product.prodname_ghe_cloud %}, you can create custom repository roles. For more information, see "[Managing custom repository roles for an organization](/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
|
||||
{% elsif ghec %}
|
||||
You can create custom repository roles. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
|
||||
{% endif %}
|
||||
|
||||
Organization owners can set base permissions that apply to all members of an organization when accessing any of the organization's repositories. For more information, see "[Setting base permissions for an organization](/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization#setting-base-permissions)."
|
||||
|
||||
Organization owners can also choose to further limit access to certain settings and actions across the organization. For more information on options for specific settings, see "[Managing organization settings](/articles/managing-organization-settings)."
|
||||
|
@ -57,6 +63,7 @@ Some of the features listed below are limited to organizations using {% data var
|
|||
|
||||
| Repository action | Read | Triage | Write | Maintain | Admin |
|
||||
|:---|:---:|:---:|:---:|:---:|:---:|
|
||||
| Manage [individual](/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository), [team](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository), and [outside collaborator](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization) access to the repository | | | | | **X** |
|
||||
| Pull from the person or team's assigned repositories | **X** | **X** | **X** | **X** | **X** |
|
||||
| Fork the person or team's assigned repositories | **X** | **X** | **X** | **X** | **X** |
|
||||
| Edit and delete their own comments | **X** | **X** | **X** | **X** | **X** |
|
||||
|
|
|
@ -21,7 +21,11 @@ You can set base permissions that apply to all members of an organization when a
|
|||
|
||||
{% ifversion fpt or ghec %}By default, members of an organization will have **Read** permissions to the organization's repositories.{% endif %}
|
||||
|
||||
If someone with admin permissions to an organization's repository grants a member a higher level of permission for the repository, the higher level of permission overrides the base permission.
|
||||
If someone with admin access to an organization's repository grants a member a higher level of access for the repository, the higher level of access overrides the base permission.
|
||||
|
||||
{% ifversion ghec %}
|
||||
If you've created a custom repository role with an inherited role that is lower access than your organization's base permissions, any members assigned to that role will default to the organization's base permissions rather than the inherited role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
|
||||
{% endif %}
|
||||
|
||||
## Setting base permissions
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ shortTitle: Allow issue deletion
|
|||
|
||||
By default, issues cannot be deleted in an organization's repositories. An organization owner must enable this feature for all of the organization's repositories first.
|
||||
|
||||
Once enabled, organization owners and people with admin permissions in an organization-owned repository can delete issues. People with admin permissions in a repository include organization members and outside collaborators with admin privileges. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)" and "[Deleting an issue](/articles/deleting-an-issue)."
|
||||
Once enabled, organization owners and people with admin access in an organization-owned repository can delete issues. People with admin access in a repository include organization members and outside collaborators who were given admin access. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)" and "[Deleting an issue](/articles/deleting-an-issue)."
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
|
|
|
@ -18,7 +18,7 @@ After you disable organization-wide project boards, it won’t be possible to cr
|
|||
|
||||
After you disable repository project boards in an organization, it won't be possible to create new project boards in any repositories in the organization, and any existing project boards in repositories in the organization will become inaccessible at their previous URLs. Project boards at the organization level are not affected.
|
||||
|
||||
When you disable project boards, you will no longer see project board information in timelines or [audit logs](/articles/reviewing-the-audit-log-for-your-organization/).
|
||||
When you disable project boards, you will no longer see project board information in timelines or [audit logs](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization).
|
||||
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
title: Giving "team maintainer" permissions to an organization member
|
||||
intro: 'An organization owner can promote any member of the organization to *team maintainer* for a team, giving them a subset of privileges available to organization owners.'
|
||||
redirect_from:
|
||||
- /articles/giving-team-maintainer-permissions-to-an-organization-member-early-access-program/
|
||||
- /articles/giving-team-maintainer-permissions-to-an-organization-member
|
||||
- /github/setting-up-and-managing-organizations-and-teams/giving-team-maintainer-permissions-to-an-organization-member
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Organizations
|
||||
- Teams
|
||||
shortTitle: Team maintainer permissions
|
||||
---
|
||||
|
||||
{% data reusables.organizations.team_maintainers_can %}
|
||||
|
||||
## Promoting an organization member to team maintainer
|
||||
|
||||
Before promoting an organization member to team maintainer, the person must already be a member of the team.
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.user_settings.access_org %}
|
||||
{% data reusables.organizations.specific_team %}
|
||||
{% data reusables.organizations.team_members_tab %}
|
||||
4. Select the person or people you'd like to promote to team maintainer.
|
||||
![Check box next to organization member](/assets/images/help/teams/team-member-check-box.png)
|
||||
5. Above the list of team members, use the drop-down menu and click **Change role...**.
|
||||
![Drop-down menu with option to change role](/assets/images/help/teams/bulk-edit-drop-down.png)
|
||||
6. Select a new role and click **Change role**.
|
||||
![Radio buttons for Maintainer or Member roles](/assets/images/help/teams/team-role-modal.png)
|
|
@ -16,7 +16,7 @@ topics:
|
|||
children:
|
||||
- /roles-in-an-organization
|
||||
- /maintaining-ownership-continuity-for-your-organization
|
||||
- /giving-team-maintainer-permissions-to-an-organization-member
|
||||
- /managing-custom-repository-roles-for-an-organization
|
||||
- /adding-a-billing-manager-to-your-organization
|
||||
- /removing-a-billing-manager-from-your-organization
|
||||
- /managing-security-managers-in-your-organization
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: Managing custom repository roles for an organization
|
||||
intro: "You can more granularly control access to your organization's repositories by creating custom repository roles."
|
||||
permissions: 'Organization owners can manage custom repository roles.'
|
||||
versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Organizations
|
||||
- Teams
|
||||
shortTitle: Custom repository roles
|
||||
redirect_from:
|
||||
- /early-access/github/articles/managing-custom-repository-roles-for-an-organization
|
||||
---
|
||||
|
||||
{% data reusables.pre-release-program.custom-roles-public-beta %}
|
||||
|
||||
## About custom repository roles
|
||||
|
||||
To perform any actions on {% data variables.product.product_name %}, such as creating a pull request in a repository or changing an organization's billing settings, a person must have sufficient access to the relevant account or resource. This access is controlled by permissions. A permission is the ability to perform a specific action. For example, the ability to delete an issue is a permission. A role is a set of permissions you can assign to individuals or teams.
|
||||
|
||||
Within an organization, you can assign roles at the organization, team, and repository level. For more information about the different levels of roles, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
|
||||
|
||||
If your organization uses {% data variables.product.prodname_ghe_cloud %}, you can have more granular control over the permissions you grant at the repository level by creating up to three custom repository roles. A custom repository role is a configurable set of permissions with a custom name you choose. After you create a custom role, anyone with admin access to a repository can assign the role to an individual or team. For more information, see "[Managing an individual's access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository)" and "[Managing team access to an organization repository](https://docs-internal-21729--see-chang.herokuapp.com/en/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)"
|
||||
|
||||
{% data reusables.enterprise.link-to-ghec-trial %}
|
||||
|
||||
## About the inherited role
|
||||
|
||||
When you create a custom repository role, you start by choosing an inherited role from a set of pre-defined options. The inherited role determines the initial set of permissions included in the custom role. Then, you can further customize the role by choosing additional permissions to give the role. For the full list of available permissions, see "[Additional permissions for custom roles](#additional-permissions-for-custom-roles)."
|
||||
|
||||
Your options for the inherited role are standardized for different types of contributors in your repository.
|
||||
|
||||
| Inherited role | Designed for |
|
||||
|----|----|
|
||||
| **Read** | Non-code contributors who want to view or discuss your project. |
|
||||
| **Triage** | Contributors who need to proactively manage issues and pull requests without write access. |
|
||||
| **Write** | Organization members and collaborators who actively push to your project. |
|
||||
| **Maintain** | Project managers who need to manage the repository without access to sensitive or destructive actions.
|
||||
|
||||
## Custom role examples
|
||||
|
||||
Here are some examples of custom repository roles you can configure.
|
||||
|
||||
| Custom repository role | Summary | Inherited role | Additional permissions |
|
||||
|----|----|----|----|
|
||||
| Security engineer | Able to contribute code and maintain the security pipeline | **Maintain** | Delete code scanning results |
|
||||
| Contractor | Able to develop webhooks integrations | **Write** | Manage webhooks |
|
||||
| Community manager | Able to handle all the community interactions without being able to contribute code | **Read** | - Mark an issue as duplicate <br> - Manage GitHub Page settings <br> - Manage wiki settings <br> - Set the social preview <br> - Edit repository metadata <br> - Triage discussions |
|
||||
|
||||
## Additional permissions for custom roles
|
||||
|
||||
After choosing an inherited role, you can select additional permissions for your custom role.
|
||||
|
||||
You can only choose an additional permission if it's not already included in the inherited role. For example, if the inherited role offers **Write** access to a repository, then the "Close a pull request" permission will already be included in the inherited role.
|
||||
|
||||
### Issue and Pull Requests
|
||||
|
||||
- **Assign or remove a user**: Assign a user to an issue or pull request, or remove a user from an issue or pull request.
|
||||
- **Add or remove a label**: Add a label to an issue or a pull request, or remove a label from an issue or pull request.
|
||||
|
||||
### Issue
|
||||
|
||||
- **Close an issue**
|
||||
- **Reopen a closed issue**
|
||||
- **Delete an issue**
|
||||
- **Mark an issue as a duplicate**
|
||||
|
||||
### Pull Request
|
||||
|
||||
- **Close a pull request**
|
||||
- **Reopen a closed pull request**
|
||||
- **Request a pull request review**: Request a review from a user or team.
|
||||
|
||||
### Repository
|
||||
|
||||
- **Set milestones**: Add milestones to an issue or pull request.
|
||||
- **Manage wiki settings**: Turn on wikis for a repository.
|
||||
- **Manage project settings**: Turning on projects for a repository.
|
||||
- **Manage pull request merging settings**: Choose the type of merge commits that are allowed in your repository, such as merge, squash, or rebase.
|
||||
- **Manage {% data variables.product.prodname_pages %} settings**: Enable {% data variables.product.prodname_pages %} for the repository, and select the branch you want to publish. For more information, see "[Configuring a publishing source for your {% data variables.product.prodname_pages %} site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."
|
||||
- **Manage webhooks**: Add webhooks to the repository.
|
||||
- **Manage deploy keys**: Add deploy keys to the repository.
|
||||
- **Edit repository metadata**: Update the repository description as well as the repository topics.
|
||||
- **Set interaction limits**: Temporarily restrict certain users from commenting, opening issues, or creating pull requests in your public repository to enforce a period of limited activity. For more information, see "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)."
|
||||
- **Set the social preview**: Add an identifying image to your repository that appears on social media platforms when your repository is linked. For more information, see "[Customizing your repository's social media preview](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview)."
|
||||
- **Push commits to protected branches**: Push to a branch that is marked as a protected branch.
|
||||
|
||||
### Security
|
||||
|
||||
- **Read {% data variables.product.prodname_code_scanning %} results**
|
||||
- **Write {% data variables.product.prodname_code_scanning %} results**
|
||||
- **Delete {% data variables.product.prodname_code_scanning %} results**
|
||||
|
||||
## Precedence for different levels of access
|
||||
|
||||
If a person is given different levels of access through different avenues, such as team membership and the base permissions for an organization, the highest access overrides the others. For example, if an organization owner gives an organization member a custom role that uses the "Read" inherited role, and then an organization owner sets the organization's base permission to "Write", then this custom role will have write access, along with any additional permissions included in the custom role.
|
||||
|
||||
If a person has been given conflicting access, you'll see a warning on the repository access page. The warning appears with "{% octicon "alert" aria-label="The alert icon" %} Mixed roles" next to the person with the conflicting access. To see the source of the conflicting access, hover over the warning icon or click **Mixed roles**.
|
||||
|
||||
To resolve conflicting access, you can adjust your organization's base permissions or the team's access, or edit the custom role. For more information, see:
|
||||
- "[Setting base permissions for an organization](/github/setting-up-and-managing-organizations-and-teams/setting-base-permissions-for-an-organization)"
|
||||
- "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)"
|
||||
- "[Editing a repository role](#editing-a-repository-role)"
|
||||
|
||||
## Creating a repository role
|
||||
|
||||
To create a new repository role, you add permissions to an inherited role and give the custom role a name.
|
||||
|
||||
{% data reusables.profile.access_profile %}
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.organizations.org_settings %}
|
||||
{% data reusables.organizations.org-list %}
|
||||
{% data reusables.organizations.org-settings-repository-roles %}
|
||||
5. Click **Create a Role**.
|
||||
![Screenshot of "Create a Role" button](/assets/images/help/organizations/repository-role-create-role.png)
|
||||
4. Under "Name", type the name of your repository role.
|
||||
![Field to type a name for the repository role](/assets/images/help/organizations/repository-role-name.png)
|
||||
5. Under "Description", type a description of your repository role.
|
||||
![Field to type a description for the repository role](/assets/images/help/organizations/repository-role-description.png)
|
||||
6. Under "Choose a role to inherit", select the role you want to inherit.
|
||||
![Selecting repository role base role option](/assets/images/help/organizations/repository-role-base-role-option.png)
|
||||
7. Under "Add Permissions", use the drop-down menu to select the permissions you want your custom role to include.
|
||||
![Selecting permission levels from repository role drop-down](/assets/images/help/organizations/repository-role-drop-down.png)
|
||||
7. Click **Create role**.
|
||||
![Confirm creating a repository role](/assets/images/help/organizations/repository-role-creation-confirm.png)
|
||||
|
||||
## Editing a repository role
|
||||
|
||||
{% data reusables.profile.access_profile %}
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.organizations.org_settings %}
|
||||
{% data reusables.organizations.org-list %}
|
||||
{% data reusables.organizations.org-settings-repository-roles %}
|
||||
3. To the right of the role you want to edit, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **Edit**.
|
||||
![Edit option in drop-down menu for repository roles](/assets/images/help/organizations/repository-role-edit-setting.png)
|
||||
4. Edit, then click **Update role**.
|
||||
![Edit fields and update repository roles](/assets/images/help/organizations/repository-role-update.png)
|
||||
|
||||
## Deleting a repository role
|
||||
|
||||
If you delete an existing repository role, all pending invitations, teams, and users with the custom role will be reassigned to the organization's base permissions.
|
||||
|
||||
{% data reusables.profile.access_profile %}
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.organizations.org_settings %}
|
||||
{% data reusables.organizations.org-list %}
|
||||
{% data reusables.organizations.org-settings-repository-roles %}
|
||||
3. To the right of the role you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **Delete**.
|
||||
![Edit option in drop-down menu for repository roles](/assets/images/help/organizations/repository-role-delete-setting.png)
|
||||
4. Review changes for the role you want to remove, then click **Delete role**.
|
||||
![Confirm deleting a repository role](/assets/images/help/organizations/repository-role-delete-confirm.png)
|
|
@ -21,7 +21,7 @@ shortTitle: Roles in an organization
|
|||
|
||||
Repository-level roles give organization members, outside collaborators and teams of people varying levels of access to repositories. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
|
||||
|
||||
Team-level roles are roles that give permissions to manage a team. You can give any individual member of a team the team maintainer role, which gives the member a number of administrative permissions over a team. For more information, see "[Giving "team maintainer" permissions to an organization member](/organizations/managing-peoples-access-to-your-organization-with-roles/giving-team-maintainer-permissions-to-an-organization-member)."
|
||||
Team-level roles are roles that give permissions to manage a team. You can give any individual member of a team the team maintainer role, which gives the member a number of administrative permissions over a team. For more information, see "[Assigning the team maintainer role to a team member](/organizations/organizing-members-into-teams/assigning-the-team-maintainer-role-to-a-team-member)."
|
||||
|
||||
Organization-level roles are sets of permissions that can be assigned to individuals or teams to manage an organization and the organization's repositories, teams, and settings. For more information about all the roles available at the organization level, see "[About organization roles](#about-organization-roles)."
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: Assigning the team maintainer role to a team member
|
||||
intro: 'You can give a team member the ability to manage team membership and settings by assigning the team maintainer role.'
|
||||
redirect_from:
|
||||
- /articles/giving-team-maintainer-permissions-to-an-organization-member-early-access-program/
|
||||
- /articles/giving-team-maintainer-permissions-to-an-organization-member
|
||||
- /github/setting-up-and-managing-organizations-and-teams/giving-team-maintainer-permissions-to-an-organization-member
|
||||
- /organizations/managing-peoples-access-to-your-organization-with-roles/giving-team-maintainer-permissions-to-an-organization-member
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Organizations
|
||||
- Teams
|
||||
shortTitle: Team maintainers
|
||||
permissions: Organization owners can promote team members to team maintainers.
|
||||
---
|
||||
|
||||
## About team maintainers
|
||||
|
||||
People with the team maintainer role can manage team membership and settings.
|
||||
|
||||
- [Change the team's name and description](/articles/renaming-a-team)
|
||||
- [Change the team's visibility](/articles/changing-team-visibility)
|
||||
- [Request to add a child team](/articles/requesting-to-add-a-child-team)
|
||||
- [Request to add or change a parent team](/articles/requesting-to-add-or-change-a-parent-team)
|
||||
- [Set the team profile picture](/articles/setting-your-team-s-profile-picture)
|
||||
- [Edit team discussions](/articles/managing-disruptive-comments/#editing-a-comment)
|
||||
- [Delete team discussions](/articles/managing-disruptive-comments/#deleting-a-comment)
|
||||
- [Add organization members to the team](/articles/adding-organization-members-to-a-team)
|
||||
- [Remove organization members from the team](/articles/removing-organization-members-from-a-team)
|
||||
- Remove the team's access to repositories{% ifversion fpt or ghes or ghae or ghec %}
|
||||
- [Manage code review assignment for the team](/organizations/organizing-members-into-teams/managing-code-review-assignment-for-your-team){% endif %}{% ifversion fpt or ghec %}
|
||||
- [Manage scheduled reminders for pull requests](/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team){% endif %}
|
||||
|
||||
|
||||
## Promoting an organization member to team maintainer
|
||||
|
||||
Before you can promote an organization member to team maintainer, the person must already be a member of the team.
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.user_settings.access_org %}
|
||||
{% data reusables.organizations.specific_team %}
|
||||
{% data reusables.organizations.team_members_tab %}
|
||||
4. Select the person or people you'd like to promote to team maintainer.
|
||||
![Check box next to organization member](/assets/images/help/teams/team-member-check-box.png)
|
||||
5. Above the list of team members, use the drop-down menu and click **Change role...**.
|
||||
![Drop-down menu with option to change role](/assets/images/help/teams/bulk-edit-drop-down.png)
|
||||
6. Select a new role and click **Change role**.
|
||||
![Radio buttons for Maintainer or Member roles](/assets/images/help/teams/team-role-modal.png)
|
|
@ -23,8 +23,9 @@ topics:
|
|||
children:
|
||||
- /about-teams
|
||||
- /creating-a-team
|
||||
- /setting-your-teams-profile-picture
|
||||
- /adding-organization-members-to-a-team
|
||||
- /assigning-the-team-maintainer-role-to-a-team-member
|
||||
- /setting-your-teams-profile-picture
|
||||
- /managing-code-review-assignment-for-your-team
|
||||
- /renaming-a-team
|
||||
- /changing-team-visibility
|
||||
|
|
|
@ -97,6 +97,34 @@ To further customize access to your container image, see "[Configuring access to
|
|||
|
||||
To further customize access to your container image, see "[Configuring access to container images for an organization](#configuring-access-to-container-images-for-an-organization)."
|
||||
|
||||
## Ensuring {% data variables.product.prodname_codespaces %} access to your package
|
||||
|
||||
By default, a codespace can seamlessly access certain packages in the {% data variables.product.prodname_dotcom %} Container Registry, such as those published in the same repository with the **Inherit access** option selected. For more information on which access is automatically configured, see "[Accessing images stored in {% data variables.product.prodname_dotcom %} Container Registry](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry#accessing-images-stored-in-github-container-registry)."
|
||||
|
||||
Otherwise, to ensure that a codespace has access to your package, you must grant access to the repository where the codespace is being launched.
|
||||
|
||||
The specified repository does not need to be the repository where the source code for the package is kept. You can give codespaces in multiple repositories access to a package.
|
||||
|
||||
Once you've selected the package you're interested in sharing with codespaces in a repository, you can grant that repo access.
|
||||
|
||||
1. In the right sidebar, click **Package settings**.
|
||||
|
||||
!["Package settings" option in right menu](/assets/images/help/package-registry/package-settings.png)
|
||||
|
||||
2. Under "Manage Codespaces access", click **Add repository**.
|
||||
|
||||
!["Add repository" button](/assets/images/help/package-registry/manage-codespaces-access-blank.png)
|
||||
|
||||
3. Search for the repository you want to add.
|
||||
|
||||
!["Add repository" button](/assets/images/help/package-registry/manage-codespaces-access-search.png)
|
||||
|
||||
4. Repeat for any additional repositories you would like to allow access.
|
||||
|
||||
5. If the codespaces for a repository no longer need access to an image, you can remove access.
|
||||
|
||||
!["Remove repository" button](/assets/images/help/package-registry/manage-codespaces-access-item.png)
|
||||
|
||||
## Configuring visibility of container images for your personal account
|
||||
|
||||
When you first publish a package, the default visibility is private and only you can see the package. You can modify a private or public container image's access by changing the access settings.
|
||||
|
|
|
@ -16,6 +16,14 @@ shortTitle: About merge methods
|
|||
---
|
||||
{% data reusables.pull_requests.configure_pull_request_merges_intro %} You can enforce one type of merge method, such as commit squashing or rebasing, by only enabling the desired method for your repository.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
{% note %}
|
||||
|
||||
**Note:** When using the merge queue, you no longer get to choose the merge method, as this is controlled by the queue. {% data reusables.pull_requests.merge-queue-references %}
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.pull_requests.default_merge_option %}
|
||||
|
||||
{% ifversion fpt or ghae or ghes or ghec %}
|
||||
|
|
|
@ -15,6 +15,7 @@ children:
|
|||
- /about-merge-methods-on-github
|
||||
- /configuring-commit-squashing-for-pull-requests
|
||||
- /configuring-commit-rebasing-for-pull-requests
|
||||
- /using-a-merge-queue
|
||||
- /managing-auto-merge-for-pull-requests-in-your-repository
|
||||
- /managing-the-automatic-deletion-of-branches
|
||||
shortTitle: Configure PR merges
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: Using a merge queue
|
||||
intro: You can increase development velocity by enabling merge queues for pull requests in your repository.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
permissions: People with admin permissions can configure merge queues for pull requests targeting selected branches of a repository.
|
||||
topics:
|
||||
- Repositories
|
||||
- Pull requests
|
||||
shortTitle: Use merge queue
|
||||
---
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-beta %}
|
||||
|
||||
## About pull request merge queue
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-overview %}
|
||||
{% data reusables.pull_requests.merge-queue-reject %}
|
||||
|
||||
## Managing pull request merge queue
|
||||
|
||||
Repository administrators can configure merge queues for pull requests targeting selected branches of a repository. The requirement to use a merge queue is a branch protection setting called "Require merge queue" that can be enabled in branch protection rules.
|
||||
|
||||
For information about how to enable the merge queue protection setting, see "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule#creating-a-branch-protection-rule)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Adding a pull request to the merge queue](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/adding-a-pull-request-to-the-merge-queue)"
|
||||
- "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)"
|
|
@ -46,6 +46,9 @@ For each branch protection rule, you can choose to enable or disable the followi
|
|||
- [Require conversation resolution before merging](#require-conversation-resolution-before-merging){% endif %}
|
||||
- [Require signed commits](#require-signed-commits)
|
||||
- [Require linear history](#require-linear-history)
|
||||
{% ifversion fpt or ghec %}
|
||||
- [Require merge queue](#require-merge-queue)
|
||||
{% endif %}
|
||||
- [Include administrators](#include-administrators)
|
||||
- [Restrict who can push to matching branches](#restrict-who-can-push-to-matching-branches)
|
||||
- [Allow force pushes](#allow-force-pushes)
|
||||
|
@ -134,6 +137,14 @@ Enforcing a linear commit history prevents collaborators from pushing merge comm
|
|||
|
||||
Before you can require a linear commit history, your repository must allow squash merging or rebase merging. For more information, see "[Configuring pull request merges](/github/administering-a-repository/configuring-pull-request-merges)."
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
### Require merge queue
|
||||
|
||||
{% data reusables.pull_requests.merge-queue-beta %}
|
||||
{% data reusables.pull_requests.merge-queue-overview %}
|
||||
{% data reusables.pull_requests.merge-queue-references %}
|
||||
|
||||
{% endif %}
|
||||
### Include administrators
|
||||
|
||||
By default, protected branch rules do not apply to people with admin permissions to a repository. You can enable this setting to include administrators in your protected branch rules.
|
||||
|
|