Create "How-tos" section for Copilot docs (#56344)
Co-authored-by: Sarah Schneider <sarahs@github.com> Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: Creating a pull request summary with GitHub Copilot
|
||||
shortTitle: Create a PR summary
|
||||
intro: 'You can generate a summary in the description of a pull request, or as a comment.'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
product: '{% data reusables.gated-features.copilot-free-availability %}'
|
||||
redirect_from:
|
||||
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests/creating-a-pull-request-summary-with-github-copilot
|
||||
- /copilot/github-copilot-enterprise/copilot-pull-request-summaries/creating-a-pull-request-summary-with-github-copilot
|
||||
- /copilot/github-copilot-enterprise/copilot-pull-request-summaries
|
||||
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests
|
||||
- /copilot/using-github-copilot/creating-a-pull-request-summary-with-github-copilot
|
||||
---
|
||||
|
||||
## About {% data variables.copilot.copilot_for_prs %}
|
||||
|
||||
You can use {% data variables.product.prodname_copilot %} to generate a summary of a pull request on {% data variables.product.github %}. You can use the summary to help reviewers understand your changes, or to quickly understand the changes in a pull request you're reviewing.
|
||||
|
||||
{% data variables.product.prodname_copilot %} will scan through the pull request and provide an overview of the changes made in prose, as well as a bulleted list of changes with the files that they impact. You can generate a summary in the following places.
|
||||
|
||||
* In the description of a new pull request you're creating
|
||||
* In the description of an existing pull request, by editing the opening comment
|
||||
* In a comment on the main timeline of a pull request
|
||||
|
||||
To learn more about {% data variables.copilot.copilot_for_prs %} and how to use the feature most effectively, see [AUTOTITLE](/copilot/github-copilot-enterprise/copilot-pull-request-summaries/about-copilot-pull-request-summaries).
|
||||
|
||||
## Creating a summary for a pull request
|
||||
|
||||
1. On {% data variables.product.github %}, create a pull request or navigate to an existing pull request.
|
||||
|
||||
> [!NOTE] {% data variables.product.prodname_copilot %} does not take into account any existing content in the pull request description, so it is best to start with a blank description.
|
||||
|
||||
1. Navigate to the text field where you want to add the pull request summary.
|
||||
|
||||
* If you're creating a new pull request, use the "Add a description" field.
|
||||
* If you're adding a description to an existing pull request, edit the opening comment.
|
||||
* If you're adding a summary as a comment, navigate to the "Add a comment" section at the bottom of the pull request page.
|
||||
|
||||
1. In the header of the text field, select {% octicon "copilot" aria-label="Copilot actions" %}, then click **Summary**.
|
||||
|
||||

|
||||
|
||||
1. Wait for {% data variables.product.prodname_copilot %} to produce the summary, then check over the results carefully.
|
||||
1. Optionally, depending on your enterprise or organization settings, you can provide feedback about the summary by clicking one of the buttons that are displayed below the text box, next to "How did Copilot perform?"
|
||||
|
||||

|
||||
|
||||
After you rate a summary as good or bad, you can provide written feedback by clicking the link that's displayed.
|
||||
|
||||
1. Add any additional context that will help people viewing your pull request.
|
||||
1. When you're happy with the description, click **Create pull request** on a new pull request, or **Update comment** if you're editing an existing description.
|
||||
14
content/copilot/how-tos/github-flow/index.md
Normal file
14
content/copilot/how-tos/github-flow/index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Copilot in the GitHub flow
|
||||
shortTitle: GitHub flow
|
||||
intro: '{% data variables.product.prodname_copilot %} enhances and integrates with many different {% data variables.product.github %} features.'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
children:
|
||||
- /using-github-copilot-to-create-issues
|
||||
- /creating-a-pull-request-summary-with-github-copilot
|
||||
- /using-github-copilot-in-the-command-line
|
||||
---
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Using GitHub Copilot in the command line
|
||||
intro: 'You can use {% data variables.product.prodname_copilot_short %} with the {% data variables.product.prodname_cli %} to get suggestions and explanations for the command line.'
|
||||
versions:
|
||||
feature: copilot-in-the-cli
|
||||
topics:
|
||||
- Copilot
|
||||
- CLI
|
||||
shortTitle: Use Copilot in the CLI
|
||||
redirect_from:
|
||||
- /copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli
|
||||
- /copilot/using-github-copilot/using-github-copilot-in-the-cli
|
||||
- /copilot/using-github-copilot/using-github-copilot-in-the-command-line
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* **Access to {% data variables.product.prodname_copilot %}**. See [AUTOTITLE](/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot).
|
||||
* **{% data variables.product.prodname_cli %} installed**. {% data reusables.cli.cli-installation %}
|
||||
* **{% data variables.copilot.copilot_cli_short %} extension installed**. See [AUTOTITLE](/copilot/github-copilot-in-the-cli/installing-github-copilot-in-the-cli).
|
||||
|
||||
If you have access to {% data variables.product.prodname_copilot %} via your organization or enterprise, you cannot use {% data variables.copilot.copilot_cli_short %} if your organization owner or enterprise administrator has disabled {% data variables.copilot.copilot_cli_short %}. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/managing-policies-for-copilot-in-your-organization).
|
||||
|
||||
## Getting command explanations
|
||||
|
||||
To ask {% data variables.copilot.copilot_cli_short %} to explain a command, run `gh copilot explain` followed by the command that you want explained. For example:
|
||||
|
||||
```shell copy
|
||||
gh copilot explain "sudo apt-get"
|
||||
```
|
||||
|
||||
## Getting command suggestions
|
||||
|
||||
To ask {% data variables.copilot.copilot_cli_short %} to suggest a command, run `gh copilot suggest` followed by the command that you want. For example:
|
||||
|
||||
```shell copy
|
||||
gh copilot suggest "Undo the last commit"
|
||||
```
|
||||
|
||||
{% data variables.copilot.copilot_cli_short %} will start an interactive session to get more information about what you want.
|
||||
|
||||
If you choose the **Execute command** option after {% data variables.copilot.copilot_cli_short %} suggests a command, {% data variables.copilot.copilot_cli_short %} will copy the command to your clipboard and exit the interactive session. Then you can manually paste the command into your CLI.
|
||||
|
||||
If you want {% data variables.copilot.copilot_cli_short %} to be able to execute commands on your behalf, you must set up the `ghcs` alias. See [AUTOTITLE](/copilot/github-copilot-in-the-cli/configuring-github-copilot-in-the-cli#setting-up-aliases).
|
||||
|
||||
## Sharing feedback
|
||||
|
||||
To send feedback to {% data variables.product.company_short %} about the quality of a suggestion, select the **Rate response** option in {% data variables.copilot.copilot_cli_short %}.
|
||||
|
||||
You can also open an issue in the [{% data variables.copilot.copilot_cli_short %} extension repository](https://github.com/github/gh-copilot).
|
||||
|
||||
## Further reading
|
||||
|
||||
* [{% data variables.copilot.copilot_cli_short %} extension README](https://github.com/github/gh-copilot?tab=readme-ov-file)
|
||||
* [AUTOTITLE](/copilot/github-copilot-in-the-cli/configuring-github-copilot-in-the-cli)
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
title: Using GitHub Copilot to create issues
|
||||
shortTitle: Use Copilot to create issues
|
||||
intro: 'Use {% data variables.product.prodname_copilot_short %} to quickly generate structured, high-quality issues from natural language or images, without filling out every field manually.'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
- Issues
|
||||
- Project management
|
||||
redirect_from:
|
||||
- /copilot/using-github-copilot/using-github-copilot-to-create-issues
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
|
||||
|
||||
Creating issues manually can be repetitive and time-consuming. With {% data variables.product.prodname_copilot_short %}, you can create issues faster by prompting in natural language, or even by uploading a screenshot. {% data variables.product.prodname_copilot_short %} fills out the title, body, labels, assignees, and more, using your repository’s templates and structure.
|
||||
|
||||
You stay in control: review and refine what {% data variables.product.prodname_copilot_short %} suggests, or make changes directly in the issue form.
|
||||
|
||||
## Creating an issue with {% data variables.product.prodname_copilot_short %}
|
||||
|
||||
You can create issues from {% data variables.copilot.copilot_chat_short %}'s immersive view.
|
||||
|
||||
1. Go to the immersive view of {% data variables.copilot.copilot_chat_short %} ([https://github.com/copilot](https://github.com/copilot)).
|
||||
1. At the bottom of the page, in the "Ask {% data variables.product.prodname_copilot_short %}" box, describe what you want to file. Specify the repository you would like to create your issue in using the org/repository format. If you do not specify a repository, {% data variables.product.prodname_copilot_short %} will infer the repository based on the repository you last created an issue in. You can try:
|
||||
|
||||
* "Create a feature request to add fuzzy matching to search."
|
||||
* "Log a bug for a 500 error when submitting the login form."
|
||||
* "Create a task and add a label for ‘needs design review’."
|
||||
|
||||
> [!NOTE] You can only use {% data variables.product.prodname_copilot_short %} to create issues in repositories where you already have permission to create issues. This feature doesn't change your access or bypass repository permissions.
|
||||
|
||||
1. Or, you can use one of the following methods to include an image in your prompt:
|
||||
|
||||
* Copy an image and paste it into the prompt box at the bottom of the page.
|
||||
* Click {% octicon "paperclip" aria-label="Add attachment" %} in the prompt box, then click **Image**. Browse to the image file you want to attach, select it and click **Open**.
|
||||
* Drag and drop an image file from your operating system's file explorer into the prompt box.
|
||||
|
||||
After you paste or upload the image, you can add text to your prompt, for example: "Create an issue because this error appears when trying to reset a password."
|
||||
|
||||
1. {% data variables.product.prodname_copilot_short %} will draft an issue that includes:
|
||||
|
||||
* A suggested title.
|
||||
* A formatted body (based on your repository’s template)
|
||||
|
||||
Based on your prompt, {% data variables.product.prodname_copilot_short %} will also suggest metadata such as labels, assignee, and issue type.
|
||||
|
||||
1. Review the draft. You can:
|
||||
|
||||
* Edit any part of the issue manually.
|
||||
* Ask {% data variables.product.prodname_copilot_short %} to make changes with a follow-up prompt.
|
||||
* Switch templates without losing your input.
|
||||
|
||||
1. Once the issue looks good, click **Create**.
|
||||
|
||||
{% data variables.product.prodname_copilot_short %} tailors its suggestions based on the repository where you're creating the issue. It selects the most relevant template for your prompt and applies associated metadata, like labels or issue type. If you choose a different template, {% data variables.product.prodname_copilot_short %} automatically reformats the content to match the new structure.
|
||||
|
||||
## Creating multiple issues at once
|
||||
|
||||
If your prompt includes multiple tasks or bugs, {% data variables.product.prodname_copilot_short %} can draft more than one issue at a time.
|
||||
|
||||
Each draft appears separately, and you can review and edit them individually. To publish the issues, click **Create** on each one you want to submit.
|
||||
|
||||
## Assigning issues to {% data variables.product.prodname_copilot_short %}
|
||||
|
||||
To assign an issue to {% data variables.product.prodname_copilot_short %}, you need to have {% data variables.copilot.copilot_coding_agent %} enabled. See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/enabling-copilot-coding-agent).
|
||||
|
||||
You can assign the issue during creation in one of two ways:
|
||||
|
||||
* **Natural language:** Prompt {% data variables.product.prodname_copilot_short %} with something like “Assign this issue to {% data variables.product.prodname_copilot_short %}."
|
||||
* **Manually:** Select "{% data variables.product.prodname_copilot_short %}" from the assignee list.
|
||||
|
||||
Once the issue is assigned and created, {% data variables.product.prodname_copilot_short %} will start working on it automatically. You’ll see a 👀 emoji reaction on the issue to indicate that {% data variables.product.prodname_copilot_short %} is working on it.
|
||||
Reference in New Issue
Block a user