diff --git a/assets/images/help/copilot/code-reference-dotcom.png b/assets/images/help/copilot/code-reference-dotcom.png new file mode 100644 index 000000000000..184d5ff3592d Binary files /dev/null and b/assets/images/help/copilot/code-reference-dotcom.png differ diff --git a/assets/images/help/copilot/code-review/coding-guidelines-comment@2x.png b/assets/images/help/copilot/code-review/coding-guidelines-comment@2x.png new file mode 100644 index 000000000000..dd14de83151a Binary files /dev/null and b/assets/images/help/copilot/code-review/coding-guidelines-comment@2x.png differ diff --git a/assets/images/help/copilot/code-review/feedback-controls@2x.png b/assets/images/help/copilot/code-review/feedback-controls@2x.png new file mode 100644 index 000000000000..e4a47287f4b2 Binary files /dev/null and b/assets/images/help/copilot/code-review/feedback-controls@2x.png differ diff --git a/assets/images/help/copilot/code-review/feedback-modal@2x.png b/assets/images/help/copilot/code-review/feedback-modal@2x.png new file mode 100644 index 000000000000..d12dfac1b536 Binary files /dev/null and b/assets/images/help/copilot/code-review/feedback-modal@2x.png differ diff --git a/assets/images/help/copilot/code-review/request-review-branch-rule@2x.png b/assets/images/help/copilot/code-review/request-review-branch-rule@2x.png new file mode 100644 index 000000000000..bf933f8a6bc6 Binary files /dev/null and b/assets/images/help/copilot/code-review/request-review-branch-rule@2x.png differ diff --git a/assets/images/help/copilot/code-review/request-review@2x.png b/assets/images/help/copilot/code-review/request-review@2x.png new file mode 100644 index 000000000000..f0fb7d035f0e Binary files /dev/null and b/assets/images/help/copilot/code-review/request-review@2x.png differ diff --git a/assets/images/help/copilot/code-review/review-comment@2x.png b/assets/images/help/copilot/code-review/review-comment@2x.png new file mode 100644 index 000000000000..808bc4c5bdcd Binary files /dev/null and b/assets/images/help/copilot/code-review/review-comment@2x.png differ diff --git a/assets/images/help/copilot/code-review/vscode-comment-feedback@2x.png b/assets/images/help/copilot/code-review/vscode-comment-feedback@2x.png new file mode 100644 index 000000000000..25941e1d7e72 Binary files /dev/null and b/assets/images/help/copilot/code-review/vscode-comment-feedback@2x.png differ diff --git a/assets/images/help/copilot/code-review/vscode-comment@2x.png b/assets/images/help/copilot/code-review/vscode-comment@2x.png new file mode 100644 index 000000000000..bd89fecd8126 Binary files /dev/null and b/assets/images/help/copilot/code-review/vscode-comment@2x.png differ diff --git a/assets/images/help/copilot/code-review/vscode-review-button@2x.png b/assets/images/help/copilot/code-review/vscode-review-button@2x.png new file mode 100644 index 000000000000..a097aed16a93 Binary files /dev/null and b/assets/images/help/copilot/code-review/vscode-review-button@2x.png differ diff --git a/assets/images/help/copilot/code-review/vscode-review-progress@2x.png b/assets/images/help/copilot/code-review/vscode-review-progress@2x.png new file mode 100644 index 000000000000..331c652761cd Binary files /dev/null and b/assets/images/help/copilot/code-review/vscode-review-progress@2x.png differ diff --git a/assets/images/help/copilot/custom-instructions-vscode.png b/assets/images/help/copilot/custom-instructions-vscode.png new file mode 100644 index 000000000000..8a938f83134d Binary files /dev/null and b/assets/images/help/copilot/custom-instructions-vscode.png differ diff --git a/assets/images/help/copilot/vsc-review-and-comment.png b/assets/images/help/copilot/vsc-review-and-comment.png new file mode 100644 index 000000000000..050d3a4f8654 Binary files /dev/null and b/assets/images/help/copilot/vsc-review-and-comment.png differ diff --git a/assets/images/help/copilot/windows-terminal-dropdown.png b/assets/images/help/copilot/windows-terminal-dropdown.png new file mode 100644 index 000000000000..3367811104f9 Binary files /dev/null and b/assets/images/help/copilot/windows-terminal-dropdown.png differ diff --git a/assets/images/help/copilot/windows-terminal-settings.png b/assets/images/help/copilot/windows-terminal-settings.png new file mode 100644 index 000000000000..5fdc970ced09 Binary files /dev/null and b/assets/images/help/copilot/windows-terminal-settings.png differ diff --git a/assets/images/help/copilot/workspace-all-comments.png b/assets/images/help/copilot/workspace-all-comments.png new file mode 100644 index 000000000000..7f76b6fce7c8 Binary files /dev/null and b/assets/images/help/copilot/workspace-all-comments.png differ diff --git a/assets/images/help/copilot/workspace-applied-dismissed.png b/assets/images/help/copilot/workspace-applied-dismissed.png new file mode 100644 index 000000000000..13d47c8ce233 Binary files /dev/null and b/assets/images/help/copilot/workspace-applied-dismissed.png differ diff --git a/assets/images/help/copilot/workspace-commit-changes.png b/assets/images/help/copilot/workspace-commit-changes.png new file mode 100644 index 000000000000..c37592af878f Binary files /dev/null and b/assets/images/help/copilot/workspace-commit-changes.png differ diff --git a/assets/images/help/copilot/workspace-configure-commands.png b/assets/images/help/copilot/workspace-configure-commands.png new file mode 100644 index 000000000000..498d4ca07c1f Binary files /dev/null and b/assets/images/help/copilot/workspace-configure-commands.png differ diff --git a/assets/images/help/copilot/workspace-copilot-review-suggestion.png b/assets/images/help/copilot/workspace-copilot-review-suggestion.png new file mode 100644 index 000000000000..6edaf118ddd4 Binary files /dev/null and b/assets/images/help/copilot/workspace-copilot-review-suggestion.png differ diff --git a/assets/images/help/copilot/workspace-files-in-pr.png b/assets/images/help/copilot/workspace-files-in-pr.png new file mode 100644 index 000000000000..a1cd5ef97ee9 Binary files /dev/null and b/assets/images/help/copilot/workspace-files-in-pr.png differ diff --git a/assets/images/help/copilot/workspace-next-comment.png b/assets/images/help/copilot/workspace-next-comment.png new file mode 100644 index 000000000000..1ad375929dee Binary files /dev/null and b/assets/images/help/copilot/workspace-next-comment.png differ diff --git a/assets/images/help/copilot/workspace-run-command.png b/assets/images/help/copilot/workspace-run-command.png new file mode 100644 index 000000000000..2b1ba9eb0177 Binary files /dev/null and b/assets/images/help/copilot/workspace-run-command.png differ diff --git a/assets/images/help/copilot/workspace-stop-command.png b/assets/images/help/copilot/workspace-stop-command.png new file mode 100644 index 000000000000..08a87417e675 Binary files /dev/null and b/assets/images/help/copilot/workspace-stop-command.png differ diff --git a/assets/images/help/desktop/appearance-tab-themes.png b/assets/images/help/desktop/appearance-tab-themes.png index 59a131b47b94..9736523c3401 100644 Binary files a/assets/images/help/desktop/appearance-tab-themes.png and b/assets/images/help/desktop/appearance-tab-themes.png differ diff --git a/assets/images/help/desktop/mac-choose-settings.png b/assets/images/help/desktop/mac-choose-settings.png new file mode 100644 index 000000000000..49e9e83d254f Binary files /dev/null and b/assets/images/help/desktop/mac-choose-settings.png differ diff --git a/assets/images/help/desktop/mac-select-git-pane.png b/assets/images/help/desktop/mac-select-git-pane.png index d22bb5ad7eee..63217adaaaa6 100644 Binary files a/assets/images/help/desktop/mac-select-git-pane.png and b/assets/images/help/desktop/mac-select-git-pane.png differ diff --git a/assets/images/help/desktop/mac-select-integrations-pane.png b/assets/images/help/desktop/mac-select-integrations-pane.png index 596fd8949d4e..35a5d3c25770 100644 Binary files a/assets/images/help/desktop/mac-select-integrations-pane.png and b/assets/images/help/desktop/mac-select-integrations-pane.png differ diff --git a/assets/images/help/desktop/sign-in-github.png b/assets/images/help/desktop/sign-in-github.png index b614ad6b3df1..6ff8ed0b891e 100644 Binary files a/assets/images/help/desktop/sign-in-github.png and b/assets/images/help/desktop/sign-in-github.png differ diff --git a/assets/images/help/desktop/windows-sign-in-github.png b/assets/images/help/desktop/windows-sign-in-github.png index 8435556e75e1..574b731cce33 100644 Binary files a/assets/images/help/desktop/windows-sign-in-github.png and b/assets/images/help/desktop/windows-sign-in-github.png differ diff --git a/assets/images/help/pull_requests/menu-on-pull-request-file.png b/assets/images/help/pull_requests/menu-on-pull-request-file.png new file mode 100644 index 000000000000..a9bce0fa5fbc Binary files /dev/null and b/assets/images/help/pull_requests/menu-on-pull-request-file.png differ diff --git a/assets/images/help/security/builder-sec-campaign.png b/assets/images/help/security/builder-sec-campaign.png new file mode 100644 index 000000000000..ec4224375283 Binary files /dev/null and b/assets/images/help/security/builder-sec-campaign.png differ diff --git a/assets/images/help/security/codeql-for-vs-code-set-ghe-uri.png b/assets/images/help/security/codeql-for-vs-code-set-ghe-uri.png new file mode 100644 index 000000000000..e436e9074bc2 Binary files /dev/null and b/assets/images/help/security/codeql-for-vs-code-set-ghe-uri.png differ diff --git a/assets/images/help/security/driver-sec-campaign-view.png b/assets/images/help/security/driver-sec-campaign-view.png new file mode 100644 index 000000000000..eb96cdeb2df4 Binary files /dev/null and b/assets/images/help/security/driver-sec-campaign-view.png differ diff --git a/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md b/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md index b3c592f9d428..9b9b44bed21c 100644 --- a/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md +++ b/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md @@ -127,9 +127,9 @@ Email notifications from {% data variables.product.prodname_dotcom %} contain he | Header | Information | | --- | --- | -| `From` address | This address will always be {% ifversion fpt or ghec %}`notifications@github.com`{% else %}'the no-reply email address configured by your site administrator'{% endif %}. | +| `From` address | This address will always be {% ifversion fpt %}`notifications@github.com`{% elsif ghec %}`notifications@github.com` or `notifications@SUBDOMAIN.ghe.com`{% else %}the no-reply email address configured by your site administrator{% endif %}. | | `To` field | This field connects directly to the thread. If you reply to the email, you'll add a new comment to the conversation. | -| `Cc` address | {% data variables.product.product_name %} will `Cc` you if you're subscribed to a conversation. The second `Cc` email address matches the notification reason. The suffix for these notification reasons is {% ifversion fpt or ghec %}`@noreply.github.com`{% else %}based on the no-reply email address configured by your site administrator{% endif %}. The possible notification reasons are:
Avoid using magic numbers
+
+**Description:** Don't use magic numbers in code. Numbers should be defined as constants or variables with meaningful names.
+
+**Path patterns:** `**/*.py`
+
+### Example 2: Don't use `SELECT *` in SQL queries
+
+**Title:** Don't use `SELECT \*` in SQL queries
+
+**Description:** Don't use `SELECT \*` in SQL queries. Always specify the columns you want to select. `COUNT(\*)` is allowed.
+
+**Path patterns:** None (applies to all file types, as SQL queries may be embedded in code).
+
+### Example 3: Use `fetch` for HTTP requests
+
+**Title:** Use `fetch` for HTTP requests
+
+**Description:** Use `fetch` for HTTP requests, not `axios` or `superagent` or other libraries.
+
+**Path patterns:** `**/*.ts`, `**/*.js`, `**/*.jsx`, `**/*.tsx`
+
+### Example 4: Always tag metrics with the current environment
+
+**Title:** Always tag metrics with the current environment
+
+**Description:** Always include a `env` tag with the current environment when emitting metrics, for example, `env:prod` or `env:dev`.
+
+**Path patterns:** `*/*.go`, `*/*.java`
diff --git a/content/copilot/using-github-copilot/code-review/index.md b/content/copilot/using-github-copilot/code-review/index.md
new file mode 100644
index 000000000000..791f22fa08df
--- /dev/null
+++ b/content/copilot/using-github-copilot/code-review/index.md
@@ -0,0 +1,12 @@
+---
+title: Code review
+shortTitle: Code review
+intro: "Learn how to request a code review from {% data variables.product.prodname_copilot %}."
+versions:
+ feature: copilot
+topics:
+ - Copilot
+children:
+ - /using-copilot-code-review
+ - /configuring-coding-guidelines
+---
diff --git a/content/copilot/using-github-copilot/code-review/using-copilot-code-review.md b/content/copilot/using-github-copilot/code-review/using-copilot-code-review.md
new file mode 100644
index 000000000000..175575191f7d
--- /dev/null
+++ b/content/copilot/using-github-copilot/code-review/using-copilot-code-review.md
@@ -0,0 +1,188 @@
+---
+title: Using GitHub Copilot code review
+shortTitle: Using code review
+intro: "Learn how to request a code review from {% data variables.product.prodname_copilot %}."
+allowTitleToDifferFromFilename: true
+versions:
+ feature: copilot
+topics:
+ - Copilot
+---
+
+> [!NOTE]
+>
+> * {% data variables.copilot.copilot_code-review %} is in {% data variables.release-phases.public_preview %} and subject to change. Some functionality is available to all {% data variables.product.prodname_copilot_short %} subscribers, but other functionality is only available to a limited number of users. To join the waitlist, see "[Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist)."
+> * The "[AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms)" apply to your use of this product.
+
+## About {% data variables.copilot.copilot_code-review_short %}
+
+{% data variables.product.prodname_copilot %} can review your code and provide feedback. Where possible, {% data variables.product.prodname_copilot_short %}'s feedback includes suggested changes which you can apply with a couple of clicks.
+
+{% data variables.copilot.copilot_code-review_short %} supports two types of review:
+
+* **Review selection**: Highlight code and ask for an initial review _({% data variables.product.prodname_vscode %} only)_
+* **Review changes**: Request a deeper review of all your changes _({% data variables.product.github %} website and {% data variables.product.prodname_vscode %})_
+
+The current functionality and availability of the two types of review is summarized in the following table:
+
+{% rowheaders %}
+
+| Feature | Review selection | Review changes |
+| --------- | ----------------- | --------------- |
+| Description | Initial review of a highlighted section of code with feedback and suggestions | Deeper review of all changes |
+| Language support | All | C#, Go, Java, JavaScript, Markdown, Python, Ruby, TypeScript |
+| Custom coding guidelines support | No | Yes, see [Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines](#customizing-copilots-reviews-with-coding-guidelines) |
+| Environment | {% data variables.product.prodname_vscode %} | {% data variables.product.prodname_vscode %} and the {% data variables.product.github %} website |
+| Availability | {% data variables.release-phases.public_preview_caps %}, available to all {% data variables.product.prodname_copilot_short %} subscribers | {% data variables.release-phases.public_preview_caps %} with waitlist, see "[Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist)" |
+
+{% endrowheaders %}
+
+> [!WARNING] {% data variables.product.prodname_copilot_short %} isn't guaranteed to spot all problems or issues in a pull request, and sometimes it will make mistakes. Always validate {% data variables.product.prodname_copilot_short %}'s feedback carefully, and supplement {% data variables.product.prodname_copilot_short %}'s feedback with a human review.
+
+For more information, see "[AUTOTITLE](/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review)."
+
+## Requesting a review from {% data variables.product.prodname_copilot_short %}
+
+{% webui %}
+
+These instructions explain how to use {% data variables.copilot.copilot_code-review_short %} in the {% data variables.product.github %} website. To see instructions for {% data variables.product.prodname_vscode %}, use the "{% data variables.product.prodname_vscode %}" tool switcher at the top of the page.
+
+### Requesting a pull request review from {% data variables.product.prodname_copilot_short %}
+
+> [!NOTE] Requesting a pull request review from {% data variables.product.prodname_copilot_short %} is currently only available to a limited number of {% data variables.product.prodname_copilot_short %} subscribers. To join the waitlist, see "[Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist)."
+
+1. On {% data variables.product.prodname_dotcom_the_website %}, create a pull request or navigate to an existing pull request.
+1. Open the **Reviewers** menu, then select **{% data variables.product.prodname_copilot_short %}**.
+
+ ![Screenshot of selecting '{% data variables.product.prodname_copilot_short %}' from the 'Reviewers' menu.](/assets/images/help/copilot/code-review/request-review@2x.png)
+
+1. Wait for {% data variables.product.prodname_copilot_short %} to review your pull request. This usually takes less than 30 seconds.
+
+1. Scroll down and read through {% data variables.product.prodname_copilot_short %}'s comments.
+
+ ![Screenshot of a code review left by {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/review-comment@2x.png)
+
+ {% data variables.product.prodname_copilot_short %} always leaves a "Comment" review, not an "Approve" review or a "Request changes" review. This means that {% data variables.product.prodname_copilot_short %}'s reviews do not count toward required reviews for the pull request, and {% data variables.product.prodname_copilot_short %}'s reviews will not block merging changes. For more details, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/approving-a-pull-request-with-required-reviews)."
+
+1. {% data variables.product.prodname_copilot_short %}'s review comments behave like review comments from humans. You can add reactions to them, comment on them, resolve them and hide them.
+
+ Any comments you add to {% data variables.product.prodname_copilot_short %}'s review comments will be visible to humans, but they won't be visible to {% data variables.product.prodname_copilot_short %}, and {% data variables.product.prodname_copilot_short %} won't reply.
+
+## Working with suggested changes provided by {% data variables.product.prodname_copilot_short %}
+
+Where possible, {% data variables.product.prodname_copilot_short %}'s feedback includes suggested changes which you can apply with a couple of clicks.
+
+If you're happy with the changes, you can accept a single suggestion from {% data variables.product.prodname_copilot_short %} and commit it, or accept a group of suggestions together in a single commit. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)."
+
+If you want to validate {% data variables.product.prodname_copilot_short %}'s suggested changes (for example by running automated tests or your linter), or if you want to make modifications before committing the suggested changes, click the **Open in Workspace** button. For more information, see "[AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)."
+
+## Providing feedback on {% data variables.product.prodname_copilot_short %}'s reviews
+
+You can provide feedback on {% data variables.product.prodname_copilot_short %}'s comments directly within each comment. We use this information to improve the product and the quality of {% data variables.product.prodname_copilot_short %}'s suggestions.
+
+1. On a pull request review comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button.
+
+ ![Screenshot showing a {% data variables.copilot.copilot_code-review_short %} comment with the thumbs up and thumbs down buttons.](/assets/images/help/copilot/code-review/feedback-controls@2x.png)
+
+1. If you click the thumbs down button, you're asked to provide additional information. You can, optionally, pick the reason for your negative feedback and leave a comment before clicking **Submit feedback**.
+
+ ![Screenshot of the form for providing additional information when you give negative feedback on a comment from {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/feedback-modal@2x.png)
+
+## Requesting a re-review from {% data variables.product.prodname_copilot_short %}
+
+When you push changes to a pull request that {% data variables.product.prodname_copilot_short %} has reviewed, it won't automatically re-review your changes.
+
+To request a re-review from {% data variables.product.prodname_copilot_short %}, click the {% octicon "sync" aria-label="Re-request review" %} button next to {% data variables.product.prodname_copilot_short %}'s name in the **Reviewers** menu. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review)."
+
+> [!NOTE] When re-reviewing a pull request, {% data variables.product.prodname_copilot_short %} may repeat the same comments again, even if they have been dismissed with the "Resolve conversation" button or downvoted with the thumbs down (:-1:) button.
+
+## Enabling automatic reviews from {% data variables.product.prodname_copilot_short %}
+
+By default, you will have to manually request a review from {% data variables.product.prodname_copilot_short %} on each pull request.
+
+You can enable automatic reviews from {% data variables.product.prodname_copilot_short %} on all pull requests using rulesets configured at the repository level or organization level. For more information, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)."
+
+To turn this on, enable the **Request pull request review from {% data variables.product.prodname_copilot_short %}** branch rule, nested under **Require a pull request before merging**.
+
+![Screenshot of the "Request pull request review from {% data variables.product.prodname_copilot_short %}" branch rule.](/assets/images/help/copilot/code-review/request-review-branch-rule@2x.png)
+
+## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
+
+{% data reusables.copilot.code-review.custom-coding-guidelines %}
+
+![Screenshot of a comment produced from a custom coding guideline.](/assets/images/help/copilot/code-review/coding-guidelines-comment@2x.png)
+
+{% endwebui %}
+
+{% vscode %}
+
+These instructions explain how to use {% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_vscode %}. To see instructions for the {% data variables.product.github %} website, use the "Web browser" tool switcher at the top of the page.
+
+> [!NOTE] {% data variables.copilot.copilot_code-review_short %} is only available in {% data variables.product.prodname_vscode %} with version 0.22 or later of the {% data variables.product.prodname_copilot_chat %} extension.
+
+### Reviewing a selection of code
+
+You can request an initial review of a highlighted selection of code in {% data variables.product.prodname_vscode %}.
+
+1. In {% data variables.product.prodname_vscode %}, select the code you want to review.
+1. Open the {% data variables.product.prodname_vscode_command_palette_shortname %}
+ * For Mac:
+ * Use: Shift+Command+P
+ * For Windows or Linux:
+ * Use Ctrl+Shift+P
+1. In the command palette, search for and select **{% data variables.product.prodname_copilot %}: Review and Comment**.
+
+ ![Screenshot of the command palette in {% data variables.product.prodname_vscode %} with the **{% data variables.product.prodname_copilot %}: Review and Comment** command selected.](/assets/images/help/copilot/vsc-review-and-comment.png)
+
+1. Wait for {% data variables.product.prodname_copilot_short %} to review your changes. This usually takes less than 30 seconds.
+
+ ![Screenshot of the progress indicator when {% data variables.product.prodname_copilot_short %} is performing a review in {% data variables.product.prodname_vscode %}.](/assets/images/help/copilot/code-review/vscode-review-progress@2x.png)
+
+1. If {% data variables.product.prodname_copilot_short %} has any comments, they will be shown inline in your file, and in the **Problems** tab.
+
+ ![Screenshot of a comment from {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %}.](/assets/images/help/copilot/code-review/vscode-comment@2x.png)
+
+### Reviewing changes
+
+> [!NOTE] Reviewing changes is currently only available to a limited number of {% data variables.product.prodname_copilot_short %} subscribers. To join the waitlist, see "[Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist)."
+
+You can request a review for your staged or unstaged changes in {% data variables.product.prodname_vscode %}.
+
+1. In {% data variables.product.prodname_vscode_shortname %}, switch to the **Source Control** tab.
+1. To request a review on your unstaged changes, hover over **Changes** in the sidebar, and then click the **{% data variables.copilot.copilot_code-review_short %} - Changes** button.
+
+ ![Screenshot of the "{% data variables.copilot.copilot_code-review_short %} - Changes" button in {% data variables.product.prodname_vscode %}. The code review button is outlined in dark orange.](/assets/images/help/copilot/code-review/vscode-review-button@2x.png)
+
+1. To request a review on your staged changes, hover over **Staged Changes** in the sidebar, and then click the **{% data variables.copilot.copilot_code-review_short %} - Staged Changes** button.
+
+1. Wait for {% data variables.product.prodname_copilot_short %} to review your changes. This usually takes less than 30 seconds.
+
+ ![Screenshot of the progress indicator when {% data variables.product.prodname_copilot_short %} is performing a review in {% data variables.product.prodname_vscode %}.](/assets/images/help/copilot/code-review/vscode-review-progress@2x.png)
+
+1. If {% data variables.product.prodname_copilot_short %} has any comments, they will be shown inline in your file(s), and in the **Problems** tab.
+
+ ![Screenshot of a comment from {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %}.](/assets/images/help/copilot/code-review/vscode-comment@2x.png)
+
+## Working with suggested changes provided by {% data variables.product.prodname_copilot_short %}
+
+Where possible, {% data variables.product.prodname_copilot_short %}'s feedback includes suggested changes which you can apply with a single click.
+
+![Screenshot of a comment from {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %} with a suggested change.](/assets/images/help/copilot/code-review/vscode-comment@2x.png)
+
+If you're happy with the change, you can accept a suggestion from {% data variables.product.prodname_copilot_short %} by clicking the **Apply and Go To Next** button. Any changes you apply will not be automatically committed.
+
+If you don't want to apply {% data variables.product.prodname_copilot_short %}'s suggested change, click the **Discard and Go to Next** button.
+
+## Providing feedback on {% data variables.product.prodname_copilot_short %}'s reviews
+
+You can provide feedback on {% data variables.product.prodname_copilot_short %}'s comments directly within each comment. We use this information to improve the product and the quality of {% data variables.product.prodname_copilot_short %}'s suggestions.
+
+To provide feedback, hover over the comment and click the thumbs up or thumbs down button.
+
+![Screenshot of a comment from {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %} with feedback buttons displayed. The buttons are outlined in dark orange.](/assets/images/help/copilot/code-review/vscode-comment-feedback@2x.png)
+
+## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
+
+{% data reusables.copilot.code-review.custom-coding-guidelines %}
+
+{% endvscode %}
diff --git a/content/copilot/using-github-copilot/example-use-cases/index.md b/content/copilot/using-github-copilot/example-use-cases/index.md
index ad99c8ded568..364e2b47a5e2 100644
--- a/content/copilot/using-github-copilot/example-use-cases/index.md
+++ b/content/copilot/using-github-copilot/example-use-cases/index.md
@@ -9,4 +9,5 @@ topics:
children:
- /example-prompts-for-copilot-chat
- /refactoring-code-with-github-copilot
+ - /writing-tests-with-github-copilot
---
diff --git a/content/copilot/using-github-copilot/example-use-cases/writing-tests-with-github-copilot.md b/content/copilot/using-github-copilot/example-use-cases/writing-tests-with-github-copilot.md
new file mode 100644
index 000000000000..0765862adf71
--- /dev/null
+++ b/content/copilot/using-github-copilot/example-use-cases/writing-tests-with-github-copilot.md
@@ -0,0 +1,314 @@
+---
+title: Writing tests with GitHub Copilot
+intro: 'Use {% data variables.product.prodname_copilot_short %} to generate unit and integration tests, and help improve code quality.'
+topics:
+ - Copilot
+versions:
+ feature: copilot
+shortTitle: Write tests
+---
+
+## Introduction
+
+{% data variables.product.prodname_copilot %} can assist you in developing tests quickly and improving productivity. In this article, we’ll demonstrate how you can use {% data variables.product.prodname_copilot_short %} to write both unit and integration tests. While {% data variables.product.prodname_copilot_short %} performs well when generating tests for basic functions, complex scenarios require more detailed prompts and strategies. This article will walk through practical examples of using {% data variables.product.prodname_copilot_short %} to break down tasks and verify code correctness.
+
+## Prerequisites
+
+Before getting started you must have the following:
+* A [{% data variables.product.prodname_copilot %} subscription plan](/copilot/about-github-copilot/subscription-plans-for-github-copilot).
+* {% data variables.product.prodname_vs %}, {% data variables.product.prodname_vscode %}, or any JetBrains IDE.
+* The [{% data variables.product.prodname_copilot %} extension](/copilot/managing-copilot/configure-personal-settings/installing-the-github-copilot-extension-in-your-environment) installed in your IDE.
+
+## Writing unit tests with {% data variables.product.prodname_copilot_chat_short %}
+
+In this section, we’ll explore how to use {% data variables.product.prodname_copilot_chat %} to generate unit tests for a Python class. This example demonstrates how you can use {% data variables.product.prodname_copilot_short %} to create unit tests for a class like `BankAccount`. We will show you how to prompt {% data variables.product.prodname_copilot_short %} to generate tests, execute them, and verify the results.
+
+### Example class: `BankAccount`
+
+Let’s start with a class `BankAccount` that contains methods for depositing, withdrawing, and getting the balance of an account. Create a new file `bank_account.py` in a {% data variables.product.github %} repository and add the following `BankAccount` class in Python.
+
+```python
+class BankAccount:
+ def __init__(self, initial_balance=0):
+ if initial_balance < 0:
+ raise ValueError("Initial balance cannot be negative.")
+ self.balance = initial_balance
+
+ def deposit(self, amount):
+ if amount <= 0:
+ raise ValueError("Deposit amount must be positive.")
+ self.balance += amount
+
+ def withdraw(self, amount):
+ if amount <= 0:
+ raise ValueError("Withdrawal amount must be positive.")
+ if amount > self.balance:
+ raise ValueError("Cannot withdraw more than the current balance.")
+ self.balance -= amount
+
+ def get_balance(self):
+ return self.balance
+```
+
+### Generating unit tests with {% data variables.product.prodname_copilot_chat_short %}
+
+You can prompt Copilot with a request to write tests that cover a range of scenarios. Be specific with your test requirements to get the best results. The following is an example prompt you can use to generate unit tests for the `BankAccount` class.
+
+**Prompt:** _Develop a comprehensive suite of unit tests for the BankAccount() function in Python. Write multiple test methods that cover a wide range of scenarios, including edge cases, exception handling, and data validation._
+
+This prompt does a few important things:
+* **Scope**: It explicitly asks for a comprehensive suite of unit tests, so that {% data variables.product.prodname_copilot_short %} generates more than just basic tests, covering a variety of potential use cases.
+* **Scenarios**: The prompt specifies that the tests should include:
+ * **Edge cases**: Tests for boundary conditions (e.g., negative values for deposits or withdrawals, withdrawing more than the available balance).
+ * **Exception handling**: Tests for errors that should be raised when certain invalid actions occur (e.g., withdrawing more than the available balance, depositing negative amounts).
+ * **Data validation**: Ensures that inputs are correctly validated and handled by the methods.
+
+{% data variables.product.prodname_copilot_short %} will give you a response like the following.
+
+```python
+import unittest
+from bank_account import BankAccount
+
+class TestBankAccount(unittest.TestCase):
+ def setUp(self):
+ self.account = BankAccount()
+
+ def test_initial_balance(self):
+ self.assertEqual(self.account.get_balance(), 0)
+
+ def test_deposit_positive_amount(self):
+ self.account.deposit(100)
+ self.assertEqual(self.account.get_balance(), 100)
+
+ def test_withdraw_within_balance(self):
+ self.account.deposit(100)
+ self.account.withdraw(50)
+ self.assertEqual(self.account.get_balance(), 50)
+
+ def test_deposit_negative_amount_raises_error(self):
+ with self.assertRaises(ValueError):
+ self.account.deposit(-100)
+
+ def test_withdraw_negative_amount_raises_error(self):
+ with self.assertRaises(ValueError):
+ self.account.withdraw(-50)
+
+ def test_withdraw_more_than_balance_raises_error(self):
+ self.account.deposit(100)
+ with self.assertRaises(ValueError):
+ self.account.withdraw(200)
+
+ def test_initial_balance_negative_raises_error(self):
+ with self.assertRaises(ValueError):
+ BankAccount(-100)
+
+if __name__ == '__main__':
+ unittest.main()
+```
+
+### Running the tests cases
+
+The test suite generated by {% data variables.product.prodname_copilot_short %} includes a test case for each scenario specified in the prompt. Each function in the `BankAccount` class is tested for a range of conditions, including valid operations like deposits and withdrawals, as well as edge cases such as negative amounts and attempts to withdraw more than the available balance.
+
+Once {% data variables.product.prodname_copilot_short %} has generated the test suite to your satisfaction, add the code to a new file `test_bank_account.py`. You can ask it how to run the tests.
+
+**Prompt:** _"How do I run these unit tests in Python using the unittest framework?"_
+
+{% data variables.product.prodname_copilot_short %} will give you the following bash command.
+
+```bash
+python -m unittest test_bank_account.py
+```
+
+After running the tests, you will see the output in your terminal or IDE. If all tests pass, you can be confident that your `BankAccount` class is working as expected.
+
+#### Slash command
+
+Additionally, you can prompt {% data variables.product.prodname_copilot_short %} to write a full suite of unit tests with the `/tests` slash command. Ensure that you have the file open on the current tab of your IDE and {% data variables.product.prodname_copilot_short %} will generate unit tests for that file. The tests that {% data variables.product.prodname_copilot_short %} generates may not cover all scenarios, so you should always review the generated code and add any additional tests that may be necessary.
+
+> [!TIP] If you ask {% data variables.product.prodname_copilot_short %} to write tests for a code file that is not already covered by unit tests, you can provide {% data variables.product.prodname_copilot_short %} with useful context by opening one or more existing test files in adjacent tabs in your editor. {% data variables.product.prodname_copilot_short %} will be able to see the testing framework you use and will be more likely to write a test that is consistent with your existing tests.
+
+{% data variables.product.prodname_copilot_short %} will generate a unit test suite such as the following.
+
+```python
+import unittest
+from bank_account import BankAccount
+
+class TestBankAccount(unittest.TestCase):
+ def setUp(self):
+ self.account = BankAccount()
+
+ def test_initial_balance(self):
+ self.assertEqual(self.account.get_balance(), 0)
+```
+
+## Writing integration tests with {% data variables.product.prodname_copilot_short %}
+
+Integration tests are essential for ensuring that the various components of your system work correctly when combined. In this section, we’ll extend our `BankAccount` class to include interactions with an external service `NotificationSystem` and use mocks to test the system’s behavior without needing real connections. The goal of the integration tests is to verify the interaction between the `BankAccount` class and the `NotificationSystem` services, ensuring that they work together correctly.
+
+### Example class: `BankAccount` with notification services
+
+Let's update the `BankAccount` class to include interactions with an external service such as a `NotificationSystem` that sends notifications to users. `NotificationSystem` represents the integration that would need to be tested.
+
+Update the `BankAccount` class in the `bank_account.py` file with the following code snippet.
+
+```python
+class BankAccount:
+ def __init__(self, initial_balance=0, notification_system=None):
+ if initial_balance < 0:
+ raise ValueError("Initial balance cannot be negative.")
+ self.balance = initial_balance
+ self.notification_system = notification_system
+
+ def deposit(self, amount):
+ if amount <= 0:
+ raise ValueError("Deposit amount must be positive.")
+ self.balance += amount
+ if self.notification_system:
+ self.notification_system.notify(f"Deposited {amount}, new balance: {self.balance}")
+
+ def withdraw(self, amount):
+ if amount <= 0:
+ raise ValueError("Withdrawal amount must be positive.")
+ if amount > self.balance:
+ raise ValueError("Cannot withdraw more than the current balance.")
+ self.balance -= amount
+
+ if self.notification_system:
+ self.notification_system.notify(f"Withdrew {amount}, new balance: {self.balance}")
+
+ def get_balance(self):
+ return self.balance
+```
+
+Here we'll break down our request for {% data variables.product.prodname_copilot_short %} to write integration tests for the `BankAccount` class into smaller, more manageable pieces. This will help {% data variables.product.prodname_copilot_short %} generate more accurate and relevant tests.
+
+**Prompt:** _"Write integration tests for the `deposit` function in the `BankAccount` class. Use mocks to simulate the `NotificationSystem` and verify that it is called correctly after a deposit."_
+
+This prompt does a few important things:
+* **Scope**: It specifies integration tests, focusing on the interaction between the `deposit` function and the `NotificationSystem`, rather than just unit tests.
+* **Mocks**: It explicitly asks for the use of mocks to simulate the `NotificationSystem`, ensuring that the interaction with external systems is tested without relying on their actual implementation.
+* **Verification**: The prompt emphasizes verifying that the `NotificationSystem` is called correctly after a deposit, ensuring that the integration between the components works as expected.
+* **Specificity**: The prompt clearly states the method (`deposit`) and the class (`BankAccount`) to be tested.
+
+> [!TIP] If {% data variables.product.prodname_copilot_short %} is producing invalid tests, provide examples of inputs and outputs for the function you want to test. This will help {% data variables.product.prodname_copilot_short %} evaluate the expected behavior of the function.
+
+{% data variables.product.prodname_copilot_short %} will generate a test suite like the following.
+
+```python
+import unittest
+from unittest.mock import Mock
+from bank_account import BankAccount
+
+class TestBankAccountIntegration(unittest.TestCase):
+ def setUp(self):
+ self.notification_system = Mock()
+
+ def test_deposit_with_notification(self):
+ account = BankAccount(initial_balance=100, notification_system=self.notification_system)
+ account.deposit(50)
+ self.assertEqual(account.get_balance(), 150)
+ self.notification_system.notify.assert_called_once_with("Deposited 50, new balance: 150")
+
+if __name__ == '__main__':
+ unittest.main()
+```
+
+Add the generated code to a new file `test_bank_account_integration.py`.
+
+### Improving on the test cases
+
+The prompt above generated a single test case that verifies the `NotificationSystem` is called when a valid deposit is made. However, it doesn't cover cases where an error is raised during the deposit. In those scenarios, the `NotificationSystem` should not be called. We need to add a test case that handles invalid deposits and ensure the notification system is not triggered.
+
+**Prompt:** _"Add a test case for invalid deposit amounts to verify the function raises the correct exceptions and that the `NotificationService` is not called."_
+
+{% data variables.product.prodname_copilot_short %} will generate a test case such as the following.
+
+```python
+ def test_deposit_negative_amount_raises_error(self):
+ account = BankAccount(initial_balance=100, notification_system=self.notification_system)
+ with self.assertRaises(ValueError):
+ account.deposit(0)
+ self.notification_system.notify.assert_not_called()
+```
+
+### Asking about areas of improvement
+
+Now that we've written test cases to validate the integration functionality for deposits, this is a great opportunity to search for improvements within the test suite. While the current tests are functional, we can prompt {% data variables.product.prodname_copilot_short %} to evalulate code coverage and suggest areas of improvement.
+
+**Prompt:** _"What additional tests should be included to ensure full coverage for the integration between the `BankAccount` class and the `NotificationSystem`?"_
+
+Prompting Copilot with this question can help you identify missing test cases that may have been overlooked.
+In this situation, while we tested valid and invalid deposits, we haven't yet covered the withdrawal functionality.
+
+{% data variables.product.prodname_copilot_short %} will generate an updated test suite such as the following.
+
+{% data variables.product.graphql_url %}-The endpoint remains constant no matter what operation you perform. +{% ifversion ghec %} + +If you access {% data variables.product.github %} at a different domain, such as `{% data variables.enterprise.data_residency_example_domain %}`, the endpoint will reflect that domain. For example: `https://api.octocorp.ghe.com/graphql`. + +{% endif %} ## Communicating with GraphQL diff --git a/content/graphql/guides/using-the-explorer.md b/content/graphql/guides/using-the-explorer.md index 63f28e54b090..df5ff864d42e 100644 --- a/content/graphql/guides/using-the-explorer.md +++ b/content/graphql/guides/using-the-explorer.md @@ -87,7 +87,7 @@ There are many open source GraphQL client IDEs. For example, you can use Altair 1. In the "Header key" field, enter `Authorization`. 1. In the "Header value" field, enter `Bearer TOKEN`, replacing `TOKEN` with your token from the first step. 1. Click **Save** in the bottom right corner of the window to save your authorization header. -1. In the "GraphQL Endpoint" field, enter `{% data variables.product.graphql_url %}`. +1. In the "GraphQL Endpoint" field, enter your GraphQL URL, such as `{% data variables.product.graphql_url %}`. 1. To load the {% data variables.product.company_short %} GraphQL schema, download the [public schema](/graphql/overview/public-schema). 1. In Altair, click on **Docs** on the top right, then the three dots and **Load Schema...** 1. Select the file public schema that you downloaded in an earlier step. diff --git a/content/index.md b/content/index.md index 855610b01ec8..1e12a2121f46 100644 --- a/content/index.md +++ b/content/index.md @@ -106,7 +106,7 @@ childGroups: - copilot - copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot - copilot/using-github-copilot/prompt-engineering-for-github-copilot - - copilot/using-github-copilot/asking-github-copilot-questions-in-githubcom + - copilot/using-github-copilot/asking-github-copilot-questions-in-github - copilot/using-github-copilot/example-use-cases/refactoring-code-with-github-copilot - name: CI/CD and DevOps octicon: GearIcon diff --git a/content/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests.md b/content/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests.md index 4d695dd901a3..6927c66b1e16 100644 --- a/content/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests.md +++ b/content/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests.md @@ -97,7 +97,7 @@ If you choose not to use `AND` and `OR` operators, {% data variables.product.git ### Using parentheses for more complicated filters -You can also use parentheses to nest filters and group qualifiers. In the example below, the results will contain issues that are either assigned to @octocat with the "bug" issue type or assigned to @hubot with the "Enchancement" issue type. +You can also use parentheses to nest filters and group qualifiers. In the example below, the results will contain issues that are either assigned to @octocat with the "bug" issue type or assigned to @hubot with the "Enhancement" issue type. ```text (type:"Bug" AND assignee:octocat) OR (type:"Enhancement" AND assignee:hubot) diff --git a/content/migrations/importing-source-code/using-github-importer/about-github-importer.md b/content/migrations/importing-source-code/using-github-importer/about-github-importer.md index 8732a88b7d8e..82511b62e1e5 100644 --- a/content/migrations/importing-source-code/using-github-importer/about-github-importer.md +++ b/content/migrations/importing-source-code/using-github-importer/about-github-importer.md @@ -1,6 +1,6 @@ --- title: About GitHub Importer -intro: "If your source code is stored on another Git-based hosting service, you can move the code to {% data variables.product.prodname_dotcom %} using {% data variables.product.prodname_importer %}." +intro: "If your source code is stored on another Git-based hosting service, you can move the code to {% data variables.product.prodname_dotcom_the_website %} using {% data variables.product.prodname_importer %}." redirect_from: - /articles/about-github-importer - /github/importing-your-projects-to-github/about-github-importer @@ -18,13 +18,14 @@ versions: ## About {% data variables.product.prodname_importer %} -{% data variables.product.prodname_importer %} is a tool that quickly imports Git repositories from other hosting services to {% data variables.product.prodname_dotcom %}. +{% data variables.product.prodname_importer %} is a tool that quickly imports Git repositories from other hosting services to {% data variables.product.prodname_dotcom_the_website %}. To get started with {% data variables.product.prodname_importer %}, see "[AUTOTITLE](/migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer#importing-a-repository-with-github-importer)." ## Capabilities and limitations of {% data variables.product.prodname_importer %} * {% data variables.product.prodname_importer %} imports the source code and commit history of a repository. It does not import other associated data from the hosting service, such as issues and pull requests. +* {% data variables.product.prodname_importer %} is only available on {% data variables.product.prodname_dotcom_the_website %}. * During an import, you can authenticate with your remote repository. The repository must be accessible from the public internet. If the repository is hosted on a private network, {% data variables.product.prodname_importer %} won't be able to access it. * {% data variables.product.prodname_importer %} does not support repositories that use version control systems other than Git, such as Mercurial, Subversion, or Team Foundation Version Control (TFVC). For more information about alternatives to {% data variables.product.prodname_importer %}, see "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line)." * Repositories and individual files on {% data variables.product.prodname_dotcom %} are subject to size limits. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-large-files/about-large-files-on-github)." diff --git a/content/migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer.md b/content/migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer.md index 793e2055acc1..4c863afc84e8 100644 --- a/content/migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer.md +++ b/content/migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer.md @@ -23,7 +23,7 @@ shortTitle: Import a repository When you import a repository using the {% data variables.product.prodname_importer %}, a new repository will be created. If you already have an existing repository you want to use, you can instead add your local repository to {% data variables.product.prodname_dotcom %} using Git. For more information, see "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#importing-a-git-repository-with-the-command-line)." -1. In the upper-right corner of any page, click {% octicon "plus" aria-label="Create new..." %}, and then click **Import repository**. +1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom_the_website %}, click {% octicon "plus" aria-label="Create new..." %}, and then click **Import repository**. ![Screenshot of the top-right corner of any page on {% data variables.product.prodname_dotcom %}. A plus icon is highlighted with an orange outline.](/assets/images/help/importer/import-repository.png) diff --git a/content/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line.md b/content/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line.md index 54bba7e69a23..bc84740779e1 100644 --- a/content/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line.md +++ b/content/migrations/importing-source-code/using-the-command-line-to-import-source-code/about-source-code-imports-using-the-command-line.md @@ -12,7 +12,7 @@ shortTitle: About source code imports {% ifversion fpt or ghec %} -If you want to import a Git repository that is stored on a code hosting service that is publicly available on the internet, we recommend using {% data variables.product.prodname_importer %}. For more information, see "[AUTOTITLE](/migrations/importing-source-code/using-github-importer)." +If you want to import a Git repository to {% data variables.product.prodname_dotcom_the_website %}, and the repository is stored on a code hosting service that is publicly available on the internet, we recommend using {% data variables.product.prodname_importer %}. For more information, see "[AUTOTITLE](/migrations/importing-source-code/using-github-importer)." If your source code is not tracked by Git or is not publicly available, you can use the command line instead. diff --git a/content/migrations/overview/migration-paths-to-github.md b/content/migrations/overview/migration-paths-to-github.md index ac451be32da1..2aba90d93ce4 100644 --- a/content/migrations/overview/migration-paths-to-github.md +++ b/content/migrations/overview/migration-paths-to-github.md @@ -36,6 +36,7 @@ You can review the scope and tooling for your migration to {% data variables.pro * [Any Team Foundation Version Control (TFVC) repository to {% data variables.product.prodname_dotcom_the_website %}](#any-team-foundation-version-control-tfvc-repository-to-githubcom) * [Any Perforce repository to {% data variables.product.prodname_dotcom_the_website %}](#any-perforce-repository-to-githubcom) * [Any other repository to {% data variables.product.prodname_dotcom_the_website %}](#any-other-repository-to-githubcom) +* [{% data variables.enterprise.data_residency_site %} to {% data variables.product.prodname_dotcom_the_website %}](#ghecom-to-githubcom) ### {% data variables.product.prodname_ghe_server %} 3.4.1 or newer to {% data variables.product.prodname_dotcom_the_website %} @@ -155,6 +156,146 @@ Migrations from {% data variables.product.prodname_dotcom_the_website %} include * **Tooling**: {% data variables.product.prodname_cli %} or Git CLI * **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)" +### {% data variables.enterprise.data_residency_site %} to {% data variables.product.prodname_dotcom_the_website %} + +This path is not currently supported with our official tools. Please contact {% data variables.product.prodname_expert_services %}. + +## Migrations to {% data variables.enterprise.data_residency_site %} + +If you're migrating to {% data variables.enterprise.data_residency %}, your migration destination is {% data variables.enterprise.data_residency_site %}. + +Migrations to {% data variables.enterprise.data_residency_site %} use similar tools as migrations to {% data variables.product.prodname_dotcom_the_website %}. However, the {% data variables.product.prodname_importer %} and Enterprise Cloud Importer are not available. + +Follow a link below to review the scope and tooling for your migration to {% data variables.enterprise.data_residency_site %}, plus any additional information or caveats. + +* [{% data variables.product.prodname_ghe_server %} 3.4.1 or newer to {% data variables.enterprise.data_residency_site %}](#github-enterprise-server-341-or-newer-to-ghecom) +* [{% data variables.product.prodname_ghe_server %} 3.4.0 or older to {% data variables.enterprise.data_residency_site %}](#github-enterprise-server-340-or-older-to-ghecom) +* [{% data variables.product.prodname_dotcom_the_website %} to {% data variables.enterprise.data_residency_site %}](#githubcom-to-ghecom) +* [Azure DevOps Services (Azure DevOps Cloud) to {% data variables.enterprise.data_residency_site %}](#azure-devops-services-azure-devops-cloud-to-ghecom) +* [Azure DevOps Server to {% data variables.enterprise.data_residency_site %}](#azure-devops-server-to-ghecom) +* [Bitbucket Cloud (Bitbucket.org) to {% data variables.enterprise.data_residency_site %}](#bitbucket-cloud-bitbucketorg-to-ghecom) +* [Bitbucket Server or Bitbucket Data Center to {% data variables.enterprise.data_residency_site %}](#bitbucket-server-or-bitbucket-data-center-to-ghecom) +* [GitLab to {% data variables.enterprise.data_residency_site %}](#gitlab-to-ghecom) +* [Any Git repository to {% data variables.enterprise.data_residency_site %}](#any-git-repository-to-githubcom) +* [Any Mercurial repository to {% data variables.enterprise.data_residency_site %}](#any-mercurial-repository-to-ghecom) +* [Any Subversion (SVN) repository to {% data variables.enterprise.data_residency_site %}](#any-subversion-svn-repository-to-ghecom) +* [Any Team Foundation Version Control (TFVC) repository to {% data variables.enterprise.data_residency_site %}](#any-team-foundation-version-control-tfvc-repository-to-ghecom) +* [Any Perforce repository to {% data variables.enterprise.data_residency_site %}](#any-perforce-repository-to-ghecom) +* [Any other repository to {% data variables.enterprise.data_residency_site %}](#any-other-repository-to-ghecom) + +### {% data variables.product.prodname_ghe_server %} 3.4.1 or newer to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: {% data variables.product.prodname_importer_proper_name %} +* **More information**: + * "[AUTOTITLE](/migrations/using-github-enterprise-importer)" + * [{% data variables.product.prodname_expert_services %}](https://github.com/services/) website +* **Caveats**: + * {% data reusables.migrations.large-repositories-require-expert-services-ghecom %} + * {% data reusables.migrations.migration-instructions-for-any-git-repository-to-ghecom %} + +### {% data variables.product.prodname_ghe_server %} 3.4.0 or older to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: {% data variables.product.prodname_importer_proper_name %} +* **More information**: + * "[AUTOTITLE](/migrations/using-github-enterprise-importer)" + * [{% data variables.product.prodname_expert_services %}](https://github.com/services/) website +* **Caveats**: + * {% data reusables.migrations.large-repositories-require-expert-services-ghecom %} + * {% data reusables.migrations.migration-instructions-for-any-git-repository-to-ghecom %} + +### {% data variables.product.prodname_dotcom_the_website %} to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: {% data variables.product.prodname_importer_proper_name %} or {% data variables.product.prodname_expert_services %} +* **More information**: + * "[AUTOTITLE](/migrations/using-github-enterprise-importer)" + * [{% data variables.product.prodname_expert_services %}](https://github.com/services/) website +* **Caveats**: + * {% data reusables.migrations.large-repositories-require-expert-services-ghecom %} + * {% data reusables.migrations.migration-instructions-for-any-git-repository-to-ghecom %} + +### Azure DevOps Services (Azure DevOps Cloud) to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: {% data variables.product.prodname_importer_proper_name %} +* **More information**: "[AUTOTITLE](/migrations/using-github-enterprise-importer)" + +### Azure DevOps Server to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: Migration to Azure DevOps Services, then {% data variables.product.prodname_importer_proper_name %} +* **More information**: + * [Migrate data from Azure DevOps Server to Azure DevOps Services](https://learn.microsoft.com/en-us/azure/devops/migrate/migration-overview?view=azure-devops) in the Microsoft Docs + * "[AUTOTITLE](/migrations/using-github-enterprise-importer)" +* **Caveats**: If you can't migrate to Azure DevOps Services first, you must perform a "source and history" migration instead. For more information, see "[Migrations from any Git repository to {% data variables.enterprise.data_residency_site %}](#any-git-repository-to-githubcom)." + +### Bitbucket Cloud (Bitbucket.org) to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: Git CLI +* **More information**: + * "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)" + +### Bitbucket Server or Bitbucket Data Center to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: {% data variables.product.prodname_importer_proper_name %} +* **More information**: + * "[AUTOTITLE](/migrations/using-github-enterprise-importer)" + * [{% data variables.product.prodname_expert_services %}](https://github.com/services/) website +* **Caveats**: + * {% data reusables.migrations.large-repositories-require-expert-services-ghecom %} + * {% data reusables.migrations.migration-instructions-for-any-git-repository-to-ghecom %} + +### GitLab to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source, history, and metadata +* **Tooling**: Contact {% data variables.product.prodname_expert_services %} +* **More information**: [{% data variables.product.prodname_expert_services %}](https://github.com/services/) website +* **Caveats**: + * {% data reusables.migrations.migration-instructions-for-any-git-repository-to-ghecom %} + +### Any Git repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: Git CLI +* **More information**: + * "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)" + +### Any Mercurial repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: Mercurial, Git CLI, and Python +* **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)" + +### Any Subversion (SVN) repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: Subversion and Git CLI +* **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)" + +### Any Team Foundation Version Control (TFVC) repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: Azure Repos, then Git CLI +* **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)" + +### Any Perforce repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source and history +* **Tooling**: `git-p4`, then Git CLI +* **More information**: + * [git-p4](https://git-scm.com/docs/git-p4) in the Git documentation + * "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#importing-a-git-repository-with-the-command-line)" + +### Any other repository to {% data variables.enterprise.data_residency_site %} + +* **Scope**: Source snapshot +* **Tooling**: {% data variables.product.prodname_cli %} or Git CLI +* **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)" + ## Migrations to {% data variables.product.prodname_ghe_server %} You can review the scope and tooling for your migration to {% data variables.product.prodname_ghe_server %}, including any additional information or caveats. @@ -171,6 +312,7 @@ You can review the scope and tooling for your migration to {% data variables.pro * [Any Team Foundation Version Control (TFVC) repository to {% data variables.product.prodname_ghe_server %}](#any-team-foundation-version-control-tfvc-repository-to-github-enterprise-server) * [Any Perforce repository to {% data variables.product.prodname_ghe_server %}](#any-perforce-repository-to-github-enterprise-server) * [Any other repository to {% data variables.product.prodname_ghe_server %}](#any-other-repository-to-github-enterprise-server) +* [{% data variables.enterprise.data_residency_site %} to {% data variables.product.prodname_ghe_server %}](#ghecom-to-github-enterprise-server) ### {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_server %} @@ -257,3 +399,7 @@ Migrations from {% data variables.product.prodname_dotcom_the_website %} include * **Scope**: Source snapshot * **Tooling**: {% data variables.product.prodname_cli %} or Git CLI * **More information**: "[AUTOTITLE](/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)" + +### {% data variables.enterprise.data_residency_site %} to {% data variables.product.prodname_ghe_server %} + +This path is not currently supported with our official tools. Please contact {% data variables.product.prodname_expert_services %}. diff --git a/content/migrations/overview/planning-your-migration-to-github.md b/content/migrations/overview/planning-your-migration-to-github.md index 575758f9a538..cdd17123ae37 100644 --- a/content/migrations/overview/planning-your-migration-to-github.md +++ b/content/migrations/overview/planning-your-migration-to-github.md @@ -40,7 +40,7 @@ If you’re not using a code hosting platform at all, you might be storing your Wherever your code lives, that's your "migration origin." -You’ll also need to know which {% data variables.product.prodname_dotcom %} product you’re migrating to, or your "migration destination." This could be {% data variables.product.prodname_dotcom_the_website %}, which includes {% data variables.product.prodname_ghe_cloud %}, or {% data variables.product.prodname_ghe_server %}. +You’ll also need to know which {% data variables.product.prodname_dotcom %} product you’re migrating to, or your "migration destination." This could be {% data variables.product.prodname_dotcom_the_website %}, {% data variables.enterprise.data_residency_site %}, or {% data variables.product.prodname_ghe_server %}. ### Building a basic inventory of the repositories you want to migrate @@ -121,6 +121,8 @@ You may choose to complete a "self-serve migration," where you plan and run your Alternatively, you may prefer to work with {% data variables.product.company_short %}'s Expert Services team or a {% data variables.product.company_short %} Partner, which we call an "expert-led migration." With an expert-led migration, you benefit from the knowledge and experience of an expert who has previously run tens or even hundreds of migrations, and you get access to additional migration tools that aren’t available for self-serve. +If you're migrating a large amount of data, you're likely to benefit from an expert-led migration. For example, if you're migrating thousands of repositories, or you have complex repositories greater than around 5 GB in size, we recommend connecting with Expert Services. + {% rowheaders %} | | Self-serve | Expert-led | diff --git a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md index 7539c5f067fa..48a7c192af70 100644 --- a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md +++ b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer.md @@ -59,7 +59,8 @@ If your migration source is Azure DevOps, you can download the latest migration gh ado2gh download-logs --github-target-org DESTINATION --target-repo REPOSITORY --migration-log-file FILENAME ``` -{% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-target-api-url %} ### Downloading a repository migration log with the {% data variables.product.prodname_bbs2gh_cli_short %} @@ -69,7 +70,8 @@ If your migration source is Bitbucket Server, you can download the latest migrat gh bbs2gh download-logs --github-target-org DESTINATION --target-repo REPOSITORY --migration-log-file FILENAME ``` -{% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-target-api-url %} ### Downloading a repository migration log with the {% data variables.product.prodname_gei_cli_short %} @@ -79,7 +81,8 @@ If your migration source is a {% data variables.product.prodname_dotcom %} produ gh gei download-logs --github-target-org DESTINATION --target-repo REPOSITORY --migration-log-file FILENAME ``` -{% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-pat-to-download-logs %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-target-api-url %} ### Downloading all the repository migration logs for a migration script diff --git a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer.md b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer.md index 584b71dd52a9..4c147de9a6b0 100644 --- a/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer.md +++ b/content/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer.md @@ -62,7 +62,8 @@ The exact command you need to use depends on which extension of the {% data vari If your migration source is a {% data variables.product.prodname_dotcom %} product, you can reclaim mannequins with the {% data variables.product.prodname_gei_cli %}. -{% data reusables.enterprise-migration-tool.add-pat-to-reclaim-mannequins %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-pat-to-reclaim-mannequins %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-target-api-url %} {% data reusables.enterprise-migration-tool.create-csv-mannequins %} @@ -95,7 +96,8 @@ If your migration source is a {% data variables.product.prodname_dotcom %} produ If your migration source is Azure DevOps, you can reclaim mannequins with the {% data variables.product.prodname_ado2gh_cli %}. -{% data reusables.enterprise-migration-tool.add-pat-to-reclaim-mannequins %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-pat-to-reclaim-mannequins %} For {% data variables.product.pat_generic %} requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops#required-scopes-for-personal-access-tokens)." +* {% data reusables.enterprise-migration-tool.add-target-api-url %} {% data reusables.enterprise-migration-tool.create-csv-mannequins %} diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/about-migrations-between-github-products.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/about-migrations-between-github-products.md index 250e78e039c6..efcd3a5d289f 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/about-migrations-between-github-products.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/about-migrations-between-github-products.md @@ -10,9 +10,15 @@ versions: ## About migrations between {% data variables.product.company_short %} products -With {% data variables.product.prodname_importer_proper_name %}, you can migrate data from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_ghe_cloud %}, or migrate data between accounts on {% data variables.product.prodname_ghe_cloud %}. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer)." +With {% data variables.product.prodname_importer_proper_name %}, you can migrate data from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_ghe_cloud %}, or migrate data from {% data variables.product.prodname_dotcom_the_website %} to another account on {% data variables.product.prodname_ghe_cloud %}. -If your migration source is another account on {% data variables.product.prodname_dotcom_the_website %}, you can migrate individual repositories between organizations, or migrate entire organizations between enterprises. If your migration source is {% data variables.product.prodname_ghe_server %}, you can migrate repositories. +For example, {% data variables.product.prodname_importer_proper_name %} can help your company to: + +* Adopt {% data variables.enterprise.data_residency %} by migrating your enterprise to {% data variables.enterprise.data_residency_site %} +* Adopt certain features on {% data variables.product.prodname_dotcom_the_website %}, such as {% data variables.product.prodname_emus %} or new billing models, by migrating between enterprises on {% data variables.product.prodname_dotcom_the_website %} +* Benefit from simplified administration and new features by migrating from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_ghe_cloud %} + +If your migration source is an account on {% data variables.product.prodname_dotcom_the_website %}, you can migrate individual repositories between organizations, or migrate entire organizations between enterprises. If your migration source is {% data variables.product.prodname_ghe_server %}, you can migrate individual repositories. The data that {% data variables.product.prodname_importer_proper_name %} migrates depends on the source of the migration and whether you are migrating a repository or organization. @@ -20,6 +26,17 @@ The data that {% data variables.product.prodname_importer_proper_name %} migrate {% data reusables.enterprise-migration-tool.deploy-key-bypass %} {% endif %} +## Considerations for migrations to {% data variables.product.prodname_ghe_cloud %} + +Before you use {% data variables.product.prodname_importer_proper_name %}, understand the following considerations: + +* If you **already use {% data variables.product.prodname_ghe_cloud %}**: A {% data variables.product.prodname_enterprise %} plan entitles you to one deployment of {% data variables.product.prodname_ghe_cloud %}. + + For example, if you already use {% data variables.product.prodname_dotcom_the_website %}, and you also want to migrate from {% data variables.product.prodname_ghe_server %} to {% data variables.enterprise.data_residency_site %}, your usage for both won't be covered under a single plan. +* If you're **migrating to {% data variables.product.prodname_emus %}**: You will need to integrate with an identity provider to manage user accounts. Check the level of support for your identity provider before you start. See "[AUTOTITLE](/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users#identity-management-systems)." +* If you're **migrating from {% data variables.product.prodname_ghe_server %}**: Be aware that {% data variables.product.company_short %} applies rate limits to certain actions, which are disabled by default on {% data variables.product.prodname_ghe_server %}. See "[AUTOTITLE](/enterprise-cloud@latest/rest/using-the-rest-api/rate-limits-for-the-rest-api)." +* If you're **migrating to {% data variables.enterprise.data_residency %}**: Be aware that certain features are unavailable, and some features require different or additional configuration. See "[AUTOTITLE](/enterprise-cloud@latest/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency)." + ## Data that is migrated from {% data variables.product.prodname_ghe_server %} > [!WARNING] @@ -44,7 +61,7 @@ Milestones | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "c Wikis | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | {% data variables.product.prodname_actions %} workflows | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | Commit comments | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | -Active webhooks | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | +Webhooks (must be re-enabled after your migration, see "[Enabling webhooks](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products#enabling-webhooks)") | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | Branch protections | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | {% data variables.product.prodname_pages %} settings | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | User history for the above data | {% octicon "check" aria-label="Can be migrated" %} | {% octicon "check" aria-label="Can be migrated" %} | @@ -71,9 +88,9 @@ Currently, the following data is **not** migrated. {% data reusables.enterprise-migration-tool.branch-protection-migration %} -## Data that is migrated from other accounts on {% data variables.product.prodname_dotcom_the_website %} +## Data that is migrated from {% data variables.product.prodname_dotcom_the_website %} -If your migration source is another account on {% data variables.product.prodname_dotcom_the_website %}, you can migrate individual repositories between organizations, or migrate entire organizations between enterprises. +If your migration source is an account on {% data variables.product.prodname_dotcom_the_website %}, you can migrate individual repositories between organizations, or migrate entire organizations between enterprises. ### Migrated data for an organization diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md index 3b691bc3e1a7..19ca1f68cd37 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products.md @@ -18,9 +18,20 @@ redirect_from: {% data reusables.enterprise-migration-tool.required-access-intro %} -To run a migration, you need sufficient access to both the source and the destination for your migration. The source is the organization on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_server %} from which you want to migrate data. The destination is either an organization account on {% data variables.product.prodname_dotcom_the_website %}, if you're migrating repositories, or an enterprise account on {% data variables.product.prodname_dotcom_the_website %}, if you're migrating an entire organization. +To run a migration, you need sufficient access to both the source and the destination for your migration. -To have sufficient access for the migration, for both the source and the destination, you need the following things. +### What are my source and destination? + +The source is the organization on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_ghe_server %} from which you want to migrate data. + +The destination can be: + +* An **organization** account on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %}, if you're migrating repositories +* An **enterprise** account on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %}, if you're migrating an entire organization + +### What access do I need? + +To have sufficient access for the migration, for **both the source and the destination**, you need the following things. * A required role in the organization or enterprise account * A {% data variables.product.pat_generic %} that can access the organization or enterprise account * The {% data variables.product.pat_generic %} must have all the required scopes, which depend on your role and the task you want to complete. @@ -113,6 +124,8 @@ To grant the migrator role using the CLI, you must have installed the {% data va gh gei grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE ``` + {% data reusables.enterprise-migration-tool.grant-migrator-role-ghecom %} + ### Granting the migrator role with the GraphQL API {% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} @@ -127,10 +140,18 @@ To grant the migrator role using the CLI, you must have installed the {% data va If the source of your migration is {% data variables.product.prodname_ghe_server %}, you do not need to add any {% data variables.product.prodname_dotcom %} IP ranges to your firewall configuration or the IP allow list on {% data variables.location.product_location_enterprise %}. However, depending on the setup of your blob storage provider, you may need to update your blob storage provider's configuration to allow access to the {% data variables.product.prodname_dotcom %} IP ranges below. -### Identifying {% data variables.product.prodname_dotcom %}'s IP ranges +### IP ranges for {% data variables.product.prodname_dotcom_the_website %} {% data reusables.enterprise-migration-tool.identifying-githubs-ip-ranges %} +### IP ranges for {% data variables.enterprise.data_residency_site %} + +{% data reusables.enterprise-migration-tool.ip-ranges-ghecom %} + +In addition, if you are migrating from {% data variables.product.prodname_ghe_server %} and using a blob storage account with firewall rules: + +{% data reusables.enterprise-migration-tool.extra-requirements-storage %} + ## Further reading * "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md index 324502894cce..6a7999e92f90 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-organizations-from-githubcom-to-github-enterprise-cloud.md @@ -1,6 +1,6 @@ --- title: Migrating organizations from GitHub.com to GitHub Enterprise Cloud -shortTitle: Migrate organizations on GitHub.com +shortTitle: Migrate organizations from GitHub.com intro: 'You can migrate organizations from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or the GraphQL API.' versions: fpt: '*' @@ -15,6 +15,8 @@ redirect_from: ## About organization migrations with {% data variables.product.prodname_importer_proper_name %} +Migrations to {% data variables.product.prodname_ghe_cloud %} include migrations between accounts on {% data variables.product.prodname_dotcom_the_website %} and, if you're adopting {% data variables.enterprise.data_residency_short %}, migrations to your enterprise's subdomain of {% data variables.enterprise.data_residency_site %}. + {% data reusables.enterprise-migration-tool.tool-options %} {% cli %} @@ -85,7 +87,7 @@ mutation startOrganizationMigration ( | Query variable | Description | |----|----| `sourceOrgUrl` | The URL of the source organization, such as `https://github.com/octo-org`. -`targetOrgName` | The name you want the new organization to have. Must be unique on {% data variables.product.prodname_dotcom_the_website %}. +`targetOrgName` | The name you want the new organization to have. Cannot be shared by another organization on your destination platform. `targetEnterpriseId` | The ID of the enterprise that you want to create the new organization in, returned by step 2. `sourceAccessToken` | Your {% data variables.product.pat_v1 %} for the source organization. For requirements, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#required-scopes-for-personal-access-tokens)." `targetAccessToken` | Your {% data variables.product.pat_v1 %} for the destination enterprise. @@ -159,6 +161,8 @@ Before you can use the {% data variables.product.prodname_gei_cli_short %} to mi $env:GH_SOURCE_PAT="TOKEN" ``` +{% data reusables.enterprise-migration-tool.set-target-api-url %} + ## Step 4: Migrate your organization To migrate an organization, use the `gh gei migrate-org` command. @@ -167,10 +171,12 @@ To migrate an organization, use the `gh gei migrate-org` command. gh gei migrate-org --github-source-org SOURCE --github-target-org DESTINATION --github-target-enterprise ENTERPRISE ``` +> [!NOTE] {% data reusables.enterprise-migration-tool.add-target-api-url %} + {% data reusables.enterprise-migration-tool.placeholder-table %} {% data reusables.enterprise-migration-tool.source-placeholder %} -DESTINATION | The name you want the new organization to have. Must be unique on {% data variables.product.prodname_dotcom_the_website %}. -ENTERPRISE | The slug for your destination enterprise, which you can identify by looking at the URL for your enterprise account, `https://github.com/enterprises/SLUG`. +DESTINATION | The name you want the new organization to have. Cannot be shared by another organization on your destination platform. +ENTERPRISE | The slug for your destination enterprise, which you can identify by looking at the URL for your enterprise account, `https://github.com/enterprises/SLUG` or `https://SLUG.ghe.com`. ## Step 5: Validate your migration and check the error log diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md index 4d6f01e7c22e..0bb29a920843 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud.md @@ -29,7 +29,7 @@ To migrate your repositories from {% data variables.product.prodname_ghe_server 1. For each repository you want to migrate, repeat these steps. * Use the REST API on {% data variables.location.product_location_enterprise %} to generate migration archives for your repository * Upload your migration archives to a location where they can be accessed by {% data variables.product.prodname_dotcom %} - * Start your migration using the GraphQL API for {% data variables.product.prodname_dotcom %}, passing in your archive URLs + * Start your migration using the GraphQL API for your migration destination, passing in your archive URLs * Check the status of your migration via the GraphQL API * Validate your migration and check the error log @@ -97,6 +97,10 @@ Blob storage is required to migrate repositories with large Git source or metada {% data reusables.enterprise-migration-tool.blob-storage-management-console %} +### Allowing network access + +If you have configured firewall rules on your storage account, ensure you have allowed access to the IP ranges for your migration destination. See "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#configuring-ip-allow-lists-for-migrations)." + ## Step 4: Set up a migration source in {% data variables.product.prodname_ghe_cloud %} {% data reusables.enterprise-migration-tool.identify-migration-source-intro %} @@ -383,6 +387,10 @@ If you configure your blob storage credentials in the {% data variables.product. {% data reusables.enterprise-migration-tool.azure-credentials-cli %} +### Allowing network access + +If you have configured firewall rules on your storage account, ensure you have allowed access to the IP ranges for your migration destination. See "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#configuring-ip-allow-lists-for-migrations)." + ## Step 5: Generate a migration script {% data reusables.enterprise-migration-tool.generate-migration-script %} @@ -414,14 +422,20 @@ gh gei generate-script --github-source-org SOURCE \ --aws-bucket-name AWS-BUCKET-NAME ``` -{% data reusables.enterprise-migration-tool.ssl-flag %} - -{% data reusables.enterprise-migration-tool.download-migration-logs-flag %} +#### Placeholders {% data reusables.enterprise-migration-tool.generate-script-table %} {% data reusables.enterprise-migration-tool.ghes-api-url-placeholder %} {% data reusables.enterprise-migration-tool.aws-bucket-name-placeholder %} +#### Additional arguments + +| Argument | Description | +| -------- | ----------- | +| `--target-api-url TARGET-API-URL` | {% data reusables.enterprise-migration-tool.add-target-api-url %} | +| `--no-ssl-verify` | {% data reusables.enterprise-migration-tool.ssl-flag %} | +| `--download-migration-logs` | Download the migration log for each migrated repository. For more information about migration logs, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer#downloading-all-migration-logs-for-an-organization)." | + ### Reviewing the migration script {% data reusables.enterprise-migration-tool.review-migration-script %} @@ -482,17 +496,24 @@ gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --gith --ghes-api-url GHES-API-URL --aws-bucket-name "AWS-BUCKET-NAME" ``` -{% data reusables.enterprise-migration-tool.ssl-flag %} - -{% data reusables.enterprise-migration-tool.skip-releases %} - -{% data reusables.enterprise-migration-tool.set-repository-visibility %} +#### Placeholders {% data reusables.enterprise-migration-tool.migrate-repo-table-ec %} {% data reusables.enterprise-migration-tool.ghes-api-url-placeholder %} {% data reusables.enterprise-migration-tool.azure-storage-connection-string-placeholder %} {% data reusables.enterprise-migration-tool.aws-bucket-name-placeholder %} +#### Additional arguments + +| Argument | Description | +| -------- | ----------- | +| `--target-api-url TARGET-API-URL` | {% data reusables.enterprise-migration-tool.add-target-api-url %} | +| `--no-ssl-verify` | {% data reusables.enterprise-migration-tool.ssl-flag %} | +| `--skip-releases` | {% data reusables.enterprise-migration-tool.skip-releases %} | +| `--target-repo-visibility TARGET-VISIBILITY` | {% data reusables.enterprise-migration-tool.set-repository-visibility %} | + +#### Aborting the migration + {% data reusables.enterprise-migration-tool.abort-migration %} ```shell copy diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md index b226951d6084..c882ac17c901 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-githubcom-to-github-enterprise-cloud.md @@ -1,6 +1,6 @@ --- title: Migrating repositories from GitHub.com to GitHub Enterprise Cloud -shortTitle: Migrate repositories on GitHub.com +shortTitle: Migrate repositories from GitHub.com intro: 'You can migrate repositories from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or the GraphQL API.' versions: fpt: '*' @@ -15,6 +15,8 @@ redirect_from: ## About repository migrations with {% data variables.product.prodname_importer_proper_name %} +Migrations to {% data variables.product.prodname_ghe_cloud %} include migrations between accounts on {% data variables.product.prodname_dotcom_the_website %} and, if you're adopting {% data variables.enterprise.data_residency_short %}, migrations to your enterprise's subdomain of {% data variables.enterprise.data_residency_site %}. + {% data reusables.enterprise-migration-tool.tool-options %} {% cli %} @@ -186,11 +188,18 @@ If you want to migrate a single repository, skip to the next step. gh gei generate-script --github-source-org SOURCE --github-target-org DESTINATION --output FILENAME ``` -{% data reusables.enterprise-migration-tool.download-migration-logs-flag %} +{% data reusables.enterprise-migration-tool.gei-binary-generate-script %} + +#### Placeholders {% data reusables.enterprise-migration-tool.generate-script-table %} -{% data reusables.enterprise-migration-tool.gei-binary-generate-script %} +#### Additional arguments + +| Argument | Description | +| -------- | ----------- | +| `--target-api-url TARGET-API-URL` | {% data reusables.enterprise-migration-tool.add-target-api-url %} | +| `--download-migration-logs` | Download the migration log for each migrated repository. For more information about migration logs, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer#downloading-all-migration-logs-for-an-organization)." | ### Reviewing the migration script @@ -216,10 +225,20 @@ gh gei generate-script --github-source-org SOURCE --github-target-org DESTINATIO gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --github-target-org DESTINATION --target-repo NEW-NAME ``` -{% data reusables.enterprise-migration-tool.skip-releases %} +#### Placeholders {% data reusables.enterprise-migration-tool.migrate-repo-table-ec %} +#### Additional arguments + +| Argument | Description | +| -------- | ----------- | +| `--target-api-url TARGET-API-URL` | {% data reusables.enterprise-migration-tool.add-target-api-url %} | +| `--skip-releases` | {% data reusables.enterprise-migration-tool.skip-releases %} | +| `--target-repo-visibility TARGET-VISIBILITY` | {% data reusables.enterprise-migration-tool.set-repository-visibility %} | + +#### Aborting the migration + {% data reusables.enterprise-migration-tool.abort-migration %} ```shell copy diff --git a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md index 2598607b698c..3a60489640b1 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md +++ b/content/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products.md @@ -30,7 +30,7 @@ If you're migrating between {% data variables.product.company_short %} products, ### Do we want to migrate by organization or by repository? -First, if your migration source and destination are both {% data variables.product.prodname_dotcom_the_website %}, decide whether you want to migrate on an organization-by-organization basis or on a repository-by-repository basis. +First, if your migration source is {% data variables.product.prodname_dotcom_the_website %}, decide whether you want to migrate on an organization-by-organization basis or on a repository-by-repository basis. {% note %} @@ -223,6 +223,10 @@ When {% data variables.product.prodname_dependabot_alerts %} and the dependency You'll need to re-add any encrypted secrets for {% data variables.product.prodname_dependabot %}. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot)." +### Reconfiguring features for {% data variables.enterprise.data_residency_short %} + +If you have migrated from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.enterprise.data_residency %}, some features work differently, and some features will require different or additional configuration. See "[AUTOTITLE](/enterprise-cloud@latest/admin/data-residency/feature-overview-for-github-enterprise-cloud-with-data-residency)." + ### Enabling webhooks All active webhooks in the source repository are migrated. However, the migrated webhooks will be disabled by default. You can re-enable these webhooks in the repository settings. diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/about-migrations-from-azure-devops-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/about-migrations-from-azure-devops-to-github-enterprise-cloud.md index 91fb15e19de7..2193ef93ab53 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/about-migrations-from-azure-devops-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/about-migrations-from-azure-devops-to-github-enterprise-cloud.md @@ -10,7 +10,7 @@ versions: ## About migrations from Azure DevOps -You can use {% data variables.product.prodname_importer_proper_name %} to migrate repositories from Azure DevOps to {% data variables.product.prodname_ghe_cloud %}. +You can use {% data variables.product.prodname_importer_proper_name %} to migrate repositories from Azure DevOps to {% data variables.product.prodname_ghe_cloud %} ({% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %}). You can only use {% data variables.product.prodname_importer_proper_name %} to migrate from Azure DevOps Cloud, not from Azure DevOps Server. If you currently use Azure DevOps Server and want to migrate to {% data variables.product.prodname_dotcom %}, you can migrate to Azure DevOps Cloud first. For more information, see [Migrate to Azure DevOps](https://azure.microsoft.com/en-us/services/devops/migrate/) on the Azure site. diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md index 4d689e081211..77a0bdaa0e7b 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/managing-access-for-a-migration-from-azure-devops.md @@ -72,6 +72,8 @@ To grant the migrator role using the CLI, you must have installed the {% data va gh ado2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE ``` + {% data reusables.enterprise-migration-tool.grant-migrator-role-ghecom %} + ### Granting the migrator role with the GraphQL API {% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} @@ -84,10 +86,14 @@ To grant the migrator role using the CLI, you must have installed the {% data va {% data reusables.enterprise-migration-tool.configuring-ip-allow-lists %} -### Identifying {% data variables.product.prodname_dotcom %}'s IP ranges +### IP ranges for {% data variables.product.prodname_dotcom_the_website %} {% data reusables.enterprise-migration-tool.identifying-githubs-ip-ranges %} +### IP ranges for {% data variables.enterprise.data_residency_site %} + +{% data reusables.enterprise-migration-tool.ip-ranges-ghecom %} + ## Further reading * "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md index c07aa3d81d07..4513b502f5ec 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud.md @@ -185,16 +185,18 @@ Before you can use the {% data variables.product.prodname_ado2gh_cli_short %} to ```shell copy export GH_PAT="TOKEN" - export ADO_PAT="TOKEN" + export ADO_PAT="TOKEN" ``` * If you're using PowerShell, use the `$env` command. ```shell copy $env:GH_PAT="TOKEN" - $env:ADO_PAT="TOKEN" + $env:ADO_PAT="TOKEN" ``` +{% data reusables.enterprise-migration-tool.set-target-api-url %} + ## Step 4: Generate a migration script {% data reusables.enterprise-migration-tool.generate-migration-script %} @@ -209,15 +211,21 @@ To generate a migration script, run the `gh ado2gh generate-script` command. gh ado2gh generate-script --ado-org SOURCE --github-org DESTINATION --output FILENAME ``` -To add additional functionality to the script, such as rewiring pipelines, creating teams, and configuring Azure Boards integrations, you can add the `--all` flag. - -{% data reusables.enterprise-migration-tool.download-migration-logs-flag %} +#### Placeholders {% data reusables.enterprise-migration-tool.placeholder-table %} {% data reusables.enterprise-migration-tool.source-placeholder %} {% data reusables.enterprise-migration-tool.destination-placeholder %} {% data reusables.enterprise-migration-tool.filename-placeholder %} +#### Additional arguments + +| Argument | Description | +| -------- | ----------- | +| `--target-api-url TARGET-API-URL` | {% data reusables.enterprise-migration-tool.add-target-api-url %} | +| `--all` | Add additional functionality to the script, such as rewiring pipelines, creating teams, and configuring Azure Boards integrations. | +| `--download-migration-logs` | Download the migration log for each migrated repository. For more information about migration logs, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/accessing-your-migration-logs-for-github-enterprise-importer#downloading-all-migration-logs-for-an-organization)." | + ### Reviewing the migration script {% data reusables.enterprise-migration-tool.review-migration-script %} @@ -240,6 +248,8 @@ To migrate a single repository, use the `gh ado2gh migrate-repo` command. gh ado2gh migrate-repo --ado-org SOURCE --ado-team-project TEAM-PROJECT --ado-repo CURRENT-NAME --github-org DESTINATION --github-repo NEW-NAME ``` +> [!NOTE] {% data reusables.enterprise-migration-tool.add-target-api-url %} + {% data reusables.enterprise-migration-tool.migrate-repo-table-ec %} TEAM-PROJECT | Name of the team project of the repository you want to migrate diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/about-migrations-from-bitbucket-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/about-migrations-from-bitbucket-server-to-github-enterprise-cloud.md index 89f3da85e3b1..4eebe7e2c365 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/about-migrations-from-bitbucket-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/about-migrations-from-bitbucket-server-to-github-enterprise-cloud.md @@ -10,7 +10,7 @@ versions: ## About migrations from Bitbucket Server -You can use {% data variables.product.prodname_importer_proper_name %} to migrate repositories from Bitbucket Server to {% data variables.product.prodname_ghe_cloud %}. Migrations from Bitbucket Server are only supported for Bitbucket Server or Bitbucket Data Center version 5.14+ or higher. +You can use {% data variables.product.prodname_importer_proper_name %} to migrate repositories from Bitbucket Server to {% data variables.product.prodname_ghe_cloud %} ({% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %}). Migrations from Bitbucket Server are only supported for Bitbucket Server or Bitbucket Data Center version 5.14+ or higher. ## Data that is migrated diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md index 929c3897fbfb..7bd0bb7a90a6 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server.md @@ -93,6 +93,8 @@ To grant the migrator role using the CLI, you must have installed the {% data va gh bbs2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE ``` + {% data reusables.enterprise-migration-tool.grant-migrator-role-ghecom %} + ### Granting the migrator role with the GraphQL API {% data reusables.enterprise-migration-tool.grant-migrator-role-graphql %} @@ -110,10 +112,18 @@ If the destination of your migration uses an IP allow list (either {% data varia For more information, see "[AUTOTITLE](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[AUTOTITLE](/enterprise-cloud@latest/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list)." -### Identifying {% data variables.product.prodname_dotcom %}'s IP ranges +### IP ranges for {% data variables.product.prodname_dotcom_the_website %} {% data reusables.enterprise-migration-tool.identifying-githubs-ip-ranges %} +### IP ranges for {% data variables.enterprise.data_residency_site %} + +{% data reusables.enterprise-migration-tool.ip-ranges-ghecom %} + +In addition, if you are using a blob storage account with firewall rules: + +{% data reusables.enterprise-migration-tool.extra-requirements-storage %} + ## Further reading * "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" diff --git a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md index 52acf50aa145..636180171020 100644 --- a/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md +++ b/content/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud.md @@ -82,6 +82,8 @@ You'll also need to set environment variables for your Bitbucket Server username $env:SMB_PASSWORD="PASSWORD" ``` +{% data reusables.enterprise-migration-tool.set-target-api-url %} + ## Step 4: Set up blob storage Because many Bitbucket Server instances sit behind firewalls, the {% data variables.product.prodname_cli %} uses blob storage as an intermediate location to store your data that is reachable from the internet. @@ -104,6 +106,10 @@ Before you can run a migration, you need to set up a storage container with your {% data reusables.enterprise-migration-tool.azure-credentials-cli %} +### Allowing network access + +If you have configured firewall rules on your storage account, ensure you have allowed access to the IP ranges for your migration destination. See "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/managing-access-for-a-migration-from-bitbucket-server#ip-ranges-for-ghecom)." + ## Step 5: Migrate a repository You can migrate repositories with the `gh bbs2gh migrate-repo` command. @@ -131,13 +137,15 @@ To migrate a single repository, use the `gh bbs2gh migrate-repo` command. gh bbs2gh migrate-repo --bbs-server-url BBS-SERVER-URL \ --bbs-project PROJECT --bbs-repo CURRENT-NAME \ --github-org DESTINATION --github-repo NEW-NAME \ - # Use the following options if your Bitbucket Server instance runs on Linux + # If you are migrating to {% data variables.enterprise.data_residency_site %}: + --target-api-url TARGET-API-URL + # If your Bitbucket Server instance runs on Linux: --ssh-user SSH-USER --ssh-private-key PATH-TO-KEY - # Use the following options if your Bitbucket Server instance runs on Windows + # If your Bitbucket Server instance runs on Windows: --smb-user SMB-USER - # Use the following option if you're using AWS S3 as your blob storage provider + # If you're using AWS S3 as your blob storage provider: --aws-bucket-name AWS-BUCKET-NAME - # Use the following option if you are running a Bitbucket Data Center cluster or your Bitbucket Server is behind a load balancer + # If you are running a Bitbucket Data Center cluster or your Bitbucket Server is behind a load balancer: --archive-download-host ARCHIVE-DOWNLOAD-HOST ``` @@ -147,6 +155,7 @@ gh bbs2gh migrate-repo --bbs-server-url BBS-SERVER-URL \ {% data reusables.enterprise-migration-tool.current-name-placeholder %} {% data reusables.enterprise-migration-tool.destination-placeholder %} {% data reusables.enterprise-migration-tool.new-name-placeholder %} +{% data reusables.enterprise-migration-tool.target-api-url-placeholder %} {% data reusables.enterprise-migration-tool.ssh-user-placeholder %} {% data reusables.enterprise-migration-tool.path-to-key-placeholder %} {% data reusables.enterprise-migration-tool.smb-user-placeholder %} @@ -202,8 +211,10 @@ gh bbs2gh migrate-repo --archive-path ARCHIVE-PATH \ --bbs-server-url BBS-SERVER-URL \ --bbs-project PROJECT \ --bbs-repo CURRENT-NAME \ - # Use the following option if you're using AWS S3 as your blob storage provider + # If you're using AWS S3 as your blob storage provider: --aws-bucket-name AWS-BUCKET-NAME + # If you are migrating to {% data variables.enterprise.data_residency_site %}: + --target-api-url TARGET-API-URL ``` {% data reusables.enterprise-migration-tool.placeholder-table %} @@ -214,6 +225,7 @@ gh bbs2gh migrate-repo --archive-path ARCHIVE-PATH \ {% data reusables.enterprise-migration-tool.project-placeholder %} {% data reusables.enterprise-migration-tool.current-name-placeholder %} {% data reusables.enterprise-migration-tool.aws-bucket-name-placeholder %} +{% data reusables.enterprise-migration-tool.target-api-url-placeholder %} ### Cancelling a migration @@ -241,11 +253,13 @@ To generate a migration script, run the `gh bbs2gh generate-script` command. gh bbs2gh generate-script --bbs-server-url BBS-SERVER-URL \ --github-org DESTINATION \ --output FILENAME \ - # Use the following options if your Bitbucket Server instance runs on Linux + # If you are migrating to {% data variables.enterprise.data_residency_site %}: + --target-api-url TARGET-API-URL + # If your Bitbucket Server instance runs on Linux: --ssh-user SSH-USER --ssh-private-key PATH-TO-KEY - # Use the following options if your Bitbucket Server instance runs on Windows + # If your Bitbucket Server instance runs on Windows: --smb-user SMB-USER - # Use the following option if you are running a Bitbucket Data Center cluster or your Bitbucket Server is behind a load balancer + # If you are running a Bitbucket Data Center cluster or your Bitbucket Server is behind a load balancer: --archive-download-host ARCHIVE-DOWNLOAD-HOST ``` @@ -255,6 +269,7 @@ gh bbs2gh generate-script --bbs-server-url BBS-SERVER-URL \ {% data reusables.enterprise-migration-tool.bbs-server-url-placeholder %} {% data reusables.enterprise-migration-tool.destination-placeholder %} {% data reusables.enterprise-migration-tool.filename-placeholder %} +{% data reusables.enterprise-migration-tool.target-api-url-placeholder %} {% data reusables.enterprise-migration-tool.ssh-user-placeholder %} {% data reusables.enterprise-migration-tool.path-to-key-placeholder %} {% data reusables.enterprise-migration-tool.smb-user-placeholder %} diff --git a/content/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer.md b/content/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer.md index c7338f519d2d..3c5713e23589 100644 --- a/content/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer.md +++ b/content/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer.md @@ -24,7 +24,7 @@ redirect_from: {% data variables.product.prodname_importer_proper_name %} is a highly customizable migration tool designed to help you move your enterprise to {% data variables.product.prodname_ghe_cloud %}. -You can migrate on a repository-by-repository basis or, if your migration source and destination are both {% data variables.product.prodname_dotcom_the_website %}, on an organization-by-organization basis. +You can migrate on a repository-by-repository basis or, if your migration source is {% data variables.product.prodname_dotcom_the_website %}, on an organization-by-organization basis. {% data variables.product.prodname_importer_proper_name %} allows you to customize your migration to meet your enterprise's unique needs with: * **A distinct migration permissions role** for repository migrations, which allows you to designate teams and/or individual users to run a migration and removes the need for organization owners to complete the migration. diff --git a/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md b/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md index 7b684f552ef2..c340e0949a88 100644 --- a/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md +++ b/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md @@ -18,11 +18,8 @@ shortTitle: Organization news feed {% ifversion fpt or ghec %} -{% note %} +>[!NOTE] The organization news feed is not available with {% data variables.product.prodname_emus %}. -**Note:** The organization news feed is not available with {% data variables.product.prodname_emus %}. - -{% endnote %} {% endif %} An organization's news feed shows other people's activity on repositories owned by that organization. You can use your organization's news feed to see when someone opens, closes, or merges an issue or pull request, creates or deletes a branch, creates a tag or release, comments on an issue, pull request, or commit, or pushes new commits to {% data variables.product.product_name %}. diff --git a/content/organizations/collaborating-with-groups-in-organizations/index.md b/content/organizations/collaborating-with-groups-in-organizations/index.md index a19530e6d402..1d65afabe027 100644 --- a/content/organizations/collaborating-with-groups-in-organizations/index.md +++ b/content/organizations/collaborating-with-groups-in-organizations/index.md @@ -21,7 +21,7 @@ children: - /customizing-your-organizations-profile - /about-your-organizations-news-feed - /viewing-insights-for-dependencies-in-your-organization - - /viewing-usage-metrics-for-github-actions + - /viewing-github-actions-metrics-for-your-organization shortTitle: Collaborate with groups --- diff --git a/content/organizations/collaborating-with-groups-in-organizations/viewing-github-actions-metrics-for-your-organization.md b/content/organizations/collaborating-with-groups-in-organizations/viewing-github-actions-metrics-for-your-organization.md new file mode 100644 index 000000000000..4a3c6d41d3eb --- /dev/null +++ b/content/organizations/collaborating-with-groups-in-organizations/viewing-github-actions-metrics-for-your-organization.md @@ -0,0 +1,38 @@ +--- +title: Viewing GitHub Actions metrics for your organization +shortTitle: GitHub Actions metrics +intro: GitHub Actions metrics provide insights into how and where your organization is using resources for its CI/CD pipelines. +permissions: Organization owners and users with the "View organization Actions metrics" permission. +versions: + feature: actions-metrics +redirect_from: + - /organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions + - /organizations/collaborating-with-groups-in-organizations/viewing-metrics-for-github-actions +--- + +{% data reusables.actions.about-actions-metrics %} + +{% data reusables.actions.enabling-actions-metrics %} + +## About {% data variables.product.prodname_actions %} usage metrics + +{% data reusables.actions.about-actions-usage-metrics %} + +{% data reusables.actions.actions-usage-metrics-not-billing-metrics %} + +## About {% data variables.product.prodname_actions %} performance metrics + +{% data reusables.actions.about-actions-performance-metrics %} + +## Understanding {% data variables.product.prodname_actions %} metrics aggregation + +{% data reusables.actions.about-actions-usage-metrics-aggregation %} + +## Viewing {% data variables.product.prodname_actions %} metrics for your organization + +{% data reusables.actions.actions-metrics-discrepancy-note %} + +{% data reusables.profile.access_org %} +{% data reusables.user-settings.access_org %} +{% data reusables.organizations.insights %} +{% data reusables.actions.viewing-actions-metrics %} diff --git a/content/organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions.md b/content/organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions.md deleted file mode 100644 index fe90f3cf87bb..000000000000 --- a/content/organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Viewing usage metrics for GitHub Actions -shortTitle: GitHub Actions usage metrics -intro: 'GitHub Actions usage metrics provide insights into how and where your organization is using resources for its CI/CD pipelines.' -permissions: 'Organization owners and users with the "View organization Actions usage metrics" permission.' -product: 'Your organization must be on a {% data variables.product.prodname_ghe_cloud %} plan.' -versions: - feature: actions-usage-metrics ---- - -## About {% data variables.product.prodname_actions %} usage metrics - -{% data reusables.actions.about-actions-usage-metrics %} - -{% data reusables.actions.actions-usage-metrics-not-billing-metrics %} - -## Enabling access to {% data variables.product.prodname_actions %} usage metrics - -Organization owners can create custom organization roles to allow people to view {% data variables.product.prodname_actions %} usage metrics for their organization. To provide users with access, select the "View organization Actions usage metrics" role when creating a custom organization role. For more information, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - -## Understanding {% data variables.product.prodname_actions %} usage metrics aggregation - -{% data reusables.actions.about-actions-usage-metrics-aggregation %} - -## Viewing {% data variables.product.prodname_actions %} usage metrics - -> [!NOTE] -There may be a discrepancy between the **Workflows** tab's job count and the **Jobs** tab's count due to differences in how unique jobs are identified. This does not affect the total minutes calculated. - -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.insights %} -1. In the "Insights" navigation menu, click **Actions Usage Metrics**. -1. Optionally, to select a time period to view usage metrics for, choose an option from the **Period** drop down menu at the top right of the page. For more information, see "[Understanding {% data variables.product.prodname_actions %} usage metrics aggregation](#understanding-github-actions-usage-metrics-aggregation)." -1. Click on the tab that contains the usage metrics you would like to view. For more information, see "[About {% data variables.product.prodname_actions %} usage metrics](#about-github-actions-usage-metrics)." -1. Optionally, to filter the data displayed in a tab, create a filter. - 1. Click on the **{% octicon "filter" aria-hidden="true" %} Filter** button. - 1. Click **{% octicon "plus" aria-hidden="true" %} Add a filter**. - 1. Choose a metric you would like to filter results by. - 1. Depending on the metric you chose, fill out information in the "Qualifier," "Operator," and "Value" columns. - 1. Optionally, click **{% octicon "plus" aria-hidden="true" %} Add a filter** to add another filter. - 1. Click **Apply**. -1. Optionally, to download usage metrics to a CSV file, click {% octicon "download" aria-label="Download report" %}. diff --git a/content/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles.md b/content/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles.md index f3bda072cd2e..c5907d60feb5 100644 --- a/content/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles.md +++ b/content/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles.md @@ -56,8 +56,8 @@ Manage organization OAuth application policies | Access to the "OAuth applicatio | Manage organization runners and runner groups | Access to create and manage GitHub-hosted runners, self-hosted runners, and runner groups, and control where self-hosted runners can be created. | "[AUTOTITLE](/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#overview-of-github-hosted-runners)"
EastUs
api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
preview_notice: Preview notice for "{{ RESTOperationTitle }}"
preview_notices: Preview notices for "{{ RESTOperationTitle }}"
fine_grained_access: Fine-grained access tokens for "{{ RESTOperationTitle }}"
diff --git a/data/variables/copilot.yml b/data/variables/copilot.yml
index f972744913fd..77963d6dc451 100644
--- a/data/variables/copilot.yml
+++ b/data/variables/copilot.yml
@@ -12,7 +12,7 @@ cfb_price_per_month: '$19 USD'
# Copilot billing: price per month for Copilot Enterprise
ce_price_per_month: '$39 USD'
-# Copilot Chat in GitHub.com: maximum number of repos that can be indexed for an org
+# Copilot Chat in GitHub: maximum number of repos that can be indexed for an org
max-chat-indexed-repos: '50'
# Copilot partners: builders who can develop Copilot extensions
@@ -22,3 +22,10 @@ copilot_partner_program: 'Copilot Partner Program'
## Copilot URLs
chat_completions_api: 'https://api.githubcopilot.com/chat/completions'
+
+## Copilot code review - e.g. {% data variables.copilot.copilot_code-review %}
+copilot_code-review: 'GitHub Copilot code review'
+copilot_code-review_short: 'Copilot code review'
+
+## LLM models for Copilot
+copilot_claude_sonnet: 'Claude 3.5 Sonnet'
diff --git a/data/variables/enterprise.yml b/data/variables/enterprise.yml
index 4605b1d94b2c..ed5cc3380aa4 100644
--- a/data/variables/enterprise.yml
+++ b/data/variables/enterprise.yml
@@ -9,6 +9,14 @@ prodname_managed_user: 'managed user account'
prodname_emu_enterprise: 'enterprise with managed users'
prodname_emu_org: 'organization with managed users'
+## Data residency
+data_residency: 'GitHub Enterprise Cloud with data residency'
+data_residency_short: 'data residency'
+data_residency_site: 'GHE.com'
+data_residency_domain: 'SUBDOMAIN.ghe.com'
+data_residency_api: 'api.SUBDOMAIN.ghe.com'
+data_residency_example_domain: 'octocorp.ghe.com'
+
# GitHub Connect (enterprise accounts, other unified features)
## Phrase content so that the uncapitalized unified contributions or unified search variables are not used at the start of a sentence.
prodname_unified_contributions: 'unified contributions'
@@ -16,3 +24,8 @@ prodname_unified_search: 'unified search'
# Entra ID (previously known as Azure AD)
ghes_azure_ad_app_link: '[GitHub Enterprise Server application](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/aad.githubenterpriseserver)'
+
+# GitHub Enterprise not on hosted at GitHub.com
+gh_enterprise: '{% ifversion ghec %}{% data variables.enterprise.data_residency %}{% elsif ghes %}{% data variables.product.prodname_ghe_server %}{% endif %}'
+gh_enterprise_domain: '{% ifversion ghec %}{% data variables.enterprise.data_residency_domain %}{% elsif ghes %}https://GHE_HOSTNAME{% endif %}'
+gh_enterprise_container_registry: '{% ifversion ghes %}https://containers.GHE_HOSTNAME/v2/{% elsif ghec %}https://containers.SUBDOMAIN.ghe.com{% endif %}'
diff --git a/data/variables/explore.yml b/data/variables/explore.yml
index 1ef5ff7902c4..5a69241f7ff1 100644
--- a/data/variables/explore.yml
+++ b/data/variables/explore.yml
@@ -3,6 +3,3 @@ explore_github: >-
your_stars_page: >-
{% ifversion fpt or ghec %}[stars page](https://github.com/stars){% else %}stars page (`https://[hostname]/stars`){% endif %}
-
-trending_page: >-
- {% ifversion fpt or ghec %}[Trending page](https://github.com/trending){% else %}Trending page (`https://[hostname]/trending`){% endif %}
diff --git a/data/variables/product.yml b/data/variables/product.yml
index bc2a3c00e1bf..f37ed3458c53 100644
--- a/data/variables/product.yml
+++ b/data/variables/product.yml
@@ -264,7 +264,7 @@ prodname_dependabot_updates: 'Dependabot updates'
prodname_archive: 'GitHub Archive Program'
prodname_arctic_vault: 'Arctic Code Vault'
-# GitHub Copilot
+# GitHub Copilot (product)
prodname_copilot: 'GitHub Copilot'
prodname_copilot_short: 'Copilot'
prodname_copilot_for_business: 'GitHub Copilot Business'
@@ -275,8 +275,8 @@ prodname_copilot_enterprise: 'GitHub Copilot Enterprise'
prodname_copilot_enterprise_short: 'Copilot Enterprise'
prodname_copilot_chat: 'GitHub Copilot Chat'
prodname_copilot_chat_short: 'Copilot Chat'
-prodname_copilot_chat_dotcom: 'GitHub Copilot Chat in GitHub.com'
-prodname_copilot_chat_dotcom_short: 'Copilot Chat in GitHub.com'
+prodname_copilot_chat_dotcom: 'GitHub Copilot Chat in GitHub'
+prodname_copilot_chat_dotcom_short: 'Copilot Chat in GitHub'
prodname_copilot_mobile: 'GitHub Copilot Chat in GitHub Mobile'
prodname_copilot_mobile_short: 'Copilot Chat in GitHub Mobile'
prodname_copilot_extensions: 'GitHub Copilot Extensions'
@@ -297,8 +297,17 @@ prodname_copilot_customization: 'Copilot Customization'
prodname_copilot_in_support: 'Copilot in GitHub Support'
prodname_copilot_sku_isolation: 'Copilot subscription-based network routing'
prodname_copilot_autocomplete_pr: 'Copilot text completion'
+
+# Copilot branded GHAS features
prodname_copilot_autofix: 'GitHub Copilot Autofix'
prodname_copilot_autofix_short: 'Copilot Autofix'
+prodname_copilot_workspace_pr: 'GitHub Copilot Workspace for pull requests'
+prodname_copilot_workspace_pr_short: 'Copilot Workspace for PRs'
+prodname_copilot_workspace: 'Copilot Workspace'
+prodname_copilot_workspace_short: 'Workspace'
+
+# Windows
+prodname_windows_terminal: 'Windows Terminal'
# Command Palette
prodname_command_palette: 'GitHub Command Palette'
diff --git a/src/audit-logs/lib/config.json b/src/audit-logs/lib/config.json
index 203765980b75..bed76cdae2a9 100644
--- a/src/audit-logs/lib/config.json
+++ b/src/audit-logs/lib/config.json
@@ -3,5 +3,5 @@
"apiOnlyEvents": "This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.",
"apiRequestEvent": "This event is only available via audit log streaming."
},
- "sha": "50b493f0914184eb8479e18ead886625a6fc2ed6"
+ "sha": "6a20673ab35be527bc4d1773716a5ac1efe4308a"
}
\ No newline at end of file
diff --git a/src/fixtures/fixtures/data/ui.yml b/src/fixtures/fixtures/data/ui.yml
index e2607bd191cb..c8eac2205d5c 100644
--- a/src/fixtures/fixtures/data/ui.yml
+++ b/src/fixtures/fixtures/data/ui.yml
@@ -148,6 +148,7 @@ rest_reference:
http_status_code: HTTP response status codes for "{{ RESTOperationTitle }}"
code_sample: Code sample
code_samples: Code samples for "{{ RESTOperationTitle }}"
+ data_residency_notice: If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
preview_notice: Preview notice for "{{ RESTOperationTitle }}"
preview_notices: Preview notices for "{{ RESTOperationTitle }}"
fine_grained_access: Fine-grained access tokens for "{{ RESTOperationTitle }}"
diff --git a/src/fixtures/fixtures/versionless-redirects.txt b/src/fixtures/fixtures/versionless-redirects.txt
index 82a0853b6364..9504259b7f3e 100644
--- a/src/fixtures/fixtures/versionless-redirects.txt
+++ b/src/fixtures/fixtures/versionless-redirects.txt
@@ -451,7 +451,7 @@
- /articles/changing-the-visibility-of-your-organizations-dependency-insights
- /github/setting-up-and-managing-organizations-and-teams/changing-the-visibility-of-your-organizations-dependency-insights
-/enterprise-server@latest/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment
+/enterprise-server@latest/search-github/getting-started-with-searching-on-github/enabling-repository-search-across-environments
- /search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment
- /articles/enabling-private-githubcom-repository-search-in-your-github-enterprise-account
- /articles/enabling-private-github-com-repository-search-in-your-github-enterprise-server-account
diff --git a/src/frame/middleware/index.ts b/src/frame/middleware/index.ts
index 9e8794259476..fe11bf133f59 100644
--- a/src/frame/middleware/index.ts
+++ b/src/frame/middleware/index.ts
@@ -214,12 +214,6 @@ export default function (app: Express) {
// *** Headers ***
app.set('etag', false) // We will manage our own ETags if desired
- // temporary
- app.use(function (req, res, next) {
- res.set('x-ptcl', req.secure ? 'o' : 'x')
- next()
- })
-
// *** Config and context for redirects ***
app.use(detectLanguage) // Must come before context, breadcrumbs, find-page, handle-errors, homepages
app.use(asyncMiddleware(reloadTree)) // Must come before context
diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json
index 0629285aca10..1c39f18972a9 100644
--- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json
+++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json
@@ -291,6 +291,15 @@
"additional-permissions": true,
"access": "write"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -462,6 +471,15 @@
"additional-permissions": false,
"access": "read"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -690,6 +708,15 @@
"additional-permissions": true,
"access": "write"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -708,6 +735,15 @@
"additional-permissions": true,
"access": "read"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -4155,6 +4191,15 @@
"additional-permissions": false,
"access": "read"
},
+ {
+ "category": "code-scanning",
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}",
+ "additional-permissions": false,
+ "access": "write"
+ },
{
"category": "code-scanning",
"slug": "create-a-codeql-variant-analysis",
diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json
index 46760e6544a6..ce0e241952f3 100644
--- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json
+++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json
@@ -1424,6 +1424,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -2030,6 +2036,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -2042,6 +2054,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json
index fd23dc84ada8..d415cee34cc5 100644
--- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json
+++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json
@@ -14,6 +14,17 @@
"server-to-server": false,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-enterprise",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/enterprises/{enterprise}/copilot/metrics",
+ "access": "read",
+ "user-to-server": false,
+ "server-to-server": false,
+ "additional-permissions": false
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-enterprise-members",
@@ -25,6 +36,17 @@
"server-to-server": false,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-enterprise-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": false,
+ "server-to-server": false,
+ "additional-permissions": false
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-an-enterprise-team",
@@ -394,6 +416,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -603,6 +636,17 @@
"server-to-server": true,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -875,6 +919,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -897,6 +952,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -5078,6 +5144,17 @@
"server-to-server": true,
"additional-permissions": false
},
+ {
+ "category": "code-scanning",
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}",
+ "access": "write",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": false
+ },
{
"category": "code-scanning",
"slug": "create-a-codeql-variant-analysis",
diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json
index d128afd8ec0a..1a53bc20dd93 100644
--- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json
+++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json
@@ -1320,6 +1320,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -1758,6 +1764,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -1770,6 +1782,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json
index 46760e6544a6..ce0e241952f3 100644
--- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json
+++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json
@@ -1424,6 +1424,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -2030,6 +2036,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -2042,6 +2054,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json
index 953d84b99cd6..a633caf98e92 100644
--- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json
+++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json
@@ -522,6 +522,15 @@
"additional-permissions": true,
"access": "write"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -765,6 +774,15 @@
"additional-permissions": false,
"access": "read"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -1143,6 +1161,15 @@
"additional-permissions": true,
"access": "write"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -1161,6 +1188,15 @@
"additional-permissions": true,
"access": "read"
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "additional-permissions": true,
+ "access": "read"
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -4749,6 +4785,15 @@
"additional-permissions": false,
"access": "read"
},
+ {
+ "category": "code-scanning",
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}",
+ "additional-permissions": false,
+ "access": "write"
+ },
{
"category": "code-scanning",
"slug": "create-a-codeql-variant-analysis",
diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json
index c1ff41097989..44a64f3cc3b7 100644
--- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json
+++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json
@@ -1462,6 +1462,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -2068,6 +2074,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -2080,6 +2092,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json
index afafb49ada50..45f83f3adeb2 100644
--- a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json
+++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json
@@ -69,6 +69,17 @@
"server-to-server": false,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-enterprise",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/enterprises/{enterprise}/copilot/metrics",
+ "access": "read",
+ "user-to-server": false,
+ "server-to-server": false,
+ "additional-permissions": false
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-enterprise-members",
@@ -179,6 +190,17 @@
"server-to-server": false,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-enterprise-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": false,
+ "server-to-server": false,
+ "additional-permissions": false
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-an-enterprise-team",
@@ -713,6 +735,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -1010,6 +1043,17 @@
"server-to-server": true,
"additional-permissions": false
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -1464,6 +1508,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
@@ -1486,6 +1541,17 @@
"server-to-server": true,
"additional-permissions": true
},
+ {
+ "category": "copilot",
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics",
+ "access": "read",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": true
+ },
{
"category": "copilot",
"slug": "get-a-summary-of-copilot-usage-for-a-team",
@@ -5838,6 +5904,17 @@
"server-to-server": true,
"additional-permissions": false
},
+ {
+ "category": "code-scanning",
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}",
+ "access": "write",
+ "user-to-server": true,
+ "server-to-server": true,
+ "additional-permissions": false
+ },
{
"category": "code-scanning",
"slug": "create-a-codeql-variant-analysis",
diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json
index 7a0107e51f09..bb12147bafd6 100644
--- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json
+++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json
@@ -1358,6 +1358,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -1796,6 +1802,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -1808,6 +1820,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json
index c1ff41097989..44a64f3cc3b7 100644
--- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json
+++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json
@@ -1462,6 +1462,12 @@
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
},
+ {
+ "slug": "delete-a-codeql-database",
+ "subcategory": "code-scanning",
+ "verb": "delete",
+ "requestPath": "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
+ },
{
"slug": "create-a-codeql-variant-analysis",
"subcategory": "code-scanning",
@@ -2068,6 +2074,12 @@
"verb": "delete",
"requestPath": "/orgs/{org}/copilot/billing/selected_users"
},
+ {
+ "slug": "get-copilot-metrics-for-an-organization",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-organization-members",
"subcategory": "copilot-usage",
@@ -2080,6 +2092,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}/copilot"
},
+ {
+ "slug": "get-copilot-metrics-for-a-team",
+ "subcategory": "copilot-metrics",
+ "verb": "get",
+ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics"
+ },
{
"slug": "get-a-summary-of-copilot-usage-for-a-team",
"subcategory": "copilot-usage",
diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json
index 60d425ca2080..1795c338daa7 100644
--- a/src/github-apps/lib/config.json
+++ b/src/github-apps/lib/config.json
@@ -60,5 +60,5 @@
"2022-11-28"
]
},
- "sha": "7c6cc4ee9c2354d4093640bec365415ddd1c3506"
+ "sha": "e3b1d8b69b58d9e3b89732e2dc093a635bd86ff5"
}
\ No newline at end of file
diff --git a/src/redirects/lib/static/redirect-exceptions.txt b/src/redirects/lib/static/redirect-exceptions.txt
index 5ad96a2d63dd..701b9742626a 100644
--- a/src/redirects/lib/static/redirect-exceptions.txt
+++ b/src/redirects/lib/static/redirect-exceptions.txt
@@ -14,7 +14,8 @@
/rest/using-the-rest-api/getting-started-with-the-rest-api
- /rest/overview/api-previews
-/enterprise-server@latest/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment
+/enterprise-server@latest/search-github/getting-started-with-searching-on-github/enabling-repository-search-across-environments
+- /enterprise-server@latest/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment
- /enterprise-cloud@latest/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment
/enterprise-cloud@latest/organizations/managing-membership-in-your-organization/exporting-member-information-for-your-organization
diff --git a/src/rest/components/RestCodeSamples.tsx b/src/rest/components/RestCodeSamples.tsx
index 1a3bfe8d16fe..46ea76f516bf 100644
--- a/src/rest/components/RestCodeSamples.tsx
+++ b/src/rest/components/RestCodeSamples.tsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useRef, FormEvent } from 'react'
import { FormControl, IconButton, Select, TabNav } from '@primer/react'
-import { CheckIcon, CopyIcon } from '@primer/octicons-react'
+import { CheckIcon, CopyIcon, InfoIcon } from '@primer/octicons-react'
import { announce } from '@primer/live-region-element'
import Cookies from 'src/frame/components/lib/cookies'
import cx from 'classnames'
@@ -52,7 +52,7 @@ function highlightElement(element: HTMLElement) {
export function RestCodeSamples({ operation, slug, heading }: Props) {
const { t } = useTranslation(['rest_reference'])
- const { isEnterpriseServer } = useVersion()
+ const { isEnterpriseServer, isEnterpriseCloud } = useVersion()
// Refs to track the request example, response example
// and the first render
@@ -233,6 +233,16 @@ export function RestCodeSamples({ operation, slug, heading }: Props) {
Lists the CodeQL databases that are available in a repository.
\nOAuth app tokens and personal access tokens (classic) need the security_events
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Lists the CodeQL databases that are available in a repository.
\nOAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Gets a CodeQL database for a language in a repository.
\nBy default this endpoint returns JSON metadata about the CodeQL database. To\ndownload the CodeQL database binary content, set the Accept
header of the request\nto application/zip
, and make sure\nyour HTTP client is configured to follow redirects or use the Location
header\nto make a second request to get the redirect URL.
OAuth app tokens and personal access tokens (classic) need the security_events
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Gets a CodeQL database for a language in a repository.
\nBy default this endpoint returns JSON metadata about the CodeQL database. To\ndownload the CodeQL database binary content, set the Accept
header of the request\nto application/zip
, and make sure\nyour HTTP client is configured to follow redirects or use the Location
header\nto make a second request to get the redirect URL.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git
extension. The name is not case sensitive.
The language of the CodeQL database.
", + "schema": { + "type": "string" + }, + "required": true + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Contents\" repository permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "language": "LANGUAGE" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "Deletes a CodeQL database for a language in a repository.
\nOAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
No Content
" + }, + { + "httpStatusCode": "403", + "description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "503", + "description": "Service unavailable
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "post", @@ -222697,6 +222783,2350 @@ ] }, "copilot": { + "copilot-metrics": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/copilot/metrics", + "title": "Get Copilot metrics for an enterprise", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly enterprise owners and billing managers can view Copilot metrics for the enterprise.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/metrics", + "title": "Get Copilot metrics for an enterprise team", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "The slug of the enterprise team name.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE", + "team_slug": "TEAM_SLUG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nNote
\n\nThis endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/copilot/metrics", + "title": "Get Copilot metrics for an organization", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nNote
\n\nThis endpoint will only return results for a given day if the organization contained five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.\nOnly organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
, read:org
, or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics", + "title": "Get Copilot metrics for a team", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "The slug of the team name.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "team_slug": "TEAM_SLUG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nNote
\n\nThis endpoint will only return results for a given day if the team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.\nOnly organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
, read:org
, or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "copilot-usage": [ { "serverUrl": "https://api.github.com", @@ -357067,7 +359497,7 @@ } ], "previews": [], - "descriptionHTML": "List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
Lists the CodeQL databases that are available in a repository.
\nOAuth app tokens and personal access tokens (classic) need the security_events
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Lists the CodeQL databases that are available in a repository.
\nOAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Gets a CodeQL database for a language in a repository.
\nBy default this endpoint returns JSON metadata about the CodeQL database. To\ndownload the CodeQL database binary content, set the Accept
header of the request\nto application/zip
, and make sure\nyour HTTP client is configured to follow redirects or use the Location
header\nto make a second request to get the redirect URL.
OAuth app tokens and personal access tokens (classic) need the security_events
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
Gets a CodeQL database for a language in a repository.
\nBy default this endpoint returns JSON metadata about the CodeQL database. To\ndownload the CodeQL database binary content, set the Accept
header of the request\nto application/zip
, and make sure\nyour HTTP client is configured to follow redirects or use the Location
header\nto make a second request to get the redirect URL.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git
extension. The name is not case sensitive.
The language of the CodeQL database.
", + "schema": { + "type": "string" + }, + "required": true + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Contents\" repository permissions": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "language": "LANGUAGE" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "Deletes a CodeQL database for a language in a repository.
\nOAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint with private or public repositories, or the public_repo
scope to use this endpoint with only public repositories.
No Content
" + }, + { + "httpStatusCode": "403", + "description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "503", + "description": "Service unavailable
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "post", @@ -231657,6 +231743,2350 @@ ] }, "copilot": { + "copilot-metrics": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/copilot/metrics", + "title": "Get Copilot metrics for an enterprise", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly enterprise owners and billing managers can view Copilot metrics for the enterprise.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/team/{team_slug}/copilot/metrics", + "title": "Get Copilot metrics for an enterprise team", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "The slug of the enterprise team name.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [ + { + "\"Enterprise administration\" business permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE", + "team_slug": "TEAM_SLUG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nNote
\n\nThis endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled or set to \"no policy\" for the enterprise within GitHub settings.\nOnly owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/copilot/metrics", + "title": "Get Copilot metrics for an organization", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nNote
\n\nThis endpoint will only return results for a given day if the organization contained five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.\nOnly organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
, read:org
, or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics", + "title": "Get Copilot metrics for a team", + "category": "copilot", + "subcategory": "copilot-metrics", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_slug", + "description": "The slug of the team name.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "since", + "description": "Show usage metrics since this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
). Maximum value is 28 days ago.
Show usage metrics until this date. This is a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
) and should not preceed the since
date if it is passed.
The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "per_page", + "description": "The number of days of metrics to display per page (max 28). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 28 + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"GitHub Copilot Business\" organization permissions": "read" + }, + { + "\"Administration\" organization permissions": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "team_slug": "TEAM_SLUG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "date": "2024-06-24", + "total_active_users": 24, + "total_engaged_users": 20, + "copilot_ide_code_completions": { + "total_engaged_users": 20, + "languages": [ + { + "name": "python", + "total_engaged_users": 10 + }, + { + "name": "ruby", + "total_engaged_users": 10 + } + ], + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 13, + "languages": [ + { + "name": "python", + "total_engaged_users": 6, + "total_code_suggestions": 249, + "total_code_acceptances": 123, + "total_code_lines_suggested": 225, + "total_code_lines_accepted": 135 + }, + { + "name": "ruby", + "total_engaged_users": 7, + "total_code_suggestions": 496, + "total_code_acceptances": 253, + "total_code_lines_suggested": 520, + "total_code_lines_accepted": 270 + } + ] + } + ] + }, + { + "name": "neovim", + "total_engaged_users": 7, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "languages": [ + { + "name": "typescript", + "total_engaged_users": 3, + "total_code_suggestions": 112, + "total_code_acceptances": 56, + "total_code_lines_suggested": 143, + "total_code_lines_accepted": 61 + }, + { + "name": "go", + "total_engaged_users": 4, + "total_code_suggestions": 132, + "total_code_acceptances": 67, + "total_code_lines_suggested": 154, + "total_code_lines_accepted": 72 + } + ] + } + ] + } + ] + }, + "copilot_ide_chat": { + "total_engaged_users": 13, + "editors": [ + { + "name": "vscode", + "total_engaged_users": 13, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 12, + "total_chats": 45, + "total_chat_insertion_events": 12, + "total_chat_copy_events": 16 + }, + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_engaged_users": 1, + "total_chats": 10, + "total_chat_insertion_events": 11, + "total_chat_copy_events": 3 + } + ] + } + ] + }, + "copilot_dotcom_chat": { + "total_engaged_users": 14, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_engaged_users": 14, + "total_chats": 38 + } + ] + }, + "copilot_dotcom_pull_requests": { + "total_engaged_users": 12, + "repositories": [ + { + "name": "demo/repo1", + "total_engaged_users": 8, + "models": [ + { + "name": "default", + "is_custom_model": false, + "custom_model_training_date": null, + "total_pr_summaries_created": 6, + "total_engaged_users": 8 + } + ] + }, + { + "name": "demo/repo2", + "total_engaged_users": 4, + "models": [ + { + "name": "a-custom-model", + "is_custom_model": true, + "custom_model_training_date": "2024-02-01", + "total_pr_summaries_created": 10, + "total_engaged_users": 4 + } + ] + } + ] + } + } + ], + "schema": { + "type": "array", + "items": { + "title": "Copilot Usage Metrics", + "description": "Copilot usage metrics for a given day.", + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format." + }, + "total_active_users": { + "type": "integer", + "description": "The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "total_engaged_users": { + "type": "integer", + "description": "The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint." + }, + "copilot_ide_code_completions": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot editor code completions in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances." + } + } + } + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot code completion metrics for active editors.", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances." + }, + "languages": { + "type": "array", + "description": "Code completion metrics for active languages, for the given editor.", + "items": { + "type": "object", + "description": "Usage metrics for a given language for the given editor for Copilot code completions.", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_suggestions": { + "type": "integer", + "description": "The number of Copilot code suggestions generated for the given editor, for the given language." + }, + "total_code_acceptances": { + "type": "integer", + "description": "The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances." + }, + "total_code_lines_suggested": { + "type": "integer", + "description": "The number of lines of code suggested by Copilot code completions for the given editor, for the given language." + }, + "total_code_lines_accepted": { + "type": "integer", + "description": "The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language." + } + } + } + } + } + } + } + } + } + } + } + }, + "copilot_ide_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in the IDE.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat in the IDE." + }, + "editors": { + "type": "array", + "items": { + "type": "object", + "description": "Copilot Chat metrics, for active editors.", + "properties": { + "name": { + "type": "string", + "description": "Name of the given editor." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the specified editor." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who prompted Copilot Chat in the given editor and model." + }, + "total_chats": { + "type": "integer", + "description": "The total number of chats initiated by users in the given editor and model." + }, + "total_chat_insertion_events": { + "type": "integer", + "description": "The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor." + }, + "total_chat_copy_events": { + "type": "integer", + "description": "The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor." + } + } + } + } + } + } + } + } + }, + "copilot_dotcom_chat": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot Chat in github.com", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once." + }, + "models": { + "type": "array", + "description": "List of model metrics for a custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model (if applicable)." + }, + "total_engaged_users": { + "type": "integer", + "description": "Total number of users who prompted Copilot Chat on github.com at least once for each model." + }, + "total_chats": { + "type": "integer", + "description": "Total number of chats initiated by users on github.com." + } + } + } + } + } + }, + "copilot_dotcom_pull_requests": { + "type": [ + "object", + "null" + ], + "description": "Usage metrics for Copilot for pull requests.", + "additionalProperties": true, + "properties": { + "total_engaged_users": { + "type": "integer", + "description": "The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once." + }, + "repositories": { + "type": "array", + "description": "Repositories in which users used Copilot for Pull Requests to generate pull request summaries", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Repository name" + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository." + }, + "models": { + "type": "array", + "description": "List of model metrics for custom models and the default model.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the language used for Copilot code completion suggestions, for the given editor." + }, + "is_custom_model": { + "type": "boolean", + "description": "Indicates whether a model is custom or default." + }, + "custom_model_training_date": { + "type": [ + "string", + "null" + ], + "description": "The training date for the custom model." + }, + "total_pr_summaries_created": { + "type": "integer", + "description": "The number of pull request summaries generated using Copilot for Pull Requests in the given repository." + }, + "total_engaged_users": { + "type": "integer", + "description": "The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model." + } + } + } + } + } + } + } + } + } + }, + "required": [ + "date" + ], + "additionalProperties": true + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.
\nNote
\n\nThis endpoint will only return results for a given day if the team had five or more members with active Copilot licenses on that day, as evaluated at the end of that day.
\nThe response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,\nand the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,\nthey must have telemetry enabled in their IDE.
\nTo access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.\nOnly organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.
\nOAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot
, read:org
, or read:enterprise
scopes to use this endpoint.
OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Copilot Usage Merics API setting is disabled at the organization or enterprise level.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "copilot-usage": [ { "serverUrl": "https://api.github.com", @@ -374750,7 +377180,7 @@ } ], "previews": [], - "descriptionHTML": "List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
List organizations for the authenticated user.
\nFor OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org
scope, you can publicize your organization membership with user
scope, etc.). Therefore, this API requires at least user
or read:org
scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden
response.
Note
\n\nRequests using a fine-grained access token will receive a 200 Success
response with an empty list.