New translation batch for pt (#33136)
This commit is contained in:
@@ -105,6 +105,7 @@ translations/pt-BR/content/codespaces/customizing-your-codespace/setting-your-ti
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/creating-a-codespace.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/renaming-a-codespace.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md,file deleted because it no longer exists in main
|
||||
@@ -122,6 +123,7 @@ translations/pt-BR/content/codespaces/troubleshooting/troubleshooting-port-forwa
|
||||
translations/pt-BR/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/codespaces/troubleshooting/working-with-support-for-codespaces.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md,file deleted because it no longer exists in main
|
||||
@@ -185,6 +187,7 @@ translations/pt-BR/content/organizations/restricting-access-to-your-organization
|
||||
translations/pt-BR/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/organizations/restricting-access-to-your-organizations-data/index.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/rest/reference/actions.md,file deleted because it no longer exists in main
|
||||
translations/pt-BR/content/rest/reference/activity.md,file deleted because it no longer exists in main
|
||||
@@ -494,7 +497,6 @@ translations/pt-BR/content/actions/learn-github-actions/understanding-github-act
|
||||
translations/pt-BR/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/adding-labels-to-issues.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/manually-running-a-workflow.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
|
||||
@@ -728,6 +730,7 @@ translations/pt-BR/content/code-security/security-advisories/global-security-adv
|
||||
translations/pt-BR/content/code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/repository-security-advisories/creating-a-repository-security-advisory.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-overview/about-the-security-overview.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-overview/viewing-the-security-overview.md,rendering error
|
||||
@@ -915,6 +918,7 @@ translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-
|
||||
translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches.md,rendering error
|
||||
translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md,rendering error
|
||||
translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks.md,rendering error
|
||||
translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch.md,rendering error
|
||||
translations/pt-BR/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md,rendering error
|
||||
translations/pt-BR/content/repositories/creating-and-managing-repositories/cloning-a-repository.md,rendering error
|
||||
translations/pt-BR/content/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template.md,rendering error
|
||||
@@ -928,7 +932,7 @@ translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-f
|
||||
translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md,rendering error
|
||||
translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/about-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,broken liquid tags
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/comparing-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error
|
||||
@@ -955,14 +959,12 @@ translations/pt-BR/content/rest/enterprise-admin/pre-receive-hooks.md,broken liq
|
||||
translations/pt-BR/content/rest/enterprise-admin/repo-pre-receive-hooks.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/enterprise-admin/scim.md,rendering error
|
||||
translations/pt-BR/content/rest/enterprise-admin/users.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/guides/getting-started-with-the-rest-api.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/guides/traversing-with-pagination.md,rendering error
|
||||
translations/pt-BR/content/rest/guides/working-with-comments.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/migrations/source-imports.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/overview/api-previews.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/other-authentication-methods.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/permissions-required-for-github-apps.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/resources-in-the-rest-api.md,rendering error
|
||||
translations/pt-BR/content/rest/packages.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/scim.md,rendering error
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Removing a label when a card is added to a project board column
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a {% data variables.projects.projects_v1_board %}.'
|
||||
title: Remover uma etiqueta quando um cartão é adicionado à coluna de um quadro de projeto
|
||||
intro: 'É possível usar o {% data variables.product.prodname_actions %} para remover automaticamente um rótulo quando um problema ou uma solicitação de pull é adicionada a uma coluna específica em um {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
@@ -13,23 +13,27 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
shortTitle: Remove label when adding card
|
||||
ms.openlocfilehash: d86d9e5ad198c9cf8811b47f2a6c8a7114e20104
|
||||
ms.sourcegitcommit: 4d6d3735d32540cb6de3b95ea9a75b8b247c580d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148185626'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
## Introdução
|
||||
|
||||
## Introduction
|
||||
Este tutorial demonstra como usar a [ação `actions/github-script`](https://github.com/marketplace/actions/github-script) com uma condicional para remover um rótulo de problemas e solicitações de pull adicionados a uma coluna específica em um {% data variables.projects.projects_v1_board %}. Por exemplo, você pode remover o rótulo `needs review` quando os cartões de projeto são movidos para a coluna `Done`.
|
||||
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) along with a conditional to remove a label from issues and pull requests that are added to a specific column on a {% data variables.projects.projects_v1_board %}. For example, you can remove the `needs review` label when project cards are moved into the `Done` column.
|
||||
No tutorial, primeiro, você criará um arquivo de fluxo de trabalho que usa a [ação `actions/github-script`](https://github.com/marketplace/actions/github-script). Então, você personalizará o fluxo de trabalho para atender às suas necessidades.
|
||||
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
## Criar o fluxo de trabalho
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. Choose a {% data variables.projects.projects_v1_board %} that belongs to the repository. This workflow cannot be used with projects that belong to users or organizations. You can use an existing {% data variables.projects.projects_v1_board %}, or you can create a new {% data variables.projects.projects_v1_board %}. For more information about creating a project, see "[Creating a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board)."
|
||||
2. Escolha um {% data variables.projects.projects_v1_board %} que pertença ao repositório. Este fluxo de trabalho não pode ser usado com projetos que pertencem a usuários ou organizações. É possível usar um {% data variables.projects.projects_v1_board %} existente ou criar um {% data variables.projects.projects_v1_board %}. Para saber como criar um projeto, confira "[Criar um {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board)".
|
||||
3. {% data reusables.actions.make-workflow-file %}
|
||||
4. Copy the following YAML contents into your workflow file.
|
||||
4. Copie o seguinte conteúdo YAML para o arquivo do fluxo de trabalho.
|
||||
|
||||
```yaml{:copy}
|
||||
name: Remove a label
|
||||
@@ -58,28 +62,28 @@ In the tutorial, you will first make a workflow file that uses the [`actions/git
|
||||
})
|
||||
```
|
||||
|
||||
5. Customize the parameters in your workflow file:
|
||||
- In `github.event.project_card.column_id == '12345678'`, replace `12345678` with the ID of the column where you want to un-label issues and pull requests that are moved there.
|
||||
5. Personalize os parâmetros no seu arquivo do fluxo de trabalho:
|
||||
- Em `github.event.project_card.column_id == '12345678'`, substitua `12345678` pela ID da coluna em que deseja remover o rótulo de solicitações de pull e problemas que são movidos para ela.
|
||||
|
||||
To find the column ID, navigate to your {% data variables.projects.projects_v1_board %}. Next to the title of the column, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} then click **Copy column link**. The column ID is the number at the end of the copied link. For example, `24687531` is the column ID for `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
Para encontrar a ID da coluna, acesse o {% data variables.projects.projects_v1_board %}. Ao lado do título da coluna, clique em {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} e clique em **Copiar link da coluna**. O ID da coluna é o número no final do link copiado. Por exemplo, `24687531` é a ID da coluna para `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
|
||||
If you want to act on more than one column, separate the conditions with `||`. For example, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` will act whenever a project card is added to column `12345678` or column `87654321`. The columns may be on different project boards.
|
||||
- Change the value for `name` in the `github.rest.issues.removeLabel()` function to the name of the label that you want to remove from issues or pull requests that are moved to the specified column(s). For more information on labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
Caso deseje modificar mais de uma coluna, separe as condições com `||`. Por exemplo, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` funcionará sempre que um cartão de projeto for adicionado à coluna `12345678` ou à coluna `87654321`. As colunas podem estar em diferentes quadros de projetos.
|
||||
- Altere o valor de `name` na função `github.rest.issues.removeLabel()` para o nome do rótulo que você deseja remover dos problemas ou das solicitações de pull movidas para as colunas especificadas. Para obter mais informações sobre rótulos, confira "[Como gerenciar rótulos](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
6. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## Testing the workflow
|
||||
## Testar o fluxo de trabalho
|
||||
|
||||
Every time a project card on a {% data variables.projects.projects_v1_board %} in your repository moves, this workflow will run. If the card is an issue or a pull request and is moved into the column that you specified, then the workflow will remove the specified label from the issue or a pull request. Cards that are notes will not be affected.
|
||||
Sempre que um cartão de projeto em um {% data variables.projects.projects_v1_board %} no repositório é movido, este fluxo de trabalho é executado. Se o cartão for um problema ou uma solicitação de pull e for movido para a coluna especificada, o fluxo de trabalho removerá o rótulo especificado do problema ou da solicitação de pull. Os cartões que são observações que não serão afetadas.
|
||||
|
||||
Test your workflow out by moving an issue on your {% data variables.projects.projects_v1_board %} into the target column.
|
||||
Teste o fluxo de trabalho movendo um problema no {% data variables.projects.projects_v1_board %} para a coluna de destino.
|
||||
|
||||
1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. Label the issue with the label that you want the workflow to remove. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
3. Add the issue to the {% data variables.projects.projects_v1_board %} column that you specified in your workflow file. For more information, see "[Adding issues and pull requests to a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)."
|
||||
4. To see the workflow run that was triggered by adding the issue to the project, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
5. When the workflow completes, the issue that you added to the project column should have the specified label removed.
|
||||
1. Abra um problema no seu repositório. Para obter mais informações, confira "[Como criar um problema](/github/managing-your-work-on-github/creating-an-issue)".
|
||||
2. Dê ao problema o rótulo que você deseja que o fluxo de trabalho remova. Para obter mais informações, confira "[Como gerenciar rótulos](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
3. Adicione o problema à coluna do {% data variables.projects.projects_v1_board %} especificada no arquivo do fluxo de trabalho. Para obter mais informações, confira "[Adicionar problemas e solicitações de pull a um {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)".
|
||||
4. Para ver a execução do fluxo de trabalho que foi acionada adicionando o problema ao projeto, visualize o histórico da execução do seu fluxo de trabalho. Para obter mais informações, confira "[Como ver o histórico de execução do fluxo de trabalho](/actions/managing-workflow-runs/viewing-workflow-run-history)".
|
||||
5. Quando o fluxo de trabalho for concluído, o problema adicionado à coluna do projeto deverá ter o rótulo especificado removido.
|
||||
|
||||
## Next steps
|
||||
## Próximas etapas
|
||||
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
- Para saber sobre mais coisas que podem ser feitas com a ação `actions/github-script`, confira a [documentação da ação `actions/github-script`](https://github.com/marketplace/actions/github-script).
|
||||
- [Pesquise o GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) para ver exemplos de fluxos de trabalho que usam essa ação.
|
||||
|
||||
@@ -16,6 +16,26 @@ type: tutorial
|
||||
|
||||
{% data reusables.actions.about-runner-groups %} {% ifversion fpt %}For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/using-github-hosted-runners/controlling-access-to-larger-runners).{% endif %}
|
||||
|
||||
### Default group for {% data variables.actions.hosted_runner %}s
|
||||
|
||||
Organizations and enterprises with access to {% data variables.actions.hosted_runner %}s will automatically receive a default runner group called "Default Larger Runners" that includes 4 runners of varying sizes. The runners in this group are pre-configured and ready for immediate use. In order to use the runners in this group, you will need to add the label corresponding to the runner of your choice to your workflow file. See the table below for labels. For more information on how to use labels, see "[Running jobs on your runner](/actions/using-github-hosted-runners/using-larger-runners#running-jobs-on-your-runner)."
|
||||
|
||||
|
||||
#### Default Runners
|
||||
|
||||
|Description | Label | Image |
|
||||
| ------- | ------- | ------ |
|
||||
| 4-cores Ubuntu Runner | `ubuntu-latest-4-cores` | Ubuntu - Latest |
|
||||
| 8-cores Ubuntu Runner | `ubuntu-latest-8-cores` | Ubuntu - Latest |
|
||||
| 16-cores Ubuntu Runner | `ubuntu-latest-16-cores` | Ubuntu - Latest |
|
||||
| 8-cores Windows Runner | `windows-latest-8-cores` | Windows Server - Latest |
|
||||
|
||||
The default {% data variables.actions.hosted_runner %} group is created at the billing entity level. If your organization is part of an enterprise account, the group will be managed on the enterprise level. If your organization does not fall under an enterprise, the group is managed on the organization level.
|
||||
|
||||
You will not be billed for these runners until you use them in your workflows. Once these runners are used, billing works as it normally does. For more information on billing, see "[Using {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners#understanding-billing)."
|
||||
|
||||
The default access for a {% data variables.actions.hosted_runner %} group at the enterprise level is set to automatically share with all organizations in the enterprise, but not all repositories. Organization admins will need to share the default {% data variables.actions.hosted_runner %} group with each repository separately. For {% data variables.actions.hosted_runner %} groups at the organization level, the default access is set to automatically share the group with all repositories. For more information on how to change access policies, and where to view the default {% data variables.actions.hosted_runner %} group, see "[Changing the access policy of a runner group](#changing-the-access-policy-of-a-runner-group)."
|
||||
|
||||
{% ifversion ghec or ghes or ghae %}
|
||||
|
||||
## Creating a runner group for an organization
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Criando uma consultoria de segurança do repositório
|
||||
intro: Você pode criar um projeto de consultoria de segurança para discutir e corrigir de forma privada uma vulnerabilidade de segurança no seu projeto de código aberto.
|
||||
title: Creating a repository security advisory
|
||||
intro: You can create a draft security advisory to privately discuss and fix a security vulnerability in your open source project.
|
||||
redirect_from:
|
||||
- /articles/creating-a-maintainer-security-advisory
|
||||
- /github/managing-security-vulnerabilities/creating-a-maintainer-security-advisory
|
||||
@@ -15,31 +15,31 @@ topics:
|
||||
- Security advisories
|
||||
- Vulnerabilities
|
||||
shortTitle: Create repository advisories
|
||||
ms.openlocfilehash: de22432173f6bf909d001a3f780b0f9943769ec0
|
||||
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/27/2022
|
||||
ms.locfileid: '148113955'
|
||||
---
|
||||
Qualquer pessoa com permissões de administrador em um repositório pode criar uma consultoria de segurança.
|
||||
|
||||
Anyone with admin permissions to a repository can create a security advisory.
|
||||
|
||||
{% data reusables.security-advisory.security-researcher-cannot-create-advisory %}
|
||||
|
||||
## Como criar um aviso de segurança
|
||||
## Creating a security advisory
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %}
|
||||
4. Clique em **Novo rascunho de aviso de segurança** para abrir o formulário de aviso de rascunho.
|
||||

|
||||
5. Digite um título para sua consultoria de segurança.
|
||||
{% data reusables.repositories.security-advisory-edit-details %} {% data reusables.repositories.security-advisory-edit-severity %} {% data reusables.repositories.security-advisory-edit-cwe-cve %} {% data reusables.repositories.security-advisory-edit-description %}
|
||||
11. Clique em **Criar consultoria de segurança de rascunho**.
|
||||

|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-security %}
|
||||
{% data reusables.repositories.sidebar-advisories %}
|
||||
1. Click **New draft security advisory** to open the draft advisory form. The fields marked with an asterisk are required.
|
||||

|
||||
1. Type a title for your security advisory.
|
||||
{% data reusables.repositories.security-advisory-edit-details %}
|
||||
{% data reusables.repositories.security-advisory-edit-severity %}
|
||||
{% data reusables.repositories.security-advisory-edit-cwe-cve %}
|
||||
{% data reusables.repositories.security-advisory-edit-description %}
|
||||
1. Click **Create draft security advisory**.
|
||||

|
||||
|
||||
## Próximas etapas
|
||||
## Next steps
|
||||
|
||||
- Faça um comentário sobre o rascunho da consultoria de segurança para discutir a vulnerabilidade com sua equipe.
|
||||
- Adicione colaboradores à consultora de segurança. Para obter mais informações, confira "[Como adicionar um colaborador a uma consultoria de segurança do repositório](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)".
|
||||
- Colaborar de modo particular com a correção da vulnerabilidade em uma bifurcação privada temporária. Para obter mais informações, confira "[Colaboração em um fork privado temporário para resolver uma vulnerabilidade de segurança do repositório](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)".
|
||||
- Adicione indivíduos que deveriam receber crédito por contribuírem para a consultoria de segurança. Para obter mais informações, confira "[Como editar uma consultoria de segurança do repositório](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories)".
|
||||
- Publicar a consultoria de segurança para notificar a sua comunidade sobre a vulnerabilidade de segurança. Para obter mais informações, confira "[Como publicar uma consultoria de segurança do repositório](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)".
|
||||
- Comment on the draft security advisory to discuss the vulnerability with your team.
|
||||
- Add collaborators to the security advisory. For more information, see "[Adding a collaborator to a repository security advisory](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)."
|
||||
- Privately collaborate to fix the vulnerability in a temporary private fork. For more information, see "[Collaborating in a temporary private fork to resolve a repository security vulnerability](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)."
|
||||
- Add individuals who should receive credit for contributing to the security advisory. For more information, see "[Editing a repository security advisory](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories)."
|
||||
- Publish the security advisory to notify your community of the security vulnerability. For more information, see "[Publishing a repository security advisory](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)."
|
||||
|
||||
@@ -49,7 +49,7 @@ When you create a codespace, a number of steps happen to create and connect you
|
||||
|
||||
For more information on what happens when you create a codespace, see "[Deep Dive](/codespaces/getting-started/deep-dive)."
|
||||
|
||||
For more information on the lifecycle of a codespace, see "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)."
|
||||
For more information on the lifecycle of a codespace, see "[The codespace lifecycle](/codespaces/getting-started/the-codespace-lifecycle)."
|
||||
|
||||
If you want to use Git hooks for your codespace, then you should set up hooks using the [`devcontainer.json` lifecycle scripts](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts), such as `postCreateCommand`, during step 4. Since your codespace container is created after the repository is cloned, any [git template directory](https://git-scm.com/docs/git-init#_template_directory) configured in the container image will not apply to your codespace. Hooks must instead be installed after the codespace is created. For more information on using `postCreateCommand`, see the [`devcontainer.json` reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
|
||||
@@ -98,5 +98,5 @@ You can publish an unpublished codespace from the "Your codespaces" page on {% d
|
||||
## Further reading
|
||||
|
||||
- "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)"
|
||||
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"
|
||||
- "[The codespace lifecycle](/codespaces/getting-started/the-codespace-lifecycle)"
|
||||
- "[Using source control in your codespace](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace)"
|
||||
@@ -7,7 +7,6 @@ versions:
|
||||
topics:
|
||||
- Codespaces
|
||||
children:
|
||||
- /the-codespace-lifecycle
|
||||
- /developing-in-a-codespace
|
||||
- /creating-a-codespace-for-a-repository
|
||||
- /creating-a-codespace-from-a-template
|
||||
|
||||
@@ -105,4 +105,4 @@ When you restart a codespace you can choose to open it in {% data variables.prod
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"
|
||||
- "[The codespace lifecycle](/codespaces/getting-started/the-codespace-lifecycle)"
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
---
|
||||
title: O ciclo de vida do codespace
|
||||
intro: 'É possível realizar o desenvolvimento em um ambiente do {% data variables.product.prodname_github_codespaces %} e manter seus dados ao longo de todo o ciclo de vida do codespace.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: overview
|
||||
topics:
|
||||
- Codespaces
|
||||
- Developer
|
||||
redirect_from:
|
||||
- /codespaces/developing-in-codespaces/codespaces-lifecycle
|
||||
ms.openlocfilehash: 660ced63e34c6de8025c65946542baca43534cfe
|
||||
ms.sourcegitcommit: 3ff64a8c8cf70e868c10105aa6bbf6cd4f78e4d3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148180792'
|
||||
---
|
||||
## Sobre o ciclo de vida de um codespace
|
||||
|
||||
O ciclo de vida de um codespace começa quando você cria um código e termina quando você o exclui. Você pode desconectar-se e reconectar-se a um codespace ativo sem afetar seus processos em execução. Você pode parar e reiniciar o processo sem perder as alterações feitas no seu projeto.
|
||||
|
||||
## Criar um codespace
|
||||
|
||||
Quando você deseja trabalhar em um projeto, você pode optar por criar um novo codespaceou abrir um codespace já existente. Você tem a opção de criar um codespace com base em um branch do projeto sempre que realizar o desenvolvimento no {% data variables.product.prodname_github_codespaces %} ou manter um codespace de longo prazo para um recurso. {% data reusables.codespaces.starting-new-project-template %} Para saber mais, confira "[Como criar um codespace para um repositório](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)" e "[Como criar um codespace com base em um modelo](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template)".
|
||||
|
||||
{% data reusables.codespaces.max-number-codespaces %} Da mesma forma, se você atingir o número máximo de codespaces ativos e tentar iniciar outro, será solicitado que você encerre um de seus codespaces ativos.
|
||||
|
||||
Se você escolher criar um novo codespace, sempre que você trabalhar em um projeto, você deverá fazer push das alterações regularmente para que todos os novos commits estejam em {% data variables.product.prodname_dotcom %}. Se você optar por usar um codespace de longo prazo para o seu projeto, você deverá retirá-lo do branch padrão do repositório cada vez que começar a trabalhar no seu codespace para que seu ambiente tenha os commits mais recentes. Esse fluxo de trabalho é muito parecido como se você estivesse trabalhando com um projeto na sua máquina local.
|
||||
|
||||
{% data reusables.codespaces.prebuilds-crossreference %}
|
||||
|
||||
## Salvar alterações em um codespace
|
||||
|
||||
Ao conectar-se a um código através da web, a gravação automática é habilitada automaticamente para o editor da web e configurada para salvar as alterações após um atraso. Ao conectar-se a um codespace por meio de {% data variables.product.prodname_vscode %} em execução no seu computador, você deverá habilitar o salvamento automático. Para obter mais informações, confira [Salvar/Salvar Automaticamente](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) na documentação do {% data variables.product.prodname_vscode %}.
|
||||
|
||||
O trabalho será salvo em uma máquina virtual na nuvem. É possível fechar e parar um codespace e retornar ao trabalho salvo mais tarde. Se você tiver alterações não salvas, seu editor solicitará que você as salve antes de sair. No entanto, se o codespace for excluído, o trabalho também será. Para manter seu trabalho, faça commit das alterações e as envie por push ao repositório remoto ou publique-o em um novo repositório remoto, caso o codespace tenha sido criado com base em um modelo. Para obter mais informações, confira "[Como usar o controle do código-fonte no seu codespace](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace)".
|
||||
|
||||
## Limites de tempo do {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
Se você não interagir com o seu codespace em execução ou se você sair do seu codespace sem pará-lo explicitamente, ele irá expirar após um determinado tempo de inatividade e irá parar de executar. Por padrão, um código irá expirar após 30 minutos de inatividade. No entanto, você pode personalizar a duração do período de tempo limite para novos codespaces que você criar. Para obter mais informações sobre como definir o período de tempo limite padrão para seus codespaces, confira "[Como definir o período de tempo limite para o {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)". Para obter mais informações sobre como interromper um codespace, confira "[Como interromper um codespace](#stopping-a-codespace)".
|
||||
|
||||
Quando o tempo de um codespace chega ao limite, os seus dados são preservados da última vez que suas alterações foram salvas. Para obter mais informações, confira "[Como salvar alterações em um codespace](#saving-changes-in-a-codespace)".
|
||||
|
||||
## Reconstruindo um codespace
|
||||
|
||||
Você pode reconstruir um codespace para implementar alterações na configuração do contêiner de desenvolvimento. Para a maioria dos usos, você pode criar um novo codespace como uma alternativa à reconstrução de um codespace. Por padrão, quando você recompila seu codespace, {% data variables.product.prodname_github_codespaces %} reutilizará imagens do cache para acelerar o processo de recompilação. Como alternativa, você pode executar uma recompilação completa, que limpa o cache e recria o contêiner com imagens novas.
|
||||
|
||||
Para obter mais informações, confira "[Introdução aos contêineres de desenvolvimento](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)" e "[Executar uma recompilação completa de um contêiner](/codespaces/codespaces-reference/performing-a-full-rebuild-of-a-container)".
|
||||
|
||||
## Interrompendo um codespace
|
||||
|
||||
{% data reusables.codespaces.stopping-a-codespace %} Para saber mais, confira "[Parar e iniciar um codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)".
|
||||
|
||||
## Excluir um codespace
|
||||
|
||||
Você pode criar um codespace para uma tarefa específica e, em seguida, excluir com segurança o codespace depois que você fizer push das alterações em um branch remoto.
|
||||
|
||||
Se você tentar excluir um codespace com commits git que não foram enviados por push, o seu editor irá notificar você de que você tem alterações que não foram enviadas por push para um branch remoto. Você pode fazer push de todas as alterações desejadas e, em seguida, excluir o seu codespace ou continuar excluindo o seu codespace e todas as alterações que não foram enviadas por commit. Você também pode exportar seu codespace para um novo branch sem criar um novo codespace. Para obter mais informações, confira "[Como exportar alterações para um branch](/codespaces/troubleshooting/exporting-changes-to-a-branch)".
|
||||
|
||||
Os codespaces interrompidos que permanecerem inativos por um período especificado serão excluídos automaticamente. Por padrão, os codespaces inativos são excluídos após 30 dias, mas é possível personalizar o período de retenção deles. Para obter mais informações, confira "[Como configurar a exclusão automática de codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)".
|
||||
|
||||
Se você criar um codespace, ele continuará acumulando encargos de armazenamento até ser excluído, independentemente de estar ativo ou ter sido interrompido. Para obter mais informações, confira "[Sobre a cobrança do {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#billing-for-storage-usage)". A exclusão de um codespace não reduz o valor atual faturável do {% data variables.product.prodname_github_codespaces %}, que é acumulado durante cada ciclo de cobrança mensal. Para obter mais informações, confira "[Como exibir o uso do {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)".
|
||||
|
||||
Para obter mais informações sobre como excluir um codespace, confira "[Como excluir um codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)".
|
||||
|
||||
## Perder a conexão ao usar o {% data variables.product.prodname_github_codespaces %}
|
||||
|
||||
O {% data variables.product.prodname_github_codespaces %} é um ambiente de desenvolvimento baseado na nuvem que requer uma conexão com a Internet. Se você perder a conexão à internet enquanto trabalha em um codespace, você não poderá acessar seu codespace. No entanto, todas as alterações não comprometidas serão salvas. Quando você tiver acesso a uma conexão à internet novamente, você poderá conectar-se ao seu codespace no mesmo estado em que ele foi deixado. Se você tiver uma conexão instável, você deverá se fazer envio por commit e push das suas alterações com frequência.
|
||||
|
||||
Se você geralmente trabalha offline, é possível usar o arquivo `devcontainer.json` com a [extensão "Contêineres de desenvolvimento"](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) para o {% data variables.product.prodname_vscode_shortname %} a fim de compilar e anexar arquivos a um contêiner de desenvolvimento local do seu repositório. Para obter mais informações, confira [Desenvolvimento em um contêiner](https://code.visualstudio.com/docs/remote/containers) na documentação do {% data variables.product.prodname_vscode %}.
|
||||
@@ -7,6 +7,7 @@ versions:
|
||||
ghec: '*'
|
||||
children:
|
||||
- /quickstart
|
||||
- /the-codespace-lifecycle
|
||||
- /deep-dive
|
||||
ms.openlocfilehash: e0a845403562bbe046b81e52893a9ff59a1fbf1c
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
|
||||
@@ -8,7 +8,7 @@ introLinks:
|
||||
featuredLinks:
|
||||
guides:
|
||||
- /codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization
|
||||
- /codespaces/developing-in-codespaces/the-codespace-lifecycle
|
||||
- /codespaces/getting-started/the-codespace-lifecycle
|
||||
- /codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project
|
||||
- /codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces
|
||||
- /billing/managing-billing-for-github-codespaces/about-billing-for-codespaces
|
||||
|
||||
@@ -11,12 +11,12 @@ topics:
|
||||
- Codespaces
|
||||
redirect_from:
|
||||
- /codespaces/troubleshooting/troubleshooting-codespaces-clients
|
||||
ms.openlocfilehash: 682160b3b92960487c0709fc411fc2143d18f415
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 35bd9dd859612307c1f9e49ea8ed9771e4f5efcd
|
||||
ms.sourcegitcommit: bf4e3590ab71b0a1bfa8d74b00183f63193acbbf
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159309'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148186168'
|
||||
---
|
||||
{% jetbrains %}
|
||||
|
||||
@@ -54,7 +54,7 @@ Se o problema não for corrigido no {% data variables.product.prodname_vscode %}
|
||||
|
||||
## Solução de problemas do {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
Ao abrir um codespace no aplicativo da área de trabalho {% data variables.product.prodname_vscode_shortname %}, você pode observar algumas diferenças em comparação com o trabalho em um workspace local, mas a experiência deve ser semelhante.
|
||||
Ao abrir um codespace no aplicativo da área de trabalho {% data variables.product.prodname_vscode_shortname %}, você pode observar algumas diferenças em comparação com o trabalho em um workspace local, mas a experiência deve ser semelhante.
|
||||
|
||||
Se houver problemas, verifique se há problemas conhecidos e registre novos problemas em log com a experiência do {% data variables.product.prodname_vscode_shortname %} no repositório [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces).
|
||||
|
||||
@@ -104,6 +104,31 @@ Veja a seguir algumas diretrizes como um ponto de partida inicial, que você pod
|
||||
|
||||
1. Clique em **Salvar e reiniciar**.
|
||||
|
||||
### O cliente não pode ser aberto no MacOS Ventura
|
||||
|
||||
No MacOS Ventura, na primeira tentativa de conexão com um codespace do JetBrains Gateway, uma mensagem pode ser exibida informando que o aplicativo cliente JetBrains "está danificado e não pode ser aberto".
|
||||
|
||||
<img src="/assets/images/help/codespaces/jetbrains-ventura-error1.png" alt="Screenshot of the 'cannot be opened' error message" style="width:230px;"/>
|
||||
|
||||
Se isso acontecer:
|
||||
|
||||
1. Clique em **Cancelar** para ignorar essa mensagem.
|
||||
1. Clique no ícone da Apple, no canto superior esquerdo da tela, e em **Configurações do sistema**.
|
||||
1. Clique em **Privacidade e segurança** e role para baixo até a seção "Segurança".
|
||||
|
||||

|
||||
|
||||
Você verá uma mensagem informando que o cliente JetBrains foi bloqueado para uso.
|
||||
|
||||
1. Clique em **Abrir mesmo assim** para adicionar o cliente JetBrains aos aplicativos reconhecidos.
|
||||
A mensagem será exibida novamente, mas agora com um botão **Abrir**.
|
||||
|
||||
<img src="/assets/images/help/codespaces/jetbrains-ventura-error2.png" alt="Screenshot of the error message with an 'Open' button" style="width:230px;"/>
|
||||
|
||||
1. Clique em **Cancelar** novamente.
|
||||
1. Volte ao aplicativo JetBrains Gateway e conecte-se ao codespace necessário novamente.
|
||||
Agora o cliente JetBrains será aberto com sucesso. Depois de autorizar a execução do aplicativo cliente no Mac, você não verá mais a mensagem ao se conectar posteriormente aos codespaces.
|
||||
|
||||
### Problemas de conexão SSH
|
||||
|
||||
Para se conectar por meio do servidor SSH em execução no codespace, você precisa ter uma chave SSH no diretório `~/.ssh` (MacOS e Linux) ou no diretório `%HOMEPATH%\.ssh` (Windows) que já tenha sido adicionada à conta do {% data variables.product.prodname_dotcom %}. Se você não tiver chaves neste diretório, a {% data variables.product.prodname_cli %} vai gerá-las. Para obter mais informações, confira "[Como adicionar uma nova chave SSH à sua conta do {% data variables.product.prodname_dotcom %}](/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account?platform=windows&tool=webui)".
|
||||
@@ -115,4 +140,3 @@ Se você encontrar problemas com a validação de chave, tente atualizar a vers
|
||||
Para obter ajuda com problemas específicos do IDE do JetBrains que você está usando ou o aplicativo JetBrains Gateway, confira "[Suporte ao produto](https://www.jetbrains.com/support/)" no site do JetBrains.
|
||||
|
||||
{% endjetbrains %}
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: Alterar repositório remote de URL no GitHub Desktop
|
||||
intro: 'É possível alterar a URL remota do repositório com o qual você estiver trabalhando via {% data variables.product.prodname_desktop %}. Você pode fazer isso em caso de alteração do nome do repositório, do nome do usuário ou do nome da organização proprietária do repositório.'
|
||||
redirect_from:
|
||||
- /desktop/contributing-to-projects/changing-a-remotes-url-from-github-desktop
|
||||
- /desktop/contributing-to-projects/changing-a-remote-s-url-from-github-desktop
|
||||
- /desktop/contributing-and-collaborating-using-github-desktop/changing-a-remotes-url-from-github-desktop
|
||||
versions:
|
||||
fpt: '*'
|
||||
shortTitle: Change a remote's URL
|
||||
ms.openlocfilehash: e06ea68ead9ab79c44d7aaf96f48d6645232b496
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146058473'
|
||||
---
|
||||
{% mac %}
|
||||
|
||||
{% data reusables.desktop.mac-repository-settings-menu %}
|
||||
2. Clique em **Remoto** e, em **Repositório remoto primário**, digite a URL desejada.
|
||||
 {% data reusables.desktop.repository-settings-save %}
|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||
{% data reusables.desktop.windows-repository-settings-menu %}
|
||||
2. Clique em **Remoto** e, em **Repositório remoto primário**, digite a URL desejada.
|
||||
 {% data reusables.desktop.repository-settings-save %}
|
||||
|
||||
{% endwindows %}
|
||||
@@ -10,7 +10,7 @@ children:
|
||||
- /viewing-a-pull-request-in-github-desktop
|
||||
- /viewing-and-re-running-checks-in-github-desktop
|
||||
- /configuring-notifications-in-github-desktop
|
||||
- /changing-a-remotes-url-from-github-desktop
|
||||
- /changing-the-remote-url-for-a-repository-from-github-desktop
|
||||
shortTitle: Work with your remote repo
|
||||
ms.openlocfilehash: 60c2f41546ff085ea8f8d56142da6a3c7a81ebae
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
|
||||
@@ -7,12 +7,12 @@ redirect_from:
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ms.openlocfilehash: bba9137fc39c1bc101a75650dcea03e651d37fff
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.openlocfilehash: 27f11aa4ae2693bcc336ecdf4cbfb68d8679d743
|
||||
ms.sourcegitcommit: 74c60a4564bcc17e47b5a67941ac6d9fe13b6a5c
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145083955'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148186160'
|
||||
---
|
||||
## Para aplicativos GitHub
|
||||
|
||||
@@ -39,7 +39,7 @@ Para obter informações sobre como encontrar os aplicativos para usá-los, conf
|
||||
|
||||
## Para ações no GitHub
|
||||
|
||||
Ações com {% octicon "verified" aria-label="The verified badge" %} ou com o selo de criador verificado indicam que {% data variables.product.prodname_dotcom %} verificou o criador da ação como uma organização parceira.
|
||||
Ações com o {% octicon "verified" aria-label="The verified badge" %} ou com o selo de criador verificado indicam que o {% data variables.product.prodname_dotcom %} verificou o criador da ação como uma organização parceira. Os parceiros podem enviar um email para <a href="mailto:partnerships@github.com">partnerships@github.com</a> a fim de solicitar o selo de criador verificado.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
title: Configurar remote para bifurcação
|
||||
intro: 'Você deve configurar um remoto que aponta para o repositório upstream no Git para [sincronizar alterações realizadas em um fork](/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) com o repositório original. Isso também permite sincronizar alterações feitas no repositório original com a bifurcação.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/working-with-forks/configuring-a-remote-for-a-fork
|
||||
- /articles/configuring-a-remote-for-a-fork
|
||||
- /github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork
|
||||
- /github/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Configure a remote
|
||||
ms.openlocfilehash: d474b56a9b1881d9511ccf9e239bb54e26967784
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145128017'
|
||||
---
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. Liste o repositório remote configurado no momento para sua bifurcação.
|
||||
```shell
|
||||
$ git remote -v
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_FORK</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_FORK</em>.git (push)
|
||||
```
|
||||
3. Especifique um novo repositório *upstream* remoto que será sincronizado com a bifurcação.
|
||||
```shell
|
||||
$ git remote add upstream https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>.git
|
||||
```
|
||||
4. Verifique o novo repositório upstream especificado para a bifurcação.
|
||||
```shell
|
||||
$ git remote -v
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_FORK</em>.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/<em>YOUR_USERNAME</em>/<em>YOUR_FORK</em>.git (push)
|
||||
> upstream https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>.git (fetch)
|
||||
> upstream https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>.git (push)
|
||||
```
|
||||
@@ -14,7 +14,7 @@ topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /about-forks
|
||||
- /configuring-a-remote-for-a-fork
|
||||
- /configuring-a-remote-repository-for-a-fork
|
||||
- /syncing-a-fork
|
||||
- /allowing-changes-to-a-pull-request-branch-created-from-a-fork
|
||||
- /what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility
|
||||
|
||||
@@ -52,7 +52,7 @@ If the changes from the upstream repository cause conflict then the {% data vari
|
||||
|
||||
## Syncing a fork branch from the command line
|
||||
|
||||
Before you can sync your fork with an upstream repository, you must [configure a remote that points to the upstream repository](/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork) in Git.
|
||||
Before you can sync your fork with an upstream repository, you must configure a remote that points to the upstream repository in Git. For more information, see "[Configuring a remote repository for a fork](/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork)."
|
||||
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. Change the current working directory to your local project.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Alterar o branch-padrão
|
||||
intro: 'Se você tiver mais de um branch no seu repositório, você poderá configurar qualquer branch como o branch-padrão.'
|
||||
title: Changing the default branch
|
||||
intro: 'If you have more than one branch in your repository, you can configure any branch as the default branch.'
|
||||
permissions: People with admin access for a repository can change the default branch for the repository.
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -15,40 +15,38 @@ redirect_from:
|
||||
topics:
|
||||
- Repositories
|
||||
shortTitle: Change the default branch
|
||||
ms.openlocfilehash: e8f88499ab258e5855804288a4f811b38237df97
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145127113'
|
||||
---
|
||||
## Sobre mudar o branch-padrão
|
||||
## About changing the default branch
|
||||
|
||||
Você pode escolher o branch-padrão para um repositório. O branch-padrão é o branch de base para pull requests e commits de código. Para obter mais informações sobre o branch padrão, confira "[Sobre os branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)".
|
||||
You can choose the default branch for a repository. The default branch is the base branch for pull requests and code commits. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
|
||||
|
||||
{% ifversion not ghae %} {% note %}
|
||||
{% ifversion not ghae %}
|
||||
{% note %}
|
||||
|
||||
**Observação**: se você usar a ponte Git-Subversion, a alteração do branch padrão afetará o conteúdo do branch `trunk` e o `HEAD` que você verá ao listar as referências do repositório remoto. Para obter mais informações, confira "[Suporte para clientes do Subversion](/github/importing-your-projects-to-github/support-for-subversion-clients)" e [git-ls-remote](https://git-scm.com/docs/git-ls-remote.html) na documentação do Git.
|
||||
**Note**: If you use the Git-Subversion bridge, changing the default branch will affect your `trunk` branch contents and the `HEAD` you see when you list references for the remote repository. For more information, see "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients)" and [git-ls-remote](https://git-scm.com/docs/git-ls-remote.html) in the Git documentation.
|
||||
|
||||
{% endnote %} {% endif %}
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
Você também pode renomear o branch padrão. Para obter mais informações, confira "[Como renomear um branch](/github/administering-a-repository/renaming-a-branch)".
|
||||
You can also rename the default branch. For more information, see "[Renaming a branch](/github/administering-a-repository/renaming-a-branch)."
|
||||
|
||||
{% data reusables.branches.set-default-branch %}
|
||||
|
||||
## Pré-requisitos
|
||||
## Prerequisites
|
||||
|
||||
Para alterar o branch-padrão, seu repositório deve ter mais de um branch. Para obter mais informações, confira "[Como criar e excluir branches no seu repositório](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)".
|
||||
To change the default branch, your repository must have more than one branch. For more information, see "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)."
|
||||
|
||||
## Alterar o branch-padrão
|
||||
## Changing the default branch
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repository-branches %}
|
||||
1. Em "branch-padrão", à direita do nome do branch-padrão, clique em {% octicon "arrow-switch" aria-label="The switch icon with two arrows" %}.
|
||||

|
||||
1. Use o menu suspenso e clique em um nome de branch.
|
||||

|
||||
1. Clique em **Atualizar**.
|
||||

|
||||
1. Leia o aviso e clique em **Entendi. Atualizar o branch padrão.**
|
||||

|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.repositories.repository-branches %}
|
||||
1. Under "Default branch", to the right of the default branch name, click {% octicon "arrow-switch" aria-label="The switch icon with two arrows" %}.
|
||||

|
||||
1. Use the drop-down, then click a branch name.
|
||||

|
||||
1. Click **Update**.
|
||||

|
||||
1. Read the warning, then click **I understand, update the default branch.**
|
||||

|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Repositories
|
||||
ms.openlocfilehash: 3b6822be6551d43b3af55220ac8f39deec8be1df
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 12265f0627ca6d0feb34244aab1c021b5ae6cc10
|
||||
ms.sourcegitcommit: 9315c7dae9a673a2f8958df7632bf1af206a0bed
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106834'
|
||||
ms.lasthandoff: 12/01/2022
|
||||
ms.locfileid: '148188235'
|
||||
---
|
||||
As pessoas com permissões de administrador ou proprietário podem configurar um arquivo CODEOWNERS em um repositório.
|
||||
|
||||
@@ -85,7 +85,7 @@ Os caminhos dos CODEOWNERS diferenciam maiúsculas de minúsculas, porque {% dat
|
||||
# precedence. When someone opens a pull request that only
|
||||
# modifies JS files, only @js-owner and not the global
|
||||
# owner(s) will be requested for a review.
|
||||
*.js @js-owner
|
||||
*.js @js-owner #This is an inline comment.
|
||||
|
||||
# You can also use email addresses if you prefer. They'll be
|
||||
# used to look up users just like we do for commit author
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Getting started with the REST API
|
||||
intro: 'Learn how to use the {% data variables.product.prodname_dotcom %} REST API.'
|
||||
title: Introdução à API REST
|
||||
intro: 'Saiba como usar a API REST do {% data variables.product.prodname_dotcom %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -10,33 +10,38 @@ topics:
|
||||
- API
|
||||
shortTitle: Using the API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: 66620b01bb488f8c74111b56255ff06702e402e8
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184258'
|
||||
---
|
||||
## Sobre a API REST do {% data variables.product.prodname_dotcom %}
|
||||
|
||||
## About the {% data variables.product.prodname_dotcom %} REST API
|
||||
Este artigo descreve como usar a API REST do {% data variables.product.prodname_dotcom %} com o auxílio da {% data variables.product.prodname_cli %}, do JavaScript ou do cURL. Para obter um guia de início rápido, confira "[Início Rápido para a API REST do GitHub](/rest/quickstart)".
|
||||
|
||||
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or cURL. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
|
||||
Ao fazer uma solicitação à API REST, você especificará um método HTTP e um caminho. Além disso, você também pode especificar cabeçalhos de solicitação e parâmetros de caminho, consulta ou corpo. A API retornará o código de status de resposta, os cabeçalhos de resposta e, potencialmente, um corpo de resposta.
|
||||
|
||||
When you make a request to the REST API, you will specify an HTTP method and a path. Additionally, you might also specify request headers and path, query, or body parameters. The API will return the response status code, response headers, and potentially a response body.
|
||||
A documentação de referência da API REST descreve o método HTTP, o caminho e os parâmetros para cada operação. Ela também exibe exemplos de solicitações e respostas para cada operação. Para mais informações, confira a [documentação de referência de REST](/rest).
|
||||
|
||||
The REST API reference documentation describes the HTTP method, path, and parameters for every operation. It also displays example requests and responses for each operation. For more information, see the [REST reference documentation](/rest).
|
||||
Para obter mais informações sobre as APIs do {% data variables.product.company_short %}, confira "[Sobre as APIs do {% data variables.product.company_short %}](/developers/overview/about-githubs-apis)".
|
||||
|
||||
For more information about {% data variables.product.company_short %}'s APIs, see "[About {% data variables.product.company_short %}'s APIs](/developers/overview/about-githubs-apis)."
|
||||
## Como fazer uma solicitação
|
||||
|
||||
## Making a request
|
||||
|
||||
To make a request, first find the HTTP method and the path for the operation that you want to use. For example, the "Get Octocat" operation uses the `GET` method and the `/octocat` path. For the full reference documentation for this operation, see "[Get Octocat](/rest/meta#get-octocat)."
|
||||
Para fazer uma solicitação, primeiro localize o método HTTP e o caminho da operação que deseja usar. Por exemplo, a operação "Obter Octocat" usa o método `GET` e o caminho `/octocat`. Para obter a documentação de referência completa para esta operação, confira "[Obter Octocat](/rest/meta#get-octocat)".
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You must install {% data variables.product.prodname_cli %} in order to use the commands in the {% data variables.product.prodname_cli %} examples. For installation instructions, see the [{% data variables.product.prodname_cli %} repository](https://github.com/cli/cli#installation).
|
||||
**Observação**: você deve instalar a {% data variables.product.prodname_cli %} para usar os comandos nos exemplos da {% data variables.product.prodname_cli %}. Para obter instruções de instalação, confira o [repositório da {% data variables.product.prodname_cli %}](https://github.com/cli/cli#installation).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If you are not already authenticated to {% data variables.product.prodname_cli %}, you must use the `gh auth login` subcommand to authenticate before making any requests. For more information, see "[Authenticating](#authenticating)."
|
||||
Se ainda não estiver autenticado na {% data variables.product.prodname_cli %}, você deverá usar o subcomando `gh auth login` para autenticar antes de fazer solicitações. Para obter mais informações, confira "[Autenticação](#authenticating)".
|
||||
|
||||
To make a request using {% data variables.product.prodname_cli %}, use the `api` subcommand along with the path. Use the `--method` or `-X` flag to specify the method.
|
||||
Para fazer uma solicitação usando a {% data variables.product.prodname_cli %}, adote o subcomando `api` juntamente com o caminho. Use o sinalizador `--method` ou `-X` para especificar o método.
|
||||
|
||||
```shell
|
||||
gh api /octocat --method GET
|
||||
@@ -48,13 +53,13 @@ gh api /octocat --method GET
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You must install and import `octokit` in order to use the Octokit.js library used in the JavaScript examples. For more information, see [the Octokit.js README](https://github.com/octokit/octokit.js/#readme).
|
||||
**Observação**: você deve instalar e importar `octokit` para usar a biblioteca Octokit.js empregada nos exemplos do JavaScript. Para obter mais informações, confira o arquivo [LEIA-ME do Octokit.js](https://github.com/octokit/octokit.js/#readme).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
To make a request using JavaScript, you can use Octokit.js. For more information, see [the Octokit.js README](https://github.com/octokit/octokit.js/#readme).
|
||||
Para fazer uma solicitação usando JavaScript, você pode usar o Octokit.js. Para obter mais informações, confira o arquivo [LEIA-ME do Octokit.js](https://github.com/octokit/octokit.js/#readme).
|
||||
|
||||
First, create an instance of `Octokit`.{% ifversion ghes or ghae %} Set the base URL to `{% data variables.product.api_url_code %}`. Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
Primeiro, crie uma instância de `Octokit`.{% ifversion ghes or ghae %} Defina a URL de base como `{% data variables.product.api_url_code %}`. Substitua `[hostname]` pelo nome da {% data variables.location.product_location %}.{% endif %}
|
||||
|
||||
```javascript
|
||||
const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
@@ -62,7 +67,7 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
{% endif %}});
|
||||
```
|
||||
|
||||
Then, use the `request` method to make requests. Pass the HTTP method and path as the first argument.
|
||||
Em seguida, use o método `request` para fazer solicitações. Passe o método HTTP e o caminho como o primeiro argumento.
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /octocat", {});
|
||||
@@ -72,9 +77,9 @@ await octokit.request("GET /octocat", {});
|
||||
|
||||
{% curl %}
|
||||
|
||||
Prepend the base URL for the {% data variables.product.prodname_dotcom %} REST API, `{% data variables.product.api_url_code %}`, to the path to get the full URL: `{% data variables.product.api_url_code %}/octocat`.{% ifversion ghes or ghae %} Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
Acrescente a URL base da API REST do {% data variables.product.prodname_dotcom %}, `{% data variables.product.api_url_code %}`, ao caminho para obter a URL completa: `{% data variables.product.api_url_code %}/octocat`.{% ifversion ghes or ghae %} Substitua `[hostname]` pelo nome da {% data variables.location.product_location %}.{% endif %}
|
||||
|
||||
Use the `curl` command in your command line. Use the `--request` or `-X` flag followed by the HTTP method. Use the `--url` flag followed by the full URL.
|
||||
Use o comando `curl` na sua linha de comando. Use o sinalizador `--request` ou `-X`, seguido pelo método HTTP. Use o sinalizador `--url` seguido pela URL completa.
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -83,39 +88,39 @@ curl --request GET \
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you get a message similar to "command not found: curl", you may need to download and install cURL. For more information, see [the cURL project download page](https://curl.se/download.html).
|
||||
**Observação**: se você receber uma mensagem semelhante a "comando não encontrado: curl", talvez seja necessário baixar e instalar o cURL. Para obter mais informações, confira a [página de download do projeto cURL](https://curl.se/download.html).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
Continue reading to learn how to authenticate, send parameters, and use the response.
|
||||
Continue lendo para saber como autenticar, enviar parâmetros e usar a resposta.
|
||||
|
||||
## Authenticating
|
||||
## Autenticação
|
||||
|
||||
Many operations require authentication or return additional information if you are authenticated. Additionally, you can make more requests per hour when you are authenticated.{% cli %} Although some REST API operations are accessible without authentication, you must authenticate to {% data variables.product.prodname_cli %} in order to use the `api` subcommand.{% endcli %}
|
||||
Muitas operações exigem autenticação ou retornam informações adicionais se você estiver autenticado. Além disso, você pode fazer mais solicitações por hora quando está autenticado.{% cli %} Embora algumas operações de API REST estejam acessíveis sem autenticação, você precisa se autenticar na {% data variables.product.prodname_cli %} para usar o subcomando`api`.{% endcli %}
|
||||
|
||||
### About tokens
|
||||
### Sobre os tokens
|
||||
|
||||
You can authenticate your request by adding a token.
|
||||
Você pode autenticar sua solicitação adicionando um token.
|
||||
|
||||
If you want to use the {% data variables.product.company_short %} REST API for personal use, you can create a {% data variables.product.pat_generic %}. The REST API operations used in this article require `repo` scope for {% data variables.product.pat_v1_plural %}{% ifversion pat-v2 %} or, unless otherwise noted, read-only access to public repositories for {% data variables.product.pat_v2 %}s{% endif %}. Other operations may require different scopes{% ifversion pat-v2%} or permissions{% endif %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
Se quiser usar a API REST do {% data variables.product.company_short %} para uso pessoal, crie um {% data variables.product.pat_generic %}. As operações da API REST usadas neste artigo exigem o escopo `repo` para {% data variables.product.pat_v1_plural %}{% ifversion pat-v2 %} ou, a menos que haja outra indicação, o acesso somente leitura a repositórios públicos para {% data variables.product.pat_v2 %}s{% endif %}. Outras operações podem exigir escopos{% ifversion pat-v2%} ou permissões{% endif %} diferentes. Para obter mais informações de como criar um {% data variables.product.pat_generic %}, confira "[Como criar um {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)".
|
||||
|
||||
If you want to use the API on behalf of an organization or another user, {% data variables.product.company_short %} recommends that you use a {% data variables.product.prodname_github_app %}. If an operation is available to {% data variables.product.prodname_github_apps %}, the REST reference documentation for that operation will say "Works with GitHub Apps." The REST API operations used in this article require `issues` read and write permissions for {% data variables.product.prodname_github_apps %}. Other operations may require different permissions. For more information, see "[Creating a GitHub App](/developers/apps/building-github-apps/creating-a-github-app)", "[Authenticating with GitHub Apps](/developers/apps/building-github-apps/authenticating-with-github-apps), and "[Identifying and authorizing users for GitHub Apps](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)."
|
||||
Se você quiser usar a API em nome de uma organização ou de outro usuário, a {% data variables.product.company_short %} recomenda que você use um {% data variables.product.prodname_github_app %}. Se uma operação estiver disponível para um {% data variables.product.prodname_github_apps %}, a documentação de referência de REST para essa operação dirá "Funciona com Aplicativos do GitHub". As operações da API REST usadas neste artigo exigem permissões de leitura e gravação `issues` para {% data variables.product.prodname_github_apps %}. Outras operações podem exigir permissões diferentes. Para obter mais informações, confira "[Como criar um aplicativo GitHub](/developers/apps/building-github-apps/creating-a-github-app)", "[Como se autenticar com o GitHub Apps](/developers/apps/building-github-apps/authenticating-with-github-apps)" e "[Como identificar e autorizar usuários para o GitHub Apps](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)".
|
||||
|
||||
If you want to use the API in a {% data variables.product.prodname_actions %} workflow, {% data variables.product.company_short %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. You can grant permissions to the `GITHUB_TOKEN` with the `permissions` key. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)."
|
||||
Se você quiser usar a API em um fluxo de trabalho de {% data variables.product.prodname_actions %}, a {% data variables.product.company_short %} recomenda que você se autentique com o `GITHUB_TOKEN` interno, em vez de criar um token. Você pode conceder permissões à `GITHUB_TOKEN` com a chave `permissions`. Para obter mais informações, confira "[Autenticação automática de token](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)".
|
||||
|
||||
### Authentication example
|
||||
### Exemplo de autenticação
|
||||
|
||||
{% cli %}
|
||||
|
||||
With {% data variables.product.prodname_cli %}, you don't need to create an access token in advance. Use the `auth login` subcommand to authenticate to {% data variables.product.prodname_cli %}:
|
||||
Com a {% data variables.product.prodname_cli %}, você não precisa criar um token de acesso com antecedência. Use o subcomando `auth login` para se autenticar na {% data variables.product.prodname_cli %}:
|
||||
|
||||
```shell
|
||||
gh auth login
|
||||
```
|
||||
|
||||
You can use the `--scopes` flag to specify what scopes you want. If you want to authenticate with a token that you created, you can use the `--with-token` flag. For more information, see the [{% data variables.product.prodname_cli %} `auth login` documentation](https://cli.github.com/manual/gh_auth_login).
|
||||
Você pode usar o sinalizador `--scopes` para especificar quais escopos deseja. Se você quiser autenticar com um token criado, poderá usar o sinalizador `--with-token`. Para obter mais informações, confira a [documentação da {% data variables.product.prodname_cli %}`auth login`](https://cli.github.com/manual/gh_auth_login).
|
||||
|
||||
{% endcli %}
|
||||
|
||||
@@ -123,17 +128,17 @@ You can use the `--scopes` flag to specify what scopes you want. If you want to
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Treat your access token like a password.
|
||||
**Aviso**: trate seu token de acesso como uma senha.
|
||||
|
||||
To keep your token secure, you can store your token as a secret and run your script through {% data variables.product.prodname_actions %}. For more information, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
Para manter seu token seguro, você pode armazená-lo como um segredo e executar seu script por meio de {% data variables.product.prodname_actions %}. Para obter mais informações, confira "[Segredos criptografados](/actions/security-guides/encrypted-secrets)".
|
||||
|
||||
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and run your script in {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
|
||||
{% ifversion ghec or fpt %}Você também pode armazenar seu token como um segredo do {% data variables.product.prodname_codespaces %} e executar seu script no {% data variables.product.prodname_codespaces %}. Para obter mais informações, confira "[Como gerenciar os segredos criptografados dos seus codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)".{% endif %}
|
||||
|
||||
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
|
||||
Se essas opções não forem possíveis, considere usar outro serviço, como a [CLI do 1Password](https://developer.1password.com/docs/cli/secret-references/), para armazenar seu token com segurança.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
To authenticate with the Octokit.js library, you can pass your token when you create an instance of `Octokit`. Replace `YOUR-TOKEN` with your token.{% ifversion ghes or ghae %} Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
Para se autenticar com a biblioteca Octokit.js, você pode passar seu token ao criar uma instância de `Octokit`. Substitua `YOUR-TOKEN` pelo token.{% ifversion ghes or ghae %} Substitua `[hostname]` pelo nome da {% data variables.location.product_location %}.{% endif %}
|
||||
|
||||
```javascript
|
||||
const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
@@ -148,17 +153,17 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Treat your access token like a password.
|
||||
**Aviso**: trate seu token de acesso como uma senha.
|
||||
|
||||
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of cURL. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
|
||||
Para ajudar a manter sua conta segura, você pode usar a {% data variables.product.prodname_cli %} em vez do cURL. A {% data variables.product.prodname_cli %} cuidará da autenticação para você. Para obter mais informações, confira a versão da {% data variables.product.prodname_cli %} desta página.
|
||||
|
||||
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and use the command line through {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
|
||||
{% ifversion ghec or fpt %} Você também pode armazenar seu token como um segredo do {% data variables.product.prodname_codespaces %} e usar a linha de comando por meio do {% data variables.product.prodname_codespaces %}. Para obter mais informações, confira "[Como gerenciar os segredos criptografados dos seus codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)".{% endif %}
|
||||
|
||||
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
|
||||
Se essas opções não forem possíveis, considere usar outro serviço, como a [CLI do 1Password](https://developer.1password.com/docs/cli/secret-references/), para armazenar seu token com segurança.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
With cURL, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
|
||||
Com o cURL, você enviará um cabeçalho `Authorization` com seu token. Substitua `YOUR-TOKEN` pelo seu token:
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -168,19 +173,19 @@ curl --request GET \
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
**Observação:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
### Authentication example for {% data variables.product.prodname_actions %}
|
||||
### Exemplo de autenticação para {% data variables.product.prodname_actions %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
You can also use the `run` keyword to execute {% data variables.product.prodname_cli %} commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
Você também pode usar a palavra-chave `run` para executar comandos da {% data variables.product.prodname_cli %} em seus fluxos de trabalho de {% data variables.product.prodname_actions %}. Para obter mais informações, confira "[Sintaxe de fluxo de trabalho do GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)".
|
||||
|
||||
Instead of using the `gh auth login` command, pass your token as an environment variable called `GH_TOKEN`. {% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
Em vez de usar o comando `gh auth login`, passe seu token como uma variável de ambiente chamada `GH_TOKEN`. O {% data variables.product.prodname_dotcom %} recomenda que você se autentique com o `GITHUB_TOKEN` interno em vez de criar um token. Se isso não for possível, armazene o token como um segredo e substitua `GITHUB_TOKEN` no exemplo abaixo pelo nome do seu segredo. Para obter mais informações sobre `GITHUB_TOKEN`, confira a "[Autenticação automática de token](/actions/security-guides/automatic-token-authentication)". Para obter mais informações sobre segredos, confira "[Segredos criptografados](/actions/security-guides/encrypted-secrets)".
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -198,18 +203,18 @@ jobs:
|
||||
|
||||
{% javascript %}
|
||||
|
||||
You can also use the `run` keyword to execute your JavaScript scripts in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
Você também pode usar a palavra-chave `run` para executar seus scripts do JavaScript nos fluxos de trabalho de {% data variables.product.prodname_actions %}. Para obter mais informações, confira "[Sintaxe de fluxo de trabalho do GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)".
|
||||
|
||||
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
O {% data variables.product.prodname_dotcom %} recomenda que você se autentique com o `GITHUB_TOKEN` interno em vez de criar um token. Se isso não for possível, armazene o token como um segredo e substitua `GITHUB_TOKEN` no exemplo abaixo pelo nome do seu segredo. Para obter mais informações sobre `GITHUB_TOKEN`, confira a "[Autenticação automática de token](/actions/security-guides/automatic-token-authentication)". Para obter mais informações sobre segredos, confira "[Segredos criptografados](/actions/security-guides/encrypted-secrets)".
|
||||
|
||||
The following example workflow:
|
||||
O seguinte exemplo de fluxo de trabalho:
|
||||
|
||||
1. Checks out the repository content
|
||||
1. Sets up Node.js
|
||||
1. Installs `octokit`
|
||||
1. Stores the value of `GITHUB_TOKEN` as an environment variable called `TOKEN` and runs `.github/actions-scripts/use-the-api.mjs`, which can access that environment variable as `process.env.TOKEN`
|
||||
1. Verifica o conteúdo do repositório
|
||||
1. Configura o Node.js
|
||||
1. Instala `octokit`
|
||||
1. Armazena o valor de `GITHUB_TOKEN` como uma variável de ambiente chamada de `TOKEN` e executa `.github/actions-scripts/use-the-api.mjs`, que pode acessar essa variável de ambiente como `process.env.TOKEN`
|
||||
|
||||
Example workflow:
|
||||
Fluxo de trabalho de exemplo:
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@@ -238,7 +243,7 @@ jobs:
|
||||
node .github/actions-scripts/use-the-api.mjs
|
||||
```
|
||||
|
||||
Example JavaScript script, with the file path `.github/actions-scripts/use-the-api.mjs`:
|
||||
Exemplo de script do JavaScript, com o caminho do arquivo `.github/actions-scripts/use-the-api.mjs`:
|
||||
|
||||
```javascript
|
||||
import { Octokit } from "octokit";
|
||||
@@ -251,7 +256,7 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
await octokit.request("GET /octocat", {});
|
||||
```
|
||||
|
||||
Instead of storing your script in a separate file and executing the script from your workflow, you can use the `actions/github-script` action to run a script. For more information, see the [actions/github-script README](https://github.com/actions/github-script).
|
||||
Em vez de armazenar o script em um arquivo separado e executar o script do seu fluxo de trabalho, você pode usar a ação `actions/github-script` para executar um script. Para obter mais informações, confira o arquivo [actions/github-script README](https://github.com/actions/github-script).
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -270,9 +275,9 @@ jobs:
|
||||
|
||||
{% curl %}
|
||||
|
||||
You can also use the `run` keyword to execute cURL commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
Você também pode usar a palavra-chave `run` para executar comandos cURL em seus fluxos de trabalho de {% data variables.product.prodname_actions %}. Para obter mais informações, confira "[Sintaxe de fluxo de trabalho do GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)".
|
||||
|
||||
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
O {% data variables.product.prodname_dotcom %} recomenda que você se autentique com o `GITHUB_TOKEN` interno em vez de criar um token. Se isso não for possível, armazene o token como um segredo e substitua `GITHUB_TOKEN` no exemplo abaixo pelo nome do seu segredo. Para obter mais informações sobre `GITHUB_TOKEN`, confira a "[Autenticação automática de token](/actions/security-guides/automatic-token-authentication)". Para obter mais informações sobre segredos, confira "[Segredos criptografados](/actions/security-guides/encrypted-secrets)".
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -290,13 +295,13 @@ jobs:
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Using headers
|
||||
## Uso de cabeçalhos
|
||||
|
||||
Most operations specify that you should pass an `Accept` header with a value of `application/vnd.github+json`. Other operations may specify that you should send a different `Accept` header or additional headers.
|
||||
A maioria das operações especifica que você deve passar um cabeçalho `Accept` com o valor `application/vnd.github+json`. Outras operações podem especificar que você deve enviar um cabeçalho `Accept` diferente ou cabeçalhos adicionais.
|
||||
|
||||
{% cli %}
|
||||
|
||||
To send a header with {% data variables.product.prodname_cli %}, use the `--header` or `-H` flag followed by the header in `key: value` format.
|
||||
Para enviar um cabeçalho com a {% data variables.product.prodname_cli %}, use o sinalizador `--header` ou `-H`, seguido do cabeçalho no formato `key: value`.
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json'{% ifversion api-date-versioning %} --header 'X-GitHub-Api-Version:{{ allVersions[currentVersion].latestApiVersion }}'{% endif %} --method GET /octocat
|
||||
@@ -306,7 +311,7 @@ gh api --header 'Accept: application/vnd.github+json'{% ifversion api-date-versi
|
||||
|
||||
{% javascript %}
|
||||
|
||||
The Octokit.js library automatically passes the `Accept: application/vnd.github+json` header. To pass additional headers or a different `Accept` header, add a `headers` property to the object that is passed as a second argument to the `request` method. The value of the `headers` property is an object with the header names as keys and header values as values. For example, to send a `content-type` header with a value of `text/plain`:
|
||||
A biblioteca de Octokit.js passa automaticamente o cabeçalho `Accept: application/vnd.github+json`. Para passar cabeçalhos adicionais ou um cabeçalho `Accept` diferente, adicione uma propriedade `headers` ao objeto que é passado como um segundo argumento para o método `request`. O valor da propriedade `headers` é um objeto com os nomes de cabeçalho como chaves e valores de cabeçalho como valores. Por exemplo, para enviar um cabeçalho `content-type` com o valor `text/plain`:
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /octocat", {
|
||||
@@ -321,7 +326,7 @@ await octokit.request("GET /octocat", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To send a header with cURL, use the `--header` or `-H` flag followed by the header in `key: value` format.
|
||||
Para enviar um cabeçalho com cURL, use o sinalizador `--header` ou `-H`, seguido pelo cabeçalho no formato `key: value`.
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -333,21 +338,19 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Using path parameters
|
||||
## Como usar parâmetros de caminho
|
||||
|
||||
Path parameters modify the operation path. For example, the "List repository issues" path is `/repos/{owner}/{repo}/issues`. The curly brackets `{}` denote path parameters that you need to specify. In this case, you must specify the repository owner and name. For the reference documentation for this operation, see "[List repository issues](/rest/issues/issues#list-repository-issues)."
|
||||
Os parâmetros de caminho modificam o caminho da operação. Por exemplo, o caminho "Listar problemas de repositório" é `/repos/{owner}/{repo}/issues`. As chaves `{}` denotam parâmetros de caminho que você precisa especificar. Nesse caso, você deve especificar o proprietário e o nome do repositório. Para obter a documentação de referência para essa operação, confira "[Listar problemas de repositório](/rest/issues/issues#list-repository-issues)".
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** In order for this command to work for {% data variables.location.product_location %}, replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}. Otherwise, rerun the `gh auth login` command to authenticate to {% data variables.product.prodname_dotcom_the_website %} instead of {% data variables.location.product_location %}.
|
||||
**Observação:** para que esse comando funcione na {% data variables.location.product_location %}, substitua `octocat/Spoon-Knife` por um repositório pertencente à {% data variables.location.product_location %}. Caso contrário, execute novamente o comando `gh auth login` para se autenticar no {% data variables.product.prodname_dotcom_the_website %} em vez de {% data variables.location.product_location %}.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
To get issues from the `octocat/Spoon-Knife` repository, replace `{owner}` with `octocat` and `{repo}` with `Spoon-Knife`.
|
||||
Para obter problemas do repositório `octocat/Spoon-Knife`, substitua `{owner}` por `octocat` e `{repo}` por `Spoon-Knife`.
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues
|
||||
@@ -357,15 +360,13 @@ gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octoca
|
||||
|
||||
{% javascript %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** In order for this example to work for {% data variables.location.product_location %}, replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}. Otherwise, create a new `Octokit` instance and do not specify `baseURL`.
|
||||
**Observação:** para que esse exemplo funcione na {% data variables.location.product_location %}, substitua `octocat/Spoon-Knife` por um repositório pertencente à {% data variables.location.product_location %}. Caso contrário, crie uma instância `Octokit` e não especifique `baseURL`.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including path parameters, are passed in an object as the second argument to the `request` method. To get issues from the `octocat/Spoon-Knife` repository, specify `owner` as `octocat` and `repo` as `Spoon-Knife`.
|
||||
Quando você faz uma solicitação com Octokit.js, todos os parâmetros, incluindo parâmetros de caminho, são passados em um objeto como o segundo argumento para o método `request`. Para obter problemas do repositório `octocat/Spoon-Knife`, especifique `owner` como `octocat` e `repo` como `Spoon-Knife`.
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
@@ -378,15 +379,13 @@ await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To get issues from the `octocat/Spoon-Knife` repository, replace `{owner}` with `octocat` and `{repo}` with `Spoon-Knife`. To build the full path, prepend the base URL for the {% data variables.product.prodname_dotcom %} REST API, `https://api.github.com`: `https://api.github.com/repos/octocat/Spoon-Knife/issues`.
|
||||
Para obter problemas do repositório `octocat/Spoon-Knife`, substitua `{owner}` por `octocat` e `{repo}` por `Spoon-Knife`. Para criar o caminho completo, prepare a URL de base para a API REST do {% data variables.product.prodname_dotcom %}, `https://api.github.com`: `https://api.github.com/repos/octocat/Spoon-Knife/issues`.
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** If you want to use {% data variables.location.product_location %} instead of {% data variables.product.prodname_dotcom_the_website %}, use `{% data variables.product.api_url_code %}` instead of `https://api.github.com` and replace `[hostname]` with the name of {% data variables.location.product_location %}. Replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}.
|
||||
**Observação:** se você quiser usar {% data variables.location.product_location %} em vez do {% data variables.product.prodname_dotcom_the_website %}, use `{% data variables.product.api_url_code %}` em vez de `https://api.github.com` e substitua `[hostname]` pelo nome da {% data variables.location.product_location %}. Substitua `octocat/Spoon-Knife` por um repositório pertencente à {% data variables.location.product_location %}.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -397,21 +396,21 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation returns a list of issues and data about each issue. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
A operação retorna uma lista de problemas e dados sobre cada problema. Para obter mais informações sobre como usar a resposta, confira a seção "[Como usar a resposta](#using-the-response)".
|
||||
|
||||
## Using query parameters
|
||||
## Como usar parâmetros de consulta
|
||||
|
||||
Query parameters allow you to control what data is returned for a request. For example, a query parameter may let you specify how many items are returned when the response is paginated.
|
||||
Os parâmetros de consulta permitem controlar quais dados são retornados para uma solicitação. Por exemplo, um parâmetro de consulta pode permitir que você especifique quantos itens são retornados quando a resposta é paginada.
|
||||
|
||||
By default, the "List repository issues" operation returns thirty issues, sorted in descending order by the date they were created. You can use the `per_page` parameter to return two issues instead of 30. You can use the `sort` parameter to sort the issues by the date they were last updated instead of by the date they were created. You can use the `direction` parameter to sort the results in ascending order instead of descending order.
|
||||
Por padrão, a operação "Listar problemas de repositório" retorna trinta problemas, classificados em ordem decrescente pela data em que foram criados. Você pode usar o parâmetro `per_page` para retornar dois problemas em vez de 30. Você pode usar o `sort` parâmetro para classificar os problemas pela data em que foram atualizados pela última vez, em vez da data em que foram criados. Você pode usar o parâmetro `direction` para classificar os resultados em ordem crescente em vez de ordem decrescente.
|
||||
|
||||
{% cli %}
|
||||
|
||||
For {% data variables.product.prodname_cli %}, use the `-F` flag to pass a parameter that is a number, Boolean, or null. Use `-f` to pass string parameters.
|
||||
Para a {% data variables.product.prodname_cli %}, use o sinalizador `-F` para passar um parâmetro numérico, booliano ou nulo. Use `-f` para passar parâmetros de cadeia de caracteres.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_cli %} does not currently accept parameters that are arrays. For more information, see [this issue](https://github.com/cli/cli/issues/1484).
|
||||
**Observação**: a {% data variables.product.prodname_cli %} atualmente não aceita matrizes como parâmetro. Para obter mais informações, confira [esta edição](https://github.com/cli/cli/issues/1484).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -423,7 +422,7 @@ gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octoca
|
||||
|
||||
{% javascript %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including query parameters, are passed in an object as the second argument to the `request` method.
|
||||
Quando você faz uma solicitação com Octokit.js, todos os parâmetros, incluindo parâmetros de consulta, são passados em um objeto como o segundo argumento para o método `request`.
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
@@ -439,7 +438,7 @@ await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
For cURL, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
|
||||
Para cURL, adicione um `?` ao final do caminho e acrescente o nome e o valor do parâmetro de consulta no formulário `parameter_name=value`. Separe vários parâmetros de consulta com `&`.
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -450,21 +449,21 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation returns a list of issues and data about each issue. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
A operação retorna uma lista de problemas e dados sobre cada problema. Para obter mais informações sobre como usar a resposta, confira a seção "[Como usar a resposta](#using-the-response)".
|
||||
|
||||
## Using body parameters
|
||||
## Como usar parâmetros do corpo
|
||||
|
||||
Body parameters allow you to pass additional data to the API. For example, the "Create an issue" operation requires you to specify a title for the new issue. It also lets you specify other information, such as text to put in the issue body. For the full reference documentation for this operation, see "[Create an issue](/rest/issues/issues#create-an-issue)."
|
||||
Os parâmetros do corpo permitem que você passe dados adicionais para a API. Por exemplo, a operação "Criar um problema" exige que você especifique um título para o novo problema. Ele também permite que você especifique outras informações, como o texto a ser colocado no corpo do problema. Para obter a documentação de referência completa para esta operação, confira "[Criar um problema](/rest/issues/issues#create-an-issue)".
|
||||
|
||||
The "Create an issue" operation uses the same path as the "List repository issues" operation in the examples above, but it uses a `POST` method instead of a `GET` method.
|
||||
A operação "Criar um problema" usa o mesmo caminho que a operação "Listar problemas do repositório" nos exemplos acima, mas usa o método `POST` em vez do método `GET`.
|
||||
|
||||
{% cli %}
|
||||
|
||||
For {% data variables.product.prodname_cli %}, use the `-F` flag to pass a parameter that is a number, Boolean, or null. Use `-f` to pass string parameters.
|
||||
Para a {% data variables.product.prodname_cli %}, use o sinalizador `-F` para passar um parâmetro numérico, booliano ou nulo. Use `-f` para passar parâmetros de cadeia de caracteres.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_cli %} does not currently accept parameters that are arrays. For more information, see [this issue](https://github.com/cli/cli/issues/1484).
|
||||
**Observação**: a {% data variables.product.prodname_cli %} atualmente não aceita matrizes como parâmetro. Para obter mais informações, confira [esta edição](https://github.com/cli/cli/issues/1484).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -480,13 +479,13 @@ gh api --header 'Accept: application/vnd.github+json' --method POST /repos/octoc
|
||||
|
||||
{% note %}
|
||||
|
||||
If you are using a {% data variables.product.pat_v2 %}, you must replace `octocat/Spoon-Knife` with a repository that you own or that is owned by an organization that you are a member of. Your token must have access to that repository and have read and write permissions for repository issues. For more information about creating a repository, see "[Create a repo](/get-started/quickstart/create-a-repo)." For more information about granting access and permissions to a {% data variables.product.pat_v2 %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
Se estiver usando um {% data variables.product.pat_v2 %}, substitua `octocat/Spoon-Knife` por um repositório que pertença a você ou a uma organização da qual é membro. O token precisa ter acesso a esse repositório e ter permissões de leitura e gravação para problemas de repositório. Para obter mais informações de como criar um repositório, confira "[Como criar um repositório](/get-started/quickstart/create-a-repo)". Para obter mais informações de como permitir acesso e permissões a um {% data variables.product.pat_v2 %}, confira "[Como criar um {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)".
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including body parameters, are passed in an object as the second argument to the `request` method.
|
||||
Quando você faz uma solicitação com Octokit.js, todos os parâmetros, incluindo parâmetros de corpo, são passados em um objeto como o segundo argumento para o método `request`.
|
||||
|
||||
```javascript
|
||||
await octokit.request("POST /repos/{owner}/{repo}/issues", {
|
||||
@@ -505,13 +504,13 @@ await octokit.request("POST /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% note %}
|
||||
|
||||
If you are using a {% data variables.product.pat_v2 %}, you must replace `octocat/Spoon-Knife` with a repository that you own or that is owned by an organization that you are a member of. Your token must have access to that repository and have read and write permissions for repository issues. For more information about creating a repository, see "[Create a repo](/get-started/quickstart/create-a-repo)." For more information about granting access and permissions to a {% data variables.product.pat_v2 %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
Se estiver usando um {% data variables.product.pat_v2 %}, substitua `octocat/Spoon-Knife` por um repositório que pertença a você ou a uma organização da qual é membro. O token precisa ter acesso a esse repositório e ter permissões de leitura e gravação para problemas de repositório. Para obter mais informações de como criar um repositório, confira "[Como criar um repositório](/get-started/quickstart/create-a-repo)". Para obter mais informações de como permitir acesso e permissões a um {% data variables.product.pat_v2 %}, confira "[Como criar um {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)".
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
For cURL, use the `--data` flag to pass the body parameters in a JSON object.
|
||||
Para cURL, use o sinalizador `--data` para passar os parâmetros do corpo em um objeto JSON.
|
||||
|
||||
```shell
|
||||
curl --request POST \
|
||||
@@ -526,27 +525,27 @@ curl --request POST \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation creates an issue and returns data about the new issue. In the response, find the `html_url` of your issue and navigate to your issue in the browser. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
A operação cria um problema e retorna dados sobre o novo problema. Na resposta, localize o `html_url` do problema e navegue até o problema no navegador. Para obter mais informações sobre como usar a resposta, confira a seção "[Como usar a resposta](#using-the-response)".
|
||||
|
||||
## Using the response
|
||||
## Como usar a resposta
|
||||
|
||||
### About the response code and headers
|
||||
### Sobre o código de resposta e os cabeçalhos
|
||||
|
||||
Every request will return an HTTP status code that indicates the success of the response. For more information about response codes, see [the MDN HTTP response status code documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).
|
||||
Toda solicitação retornará um código de status HTTP que indica o sucesso da resposta. Para obter mais informações sobre códigos de resposta, confira [a documentação do código de status de resposta HTTP do MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).
|
||||
|
||||
Additionally, the response will include headers that give more details about the response. Headers that start with `X-` or `x-` are custom to {% data variables.product.company_short %}. For example, the `x-ratelimit-remaining` and `x-ratelimit-reset` headers tell you how many requests you can make in a time period.
|
||||
Além disso, a resposta incluirá cabeçalhos que fornecem mais detalhes sobre a resposta. Cabeçalhos que começam com `X-` ou `x-` são personalizados para {% data variables.product.company_short %}. Por exemplo, os cabeçalhos `x-ratelimit-remaining` e `x-ratelimit-reset` informam quantas solicitações você pode fazer em um período.
|
||||
|
||||
{% cli %}
|
||||
|
||||
To view the status code and headers, use the `--include` or `--i` flag when you send your request.
|
||||
Para exibir o código de status e os cabeçalhos, use o sinalizador `--include` ou `--i` ao enviar sua solicitação.
|
||||
|
||||
For example, this request:
|
||||
Por exemplo, esta solicitação:
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues -F per_page=2 --include
|
||||
```
|
||||
|
||||
returns the response code and headers like:
|
||||
retorna o código de resposta e os cabeçalhos como:
|
||||
|
||||
```shell
|
||||
HTTP/2.0 200 OK
|
||||
@@ -578,15 +577,15 @@ X-Ratelimit-Used: 4
|
||||
X-Xss-Protection: 0
|
||||
```
|
||||
|
||||
In this example, the response code is `200`, which indicates a successful request.
|
||||
Neste exemplo, o código de resposta é `200`, o que indica uma solicitação bem-sucedida.
|
||||
|
||||
{% endcli %}
|
||||
|
||||
{% javascript %}
|
||||
|
||||
When you make a request with Octokit.js, the `request` method returns a promise. If the request was successful, the promise resolves to an object that includes the HTTP status code of the response (`status`) and the response headers (`headers`). If an error occurs, the promise resolves to an object that includes the HTTP status code of the response (`status`) and the response headers (`response.headers`).
|
||||
Quando você faz uma solicitação com Octokit.js, o método `request` retorna uma promessa. Se a solicitação tiver sido bem-sucedida, a promessa será resolvida para um objeto que inclui o código de status HTTP da resposta (`status`) e os cabeçalhos de resposta (`headers`). Se ocorrer um erro, a promessa será resolvida para um objeto que inclui o código de status HTTP da resposta (`status`) e os cabeçalhos de resposta (`response.headers`).
|
||||
|
||||
You can use a `try/catch` block to catch an error if it occurs. For example, if the request in the following script is successful, the script will log the status code and the value of the `x-ratelimit-remaining` header. If the request was not successful, the script will log the status code, the value of the `x-ratelimit-remaining` header, and the error message.
|
||||
Você pode usar um bloco `try/catch` para capturar eventuais erros que ocorrerem. Por exemplo, se a solicitação no script a seguir for bem-sucedida, o script vai registrar o código de status e o valor do cabeçalho `x-ratelimit-remaining`. Se a solicitação não tiver sido bem-sucedida, o script vai registrar o código de status, o valor do cabeçalho `x-ratelimit-remaining` e a mensagem de erro.
|
||||
|
||||
```javascript
|
||||
try {
|
||||
@@ -607,9 +606,9 @@ try {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To view the status code and headers, use the `--include` or `--i` flag when you send your request.
|
||||
Para exibir o código de status e os cabeçalhos, use o sinalizador `--include` ou `--i` ao enviar sua solicitação.
|
||||
|
||||
For example, this request:
|
||||
Por exemplo, esta solicitação:
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -619,7 +618,7 @@ curl --request GET \
|
||||
--include
|
||||
```
|
||||
|
||||
returns the response code and headers like:
|
||||
retorna o código de resposta e os cabeçalhos como:
|
||||
|
||||
```shell
|
||||
HTTP/2 200
|
||||
@@ -649,13 +648,13 @@ content-length: 4936
|
||||
x-github-request-id: 14E0:4BC6:F1B8BA:208E317:62EC2715
|
||||
```
|
||||
|
||||
In this example, the response code is `200`, which indicates a successful request.
|
||||
Neste exemplo, o código de resposta é `200`, o que indica uma solicitação bem-sucedida.
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
### About the response body
|
||||
### Sobre o corpo da resposta
|
||||
|
||||
Many operations will return a response body. Unless otherwise specified, the response body is in JSON format. For example, this request returns a list of issues with data about each issue:
|
||||
Muitas operações retornarão um corpo de resposta. A menos que especificado de outra forma, o corpo da resposta está no formato JSON. Por exemplo, essa solicitação retorna uma lista de problemas com os dados sobre cada problema:
|
||||
|
||||
{% cli %}
|
||||
|
||||
@@ -688,23 +687,23 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
Unlike the GraphQL API where you specify what information you want, the REST API typically returns more information than you need. If desired, you can parse the response to pull out specific pieces of information.
|
||||
Ao contrário da API do GraphQL em que você especifica quais informações deseja, a API REST normalmente retorna mais informações do que você precisa. Se desejar, você pode analisar a resposta a fim de extrair informações específicas.
|
||||
|
||||
{% cli %}
|
||||
|
||||
For example, you can use `>` to redirect the response to a file:
|
||||
Por exemplo, você pode usar `>` a fim de redirecionar a resposta para um arquivo:
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues -F per_page=2 > data.json
|
||||
```
|
||||
|
||||
Then you can use jq to get the title and author ID of each issue:
|
||||
Em seguida, você pode usar o jq para obter o título e a ID de autor de cada problema:
|
||||
|
||||
```shell
|
||||
jq '.[] | {title: .title, authorID: .user.id}' data.json
|
||||
```
|
||||
|
||||
The previous two commands return something like:
|
||||
Os dois comandos anteriores retornam algo como:
|
||||
|
||||
```
|
||||
{
|
||||
@@ -717,13 +716,13 @@ The previous two commands return something like:
|
||||
}
|
||||
```
|
||||
|
||||
For more information about jq, see [the jq documentation](https://stedolan.github.io/jq/) and [jq play](https://jqplay.org/).
|
||||
Para obter mais informações sobre jq, confira [a documentação jq](https://stedolan.github.io/jq/) e [o jq play](https://jqplay.org/).
|
||||
|
||||
{% endcli %}
|
||||
|
||||
{% javascript %}
|
||||
|
||||
For example, you can get the title and author ID of each issue:
|
||||
Por exemplo, você pode obter o título e a ID do autor de cada problema:
|
||||
|
||||
```javascript
|
||||
try {
|
||||
@@ -746,7 +745,7 @@ try {
|
||||
|
||||
{% curl %}
|
||||
|
||||
For example, you can use `>` to redirect the response to a file:
|
||||
Por exemplo, você pode usar `>` a fim de redirecionar a resposta para um arquivo:
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -755,13 +754,13 @@ curl --request GET \
|
||||
--header "Authorization: Bearer YOUR-TOKEN" > data.json
|
||||
```
|
||||
|
||||
Then you can use jq to get the title and author ID of each issue:
|
||||
Em seguida, você pode usar o jq para obter o título e a ID de autor de cada problema:
|
||||
|
||||
```shell
|
||||
jq '.[] | {title: .title, authorID: .user.id}' data.json
|
||||
```
|
||||
|
||||
The previous two commands return something like:
|
||||
Os dois comandos anteriores retornam algo como:
|
||||
|
||||
```
|
||||
{
|
||||
@@ -774,12 +773,12 @@ The previous two commands return something like:
|
||||
}
|
||||
```
|
||||
|
||||
For more information about jq, see [the jq documentation](https://stedolan.github.io/jq/) and [jq play](https://jqplay.org/).
|
||||
Para obter mais informações sobre jq, confira [a documentação jq](https://stedolan.github.io/jq/) e [o jq play](https://jqplay.org/).
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Next steps
|
||||
## Próximas etapas
|
||||
|
||||
This article demonstrated how to list and create issues in a repository. For more practice, try to comment on an issue, edit the title of an issue, or close an issue. For more information about these operations, see "[Create an issue comment](/rest/issues#create-an-issue-comment)" and "[Update an issue](/rest/issues/issues#update-an-issue)."
|
||||
Este artigo demonstrou como listar e criar problemas em um repositório. Para obter mais práticas, tente comentar um problema, editar o título de um problema ou fechar um problema. Para obter mais informações sobre essas operações, confira "[Criar um comentário de problema](/rest/issues#create-an-issue-comment)" e "[Atualizar um problema](/rest/issues/issues#update-an-issue)".
|
||||
|
||||
For more information about the operations that you can use, see the [REST reference documentation](/rest).
|
||||
Para obter mais informações sobre as operações que você pode usar, confira a [documentação de referência de REST](/rest).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Resources in the REST API
|
||||
intro: 'Learn how to navigate the resources provided by the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API.'
|
||||
title: Recursos na API REST
|
||||
intro: 'Aprenda a navegar pelos recursos fornecidos pela API de {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %}.'
|
||||
redirect_from:
|
||||
- /rest/initialize-the-repo
|
||||
versions:
|
||||
@@ -11,19 +11,23 @@ versions:
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- API
|
||||
ms.openlocfilehash: dc16916ada20275d41f23a8bc006cc79ddf51120
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184266'
|
||||
---
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
## API version
|
||||
## Versão da API
|
||||
|
||||
Available resources may vary between REST API versions. You should use the `X-GitHub-Api-Version` header to specify an API version. For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
Os recursos disponíveis podem variar entre as versões da API REST. Você deve usar o cabeçalho `X-GitHub-Api-Version` para especificar uma versão da API. Para obter mais informações, confira "[Versões da API](/rest/overview/api-versions)".
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Schema
|
||||
## Esquema
|
||||
|
||||
{% ifversion fpt or ghec %}All API access is over HTTPS, and{% else %}The API is{% endif %} accessed from `{% data variables.product.api_url_code %}`. All data is
|
||||
sent and received as JSON.
|
||||
{% ifversion fpt or ghec %}Todo o acesso à API é feito por HTTPS e{% else %}A API é{% endif %} acessada de `{% data variables.product.api_url_code %}`. Todos os dados são enviados e recebidos como JSON.
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs
|
||||
@@ -44,55 +48,45 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs
|
||||
> X-Content-Type-Options: nosniff
|
||||
```
|
||||
|
||||
Blank fields are included as `null` instead of being omitted.
|
||||
Os campos em branco são incluídos como `null` em vez de serem omitidos.
|
||||
|
||||
All timestamps return in UTC time, ISO 8601 format:
|
||||
Todos os timestamps são retornados no formato UTC, ISO 8601:
|
||||
|
||||
YYYY-MM-DDTHH:MM:SSZ
|
||||
|
||||
For more information about timezones in timestamps, see [this section](#timezones).
|
||||
Para obter mais informações sobre fusos horários em carimbos de data/hora, confira [esta seção](#timezones).
|
||||
|
||||
### Summary representations
|
||||
### Apresentações resumidas
|
||||
|
||||
When you fetch a list of resources, the response includes a _subset_ of the
|
||||
attributes for that resource. This is the "summary" representation of the
|
||||
resource. (Some attributes are computationally expensive for the API to provide.
|
||||
For performance reasons, the summary representation excludes those attributes.
|
||||
To obtain those attributes, fetch the "detailed" representation.)
|
||||
Ao buscar uma lista de recursos, a resposta inclui um _subconjunto_ dos atributos para esse recurso. Esta é a representação "resumo" do recurso. (Alguns atributos são computacionalmente caros para a API fornecer.
|
||||
Por razões de desempenho, a representação resumida exclui esses atributos.
|
||||
Para obter esses atributos, busque a representação "detalhada".)
|
||||
|
||||
**Example**: When you get a list of repositories, you get the summary
|
||||
representation of each repository. Here, we fetch the list of repositories owned
|
||||
by the [octokit](https://github.com/octokit) organization:
|
||||
**Exemplo**: ao receber uma lista de repositórios, você recebe a representação resumida de cada repositório. Aqui, buscamos a lista de repositórios pertencentes à organização [octokit](https://github.com/octokit):
|
||||
|
||||
GET /orgs/octokit/repos
|
||||
|
||||
### Detailed representations
|
||||
### Representações detalhadas
|
||||
|
||||
When you fetch an individual resource, the response typically includes _all_
|
||||
attributes for that resource. This is the "detailed" representation of the
|
||||
resource. (Note that authorization sometimes influences the amount of detail
|
||||
included in the representation.)
|
||||
Ao buscar um recurso individual, a resposta normalmente inclui _todos_ os atributos para esse recurso. Esta é a representação "detalhada" do recurso. (Observe que a autorização às vezes influencia a quantidade de detalhes incluídos na representação.)
|
||||
|
||||
**Example**: When you get an individual repository, you get the detailed
|
||||
representation of the repository. Here, we fetch the
|
||||
[octokit/octokit.rb](https://github.com/octokit/octokit.rb) repository:
|
||||
**Exemplo**: ao receber um repositório individual, você recebe a representação detalhada do repositório. Aqui, buscamos o repositório [octokit/octokit.rb](https://github.com/octokit/octokit.rb):
|
||||
|
||||
GET /repos/octokit/octokit.rb
|
||||
|
||||
The documentation provides an example response for each API method. The example
|
||||
response illustrates all attributes that are returned by that method.
|
||||
A documentação fornece um exemplo de resposta para cada método da API. A resposta de exemplo ilustra todos os atributos que retornados por esse método.
|
||||
|
||||
## Authentication
|
||||
## Autenticação
|
||||
|
||||
{% ifversion ghae %} We recommend authenticating to the {% data variables.product.product_name %} REST API by creating an OAuth2 token through the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow). {% else %} There are two ways to authenticate through {% data variables.product.product_name %} REST API.{% endif %} Requests that require authentication will return `404 Not Found`, instead of `403 Forbidden`, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users.
|
||||
{% ifversion ghae %} Recomendamos a autenticação na API REST {% data variables.product.product_name %} criando um token OAuth2 por meio do [fluxo do aplicativo Web](/developers/apps/authorizing-oauth-apps#web-application-flow). {% else %} Existem duas maneiras de efetuar a autenticação por meio da API REST de {% data variables.product.product_name %}.{% endif %} As solicitações que exigem autenticação retornarão `404 Not Found`, em vez de `403 Forbidden`, em alguns lugares. Isso é para evitar a fuga acidental de repositórios privados para usuários não autorizados.
|
||||
|
||||
### Basic authentication
|
||||
### Autenticação Básica
|
||||
|
||||
```shell
|
||||
$ curl -u "username" {% data variables.product.api_url_pre %}
|
||||
```
|
||||
|
||||
### OAuth2 token (sent in a header)
|
||||
### Token do OAuth2 (enviado em um cabeçalho)
|
||||
|
||||
```shell
|
||||
$ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %}
|
||||
@@ -100,17 +94,17 @@ $ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_
|
||||
|
||||
{% note %}
|
||||
|
||||
Note: GitHub recommends sending OAuth tokens using the Authorization header.
|
||||
Observação: O GitHub recomenda enviar tokens do OAuth usando o cabeçalho de autorização.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
**Observação:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens can be acquired using the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow) for production applications.
|
||||
Leia [mais sobre OAuth2](/apps/building-oauth-apps/). Observe que os tokens OAuth2 podem ser adquiridos usando o [fluxo do aplicativo Web](/developers/apps/authorizing-oauth-apps#web-application-flow) para aplicativos de produção.
|
||||
|
||||
{% ifversion fpt or ghes or ghec %}
|
||||
### OAuth2 key/secret
|
||||
@@ -121,22 +115,20 @@ Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens c
|
||||
curl -u my_client_id:my_client_secret '{% data variables.product.api_url_pre %}/user/repos'
|
||||
```
|
||||
|
||||
Using your `client_id` and `client_secret` does _not_ authenticate as a user, it will only identify your OAuth App to increase your rate limit. Permissions are only granted to users, not applications, and you will only get back data that an unauthenticated user would see. For this reason, you should only use the OAuth2 key/secret in server-to-server scenarios. Don't leak your OAuth App's client secret to your users.
|
||||
Usar seu `client_id` e `client_secret` _não_ autentica como usuário, apenas identificará seu aplicativo OAuth para aumentar seu limite de taxa. As permissões só são concedidas a usuários, não aplicativos, e você só obterá dados que um usuário não autenticado visualizaria. Por este motivo, você só deve usar a chave/segredo OAuth2 em cenários de servidor para servidor. Não deixe vazar o segredo do cliente do OAuth do seu aplicativo para os seus usuários.
|
||||
|
||||
{% ifversion ghes %}
|
||||
You will be unable to authenticate using your OAuth2 key and secret while in private mode, and trying to authenticate will return `401 Unauthorized`. For more information, see "[Enabling private mode](/admin/configuration/configuring-your-enterprise/enabling-private-mode)".
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% ifversion ghes %} Você não conseguirá efetuar a autenticação usando sua chave e segredo do OAuth2 enquanto estiver no modo privado e essa tentativa de autenticação irá retornar `401 Unauthorized`. Para obter mais informações, confira "[Como habilitar o modo privado](/admin/configuration/configuring-your-enterprise/enabling-private-mode)".
|
||||
{% endif %} {% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
Read [more about unauthenticated rate limiting](#increasing-the-unauthenticated-rate-limit-for-oauth-apps).
|
||||
Leia [mais sobre limite de taxa não autenticada](#increasing-the-unauthenticated-rate-limit-for-oauth-apps).
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Failed login limit
|
||||
### Falha no limite de login
|
||||
|
||||
Authenticating with invalid credentials will return `401 Unauthorized`:
|
||||
A autenticação com credenciais inválidas retornará `401 Unauthorized`:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -u foo:bar
|
||||
@@ -148,9 +140,7 @@ $ curl -I {% data variables.product.api_url_pre %} -u foo:bar
|
||||
> }
|
||||
```
|
||||
|
||||
After detecting several requests with invalid credentials within a short period,
|
||||
the API will temporarily reject all authentication attempts for that user
|
||||
(including ones with valid credentials) with `403 Forbidden`:
|
||||
Após detectar várias solicitações com credenciais inválidas em um curto período de tempo, a API rejeitará temporariamente todas as tentativas de autenticação para esse usuário (incluindo aquelas com credenciais válidas) com `403 Forbidden`:
|
||||
|
||||
```shell
|
||||
$ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae or ghec %}
|
||||
@@ -162,62 +152,55 @@ $ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae o
|
||||
> }
|
||||
```
|
||||
|
||||
## Parameters
|
||||
## Parâmetros
|
||||
|
||||
Many API methods take optional parameters. For `GET` requests, any parameters not
|
||||
specified as a segment in the path can be passed as an HTTP query string
|
||||
parameter:
|
||||
Muitos métodos de API tomam parâmetros opcionais. Para solicitações tipo `GET`, todos os parâmetros não especificados como um segmento no caminho podem ser passados como um parâmetro de string de consulta de HTTP:
|
||||
|
||||
```shell
|
||||
$ curl -i "{% data variables.product.api_url_pre %}/repos/vmg/redcarpet/issues?state=closed"
|
||||
```
|
||||
|
||||
In this example, the 'vmg' and 'redcarpet' values are provided for the `:owner`
|
||||
and `:repo` parameters in the path while `:state` is passed in the query
|
||||
string.
|
||||
Neste exemplo, os valores 'vmg' e 'redcarpet' são fornecidos para os parâmetros `:owner` e `:repo` no caminho, enquanto `:state` é passado na cadeia de caracteres de consulta.
|
||||
|
||||
For `POST`, `PATCH`, `PUT`, and `DELETE` requests, parameters not included in the URL should be encoded as JSON
|
||||
with a Content-Type of 'application/json':
|
||||
Para as solicitações `POST`, `PATCH`, `PUT` e `DELETE`, os parâmetros não incluídos na URL devem ser codificados como JSON com um tipo de conteúdo de 'application/json':
|
||||
|
||||
```shell
|
||||
$ curl -i -u username -d '{"scopes":["repo_deployment"]}' {% data variables.product.api_url_pre %}/authorizations
|
||||
```
|
||||
|
||||
## Root endpoint
|
||||
## Ponto de extremidade raiz
|
||||
|
||||
You can issue a `GET` request to the root endpoint to get all the endpoint categories that the REST API supports:
|
||||
Você pode emitir uma solicitação `GET` para o ponto de extremidade de raiz para obter todas as categorias do ponto de extremidade com a qual a API REST é compatível:
|
||||
|
||||
```shell
|
||||
$ curl {% ifversion fpt or ghae or ghec %}
|
||||
-u USERNAME:TOKEN {% endif %}{% ifversion ghes %}-u USERNAME:PASSWORD {% endif %}{% data variables.product.api_url_pre %}
|
||||
```
|
||||
|
||||
## GraphQL global node IDs
|
||||
## IDs de nós globais do GraphQL
|
||||
|
||||
See the guide on "[Using Global Node IDs](/graphql/guides/using-global-node-ids)" for detailed information about how to find `node_id`s via the REST API and use them in GraphQL operations.
|
||||
Confira o guia sobre "[Usar IDs de nós globais](/graphql/guides/using-global-node-ids)" para obter informações detalhadas sobre como localizar `node_id`s por meio da API REST e usá-los em operações do GraphQL.
|
||||
|
||||
## Client errors
|
||||
## Erros do cliente
|
||||
|
||||
There are three possible types of client errors on API calls that
|
||||
receive request bodies:
|
||||
Há três tipos possíveis de erros de cliente em chamadas de API que recebem corpos de solicitação:
|
||||
|
||||
1. Sending invalid JSON will result in a `400 Bad Request` response.
|
||||
1. O envio de JSON inválido resultará em uma resposta `400 Bad Request`.
|
||||
|
||||
HTTP/2 400
|
||||
Content-Length: 35
|
||||
|
||||
{"message":"Problems parsing JSON"}
|
||||
|
||||
2. Sending the wrong type of JSON values will result in a `400 Bad
|
||||
Request` response.
|
||||
2. O envio do tipo errado de valores JSON resultará em uma resposta `400 Bad
|
||||
Request`.
|
||||
|
||||
HTTP/2 400
|
||||
Content-Length: 40
|
||||
|
||||
{"message":"Body should be a JSON object"}
|
||||
|
||||
3. Sending invalid fields will result in a `422 Unprocessable Entity`
|
||||
response.
|
||||
3. O envio de campos inválidos resultará em uma resposta `422 Unprocessable Entity`.
|
||||
|
||||
HTTP/2 422
|
||||
Content-Length: 149
|
||||
@@ -233,60 +216,49 @@ receive request bodies:
|
||||
]
|
||||
}
|
||||
|
||||
All error objects have resource and field properties so that your client
|
||||
can tell what the problem is. There's also an error code to let you
|
||||
know what is wrong with the field. These are the possible validation error
|
||||
codes:
|
||||
Todos os objetos de erro têm propriedades de recursos e campos para que seu cliente possa dizer qual é o problema. Há também um código de erro para que você saiba o que está errado com o campo. Estes são os possíveis códigos de erro de validação:
|
||||
|
||||
Error code name | Description
|
||||
Nome do código de erro | Descrição
|
||||
-----------|-----------|
|
||||
`missing` | A resource does not exist.
|
||||
`missing_field` | A required field on a resource has not been set.
|
||||
`invalid` | The formatting of a field is invalid. Review the documentation for more specific information.
|
||||
`already_exists` | Another resource has the same value as this field. This can happen in resources that must have some unique key (such as label names).
|
||||
`unprocessable` | The inputs provided were invalid.
|
||||
`missing` | Um recurso não existe.
|
||||
`missing_field` | Não foi definido um campo obrigatório em um recurso.
|
||||
`invalid` | Formatação de um campo é inválida. Revise a documentação para obter informações mais específicas.
|
||||
`already_exists` | Outro recurso tem o mesmo valor que este campo. Isso pode acontecer em recursos que precisam ter alguma chave única (como nomes de etiqueta).
|
||||
`unprocessable` | As entradas fornecidas eram inválidas.
|
||||
|
||||
Resources may also send custom validation errors (where `code` is `custom`). Custom errors will always have a `message` field describing the error, and most errors will also include a `documentation_url` field pointing to some content that might help you resolve the error.
|
||||
Os recursos também podem enviar erros de validação personalizados (em que `code` e `custom` ). Os erros personalizados sempre terão um campo de `message` que descreve o erro e a maioria dos erros também incluirá um campo de `documentation_url` que aponta para algum conteúdo que pode ajudá-lo a resolver o erro.
|
||||
|
||||
## HTTP redirects
|
||||
## Redirecionamentos HTTP
|
||||
|
||||
The {% data variables.product.product_name %} REST API uses HTTP redirection where appropriate. Clients should assume that any
|
||||
request may result in a redirection. Receiving an HTTP redirection is *not* an
|
||||
error and clients should follow that redirect. Redirect responses will have a
|
||||
`Location` header field which contains the URI of the resource to which the
|
||||
client should repeat the requests.
|
||||
A API REST do {% data variables.product.product_name %} usa o redirecionamento HTTP quando apropriado. Os clientes devem assumir que qualquer solicitação pode resultar em um redirecionamento. Receber um redirecionamento de HTTP *não* é um erro e os clientes devem seguir esse redirecionamento. As respostas de redirecionamento terão
|
||||
um campo do cabeçalho do tipo `Location` que contém o URI do recurso ao qual o cliente deve repetir as solicitações.
|
||||
|
||||
Status Code | Description
|
||||
Código de status | Descrição
|
||||
-----------|-----------|
|
||||
`301` | Permanent redirection. The URI you used to make the request has been superseded by the one specified in the `Location` header field. This and all future requests to this resource should be directed to the new URI.
|
||||
`302`, `307` | Temporary redirection. The request should be repeated verbatim to the URI specified in the `Location` header field but clients should continue to use the original URI for future requests.
|
||||
`301` | Redirecionamento permanente. O URI que você usou para fazer a solicitação foi substituído pelo especificado no campo do cabeçalho `Location`. Este e todas as solicitações futuras deste recurso devem ser direcionadas para o novo URI.
|
||||
`302`, `307` | Redirecionamento temporário. A solicitação deve ser repetida literalmente para o URI especificado no campo de cabeçalho `Location`, mas os clientes devem continuar a usar o URI original para solicitações futuras.
|
||||
|
||||
Other redirection status codes may be used in accordance with the HTTP 1.1 spec.
|
||||
Outros códigos de status de redirecionamento podem ser usados de acordo com a especificação HTTP 1.1.
|
||||
|
||||
## HTTP verbs
|
||||
## Verbos HTTP
|
||||
|
||||
Where possible, the {% data variables.product.product_name %} REST API strives to use appropriate HTTP verbs for each
|
||||
action. Note that HTTP verbs are case-sensitive.
|
||||
Sempre que possível, a API REST do {% data variables.product.product_name %} procura usar verbos HTTP apropriados para cada ação. Observe que os verbos HTTP diferenciam maiúsculas de minúsculas.
|
||||
|
||||
Verb | Description
|
||||
Verbo | Descrição
|
||||
-----|-----------
|
||||
`HEAD` | Can be issued against any resource to get just the HTTP header info.
|
||||
`GET` | Used for retrieving resources.
|
||||
`POST` | Used for creating resources.
|
||||
`PATCH` | Used for updating resources with partial JSON data. For instance, an Issue resource has `title` and `body` attributes. A `PATCH` request may accept one or more of the attributes to update the resource.
|
||||
`PUT` | Used for replacing resources or collections. For `PUT` requests with no `body` attribute, be sure to set the `Content-Length` header to zero.
|
||||
`DELETE` |Used for deleting resources.
|
||||
`HEAD` | Pode ser emitido contra qualquer recurso para obter apenas as informações de cabeçalho HTTP.
|
||||
`GET` | Usado para recuperar recursos.
|
||||
`POST` | Usado para criar recursos.
|
||||
`PATCH` | Usado para atualizar recursos com dados parciais do JSON. Por exemplo, um recurso de problema tem os atributos `title` e `body`. Uma solicitação de `PATCH` pode aceitar um ou mais dos atributos para atualizar o recurso.
|
||||
`PUT` | Usado para substituir recursos ou coleções. Para solicitações `PUT` sem atributo `body`, defina o cabeçalho `Content-Length` como zero.
|
||||
`DELETE` |Usado para excluir recursos.
|
||||
|
||||
## Hypermedia
|
||||
## Hipermídia
|
||||
|
||||
All resources may have one or more `*_url` properties linking to other
|
||||
resources. These are meant to provide explicit URLs so that proper API clients
|
||||
don't need to construct URLs on their own. It is highly recommended that API
|
||||
clients use these. Doing so will make future upgrades of the API easier for
|
||||
developers. All URLs are expected to be proper [RFC 6570][rfc] URI templates.
|
||||
Todos os recursos podem ter uma ou mais propriedades `*_url` vinculando outros recursos. Estes tem o objetivo de fornecer URLs explícitas para que os clientes API apropriados não precisem construir URLs por conta própria. É altamente recomendável que os clientes da API
|
||||
os utilizem. Fazer isso tornará as futuras atualizações da API mais fáceis para os desenvolvedores. Espera-se que todas as URLs sejam modelos de URI [RFC 6570][rfc] adequados.
|
||||
|
||||
You can then expand these templates using something like the [uri_template][uri]
|
||||
gem:
|
||||
Em seguida, você pode expandir esses modelos usando algo como ogem [uri_template][uri]:
|
||||
|
||||
>> tmpl = URITemplate.new('/notifications{?since,all,participating}')
|
||||
>> tmpl.expand
|
||||
@@ -301,60 +273,56 @@ gem:
|
||||
[rfc]: https://datatracker.ietf.org/doc/html/rfc6570
|
||||
[uri]: https://github.com/hannesg/uri_template
|
||||
|
||||
## Pagination
|
||||
## Paginação
|
||||
|
||||
Requests that return multiple items will be paginated to 30 items by
|
||||
default. You can specify further pages with the `page` parameter. For some
|
||||
resources, you can also set a custom page size up to 100 with the `per_page` parameter.
|
||||
Note that for technical reasons not all endpoints respect the `per_page` parameter,
|
||||
see [events](/rest/reference/activity#events) for example.
|
||||
Pedidos que retornam vários itens serão paginados para 30 itens por padrão. Você pode especificar mais páginas com o parâmetro `page`. Para alguns recursos, você também pode definir um tamanho de página até 100 com o parâmetro `per_page`.
|
||||
Observe que por motivos técnicos nem todos os pontos de extremidade respeitam o parâmetro `per_page`, confira [eventos](/rest/reference/activity#events) por exemplo.
|
||||
|
||||
```shell
|
||||
$ curl '{% data variables.product.api_url_pre %}/user/repos?page=2&per_page=100'
|
||||
```
|
||||
|
||||
Note that page numbering is 1-based and that omitting the `page`
|
||||
parameter will return the first page.
|
||||
Observe que a numeração da página é baseada em 1 e que, ao omitir o parâmetro `page`, retornará a primeira página.
|
||||
|
||||
Some endpoints use cursor-based pagination. A cursor is a string that points to a location in the result set.
|
||||
With cursor-based pagination, there is no fixed concept of "pages" in the result set, so you can't navigate to a specific page.
|
||||
Instead, you can traverse the results by using the `before` or `after` parameters.
|
||||
Alguns pontos de extremidade usam paginação baseada no cursor. Um cursor é uma string que aponta para uma localização no conjunto de resultados.
|
||||
Com paginação baseada em cursor, não há um conceito fixo de "páginas" no conjunto de resultados. Portanto, você não pode navegar para uma página específica.
|
||||
Em vez disso, você pode percorrer os resultados usando os parâmetros `before` ou `after`.
|
||||
|
||||
For more information on pagination, check out our guide on [Traversing with Pagination][pagination-guide].
|
||||
Para obter mais informações sobre paginação, confira nosso guia sobre [Deslocamento com paginação][pagination-guide].
|
||||
|
||||
### Link header
|
||||
### Cabeçalho do link
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** It's important to form calls with Link header values instead of constructing your own URLs.
|
||||
**Observação:** É importante formar chamadas com valores de cabeçalho de link, em vez de construir suas URLs.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
The [Link header](https://datatracker.ietf.org/doc/html/rfc5988) includes pagination information. For example:
|
||||
O [cabeçalho Link](https://datatracker.ietf.org/doc/html/rfc5988) inclui informações de paginação. Por exemplo:
|
||||
|
||||
Link: <{% data variables.product.api_url_code %}/user/repos?page=3&per_page=100>; rel="next",
|
||||
<{% data variables.product.api_url_code %}/user/repos?page=50&per_page=100>; rel="last"
|
||||
|
||||
_The example includes a line break for readability._
|
||||
_O exemplo inclui uma quebra de linha para legibilidade._
|
||||
|
||||
Or, if the endpoint uses cursor-based pagination:
|
||||
Ou, se o ponto de extremidade usar paginação baseada em cursor:
|
||||
|
||||
Link: <{% data variables.product.api_url_code %}/orgs/ORG/audit-log?after=MTYwMTkxOTU5NjQxM3xZbGI4VE5EZ1dvZTlla09uWjhoZFpR&before=>; rel="next",
|
||||
|
||||
This `Link` response header contains one or more [Hypermedia](/rest#hypermedia) link relations, some of which may require expansion as [URI templates](https://datatracker.ietf.org/doc/html/rfc6570).
|
||||
Esse cabeçalho de resposta `Link` contém uma ou mais relações de link de [Hipermídia](/rest#hypermedia), algumas das quais podem exigir expansão como [modelos de URI](https://datatracker.ietf.org/doc/html/rfc6570).
|
||||
|
||||
The possible `rel` values are:
|
||||
Os valores `rel` possíveis são:
|
||||
|
||||
Name | Description
|
||||
Nome | Descrição
|
||||
-----------|-----------|
|
||||
`next` |The link relation for the immediate next page of results.
|
||||
`last` |The link relation for the last page of results.
|
||||
`first` |The link relation for the first page of results.
|
||||
`prev` |The link relation for the immediate previous page of results.
|
||||
`next` |A relação de link para a próxima página de resultados.
|
||||
`last` |A relação de link para a última página de resultados.
|
||||
`first` |A relação de link para a primeira página de resultados.
|
||||
`prev` |A relação de link para a página de resultados anterior imediata.
|
||||
|
||||
## Timeouts
|
||||
## Tempos limite
|
||||
|
||||
If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to process an API request, {% data variables.product.prodname_dotcom %} will terminate the request and you will receive a timeout response like this:
|
||||
Se {% data variables.product.prodname_dotcom %} leva mais de 10 segundos para processar uma solicitação de API, {% data variables.product.prodname_dotcom %} encerrará a solicitação e você receberá uma resposta de tempo limite como esta:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -362,23 +330,23 @@ If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to pr
|
||||
}
|
||||
```
|
||||
|
||||
{% data variables.product.product_name %} reserves the right to change the timeout window to protect the speed and reliability of the API.
|
||||
{% data variables.product.product_name %} se reserva o direito de alterar o período de tempo limite para proteger a velocidade e confiabilidade da API.
|
||||
|
||||
## Rate limiting
|
||||
## Limitação de taxa
|
||||
|
||||
Different types of API requests to {% data variables.location.product_location %} are subject to different rate limits.
|
||||
Os diferentes tipos de solicitações da API para {% data variables.location.product_location %} estão sujeitos a diferentes limites de taxa.
|
||||
|
||||
Additionally, the Search API has dedicated limits. For more information, see "[Search](/rest/reference/search#rate-limit)" in the REST API documentation.
|
||||
Além disso, a API de pesquisa tem limites dedicados. Para obter mais informações, confira "[Pesquisar](/rest/reference/search#rate-limit)" na documentação da API REST.
|
||||
|
||||
{% data reusables.enterprise.rate_limit %}
|
||||
|
||||
{% data reusables.rest-api.always-check-your-limit %}
|
||||
|
||||
### Requests from personal accounts
|
||||
### Solicitações de contas pessoais
|
||||
|
||||
Direct API requests that you authenticate with a {% data variables.product.pat_generic %} are user-to-server requests. An OAuth App or GitHub App can also make a user-to-server request on your behalf after you authorize the app. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)," "[Authorizing OAuth Apps](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)," and "[Authorizing GitHub Apps](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)."
|
||||
As solicitações diretas da API que você autentica com um {% data variables.product.pat_generic %} são solicitações do usuário para servidor. Um aplicativo OAuth ou GitHub também pode fazer uma solicitação de usuário para servidor em seu nome depois de autorizar o aplicativo. Para obter mais informações, confira "[Como criar um {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)", "[Como autorizar aplicativos OAuth](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)" e "[Como autorizar aplicativos GitHub](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)".
|
||||
|
||||
{% data variables.product.product_name %} associates all user-to-server requests with the authenticated user. For OAuth Apps and GitHub Apps, this is the user who authorized the app. All user-to-server requests count toward the authenticated user's rate limit.
|
||||
{% data variables.product.product_name %} associa todas as solicitações de usuário para servidor ao usuário autenticado. Para aplicativos OAuth e aplicativos GitHub, este é o usuário que autorizou o aplicativo. Todos os pedidos de usuário-servidor contam para o limite de taxa do usuário autenticado.
|
||||
|
||||
{% data reusables.apps.user-to-server-rate-limits %}
|
||||
|
||||
@@ -388,33 +356,33 @@ Direct API requests that you authenticate with a {% data variables.product.pat_g
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
|
||||
For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the person making requests.
|
||||
Para solicitações não autenticadas, o limite de taxa permite até 60 solicitações por hora. As solicitações não autenticadas estão associadas ao endereço IP original, e não à pessoa que faz as solicitações.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Requests from GitHub Apps
|
||||
### Solicitações de aplicativos GitHub
|
||||
|
||||
Requests from a GitHub App may be either user-to-server or server-to-server requests. For more information about rate limits for GitHub Apps, see "[Rate limits for GitHub Apps](/developers/apps/building-github-apps/rate-limits-for-github-apps)."
|
||||
As solicitações de um aplicativo GitHub podem ser de usuário para servidor ou de servidor para servidor. Para obter mais informações sobre limites de taxa para aplicativos GitHub, confira "[Limites de taxa para aplicativos GitHub](/developers/apps/building-github-apps/rate-limits-for-github-apps)".
|
||||
|
||||
### Requests from GitHub Actions
|
||||
### Solicitações do GitHub Actions
|
||||
|
||||
You can use the built-in `GITHUB_TOKEN` to authenticate requests in GitHub Actions workflows. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)."
|
||||
Você pode utilizar o `GITHUB_TOKEN` integrado para autenticar as solicitações nos fluxos de trabalho do GitHub Actions. Para obter mais informações, confira "[Autenticação automática de token](/actions/security-guides/automatic-token-authentication)".
|
||||
|
||||
When using `GITHUB_TOKEN`, the rate limit is 1,000 requests per hour per repository.{% ifversion fpt or ghec %} For requests to resources that belong to an enterprise account on {% data variables.location.product_location %}, {% data variables.product.prodname_ghe_cloud %}'s rate limit applies, and the limit is 15,000 requests per hour per repository.{% endif %}
|
||||
Quando `GITHUB_TOKEN` é usado, o limite de taxa é de 1.000 solicitações por hora por repositório.{% ifversion fpt or ghec %} Para solicitações a recursos que pertencem a uma conta corporativa na {% data variables.location.product_location %}, aplicam-se os limites de taxa do {% data variables.product.prodname_ghe_cloud %} e o limite é de 15.000 solicitações por hora por repositório.{% endif %}
|
||||
|
||||
### Checking your rate limit status
|
||||
### Verificando o status do seu limite da taxa
|
||||
|
||||
The Rate Limit API and a response's HTTP headers are authoritative sources for the current number of API calls available to you or your app at any given time.
|
||||
A API de limite de taxa e os cabeçalhos HTTP de uma resposta são fontes autorizadas para o número atual de chamadas de API disponíveis para você ou seu aplicativo a qualquer momento.
|
||||
|
||||
#### Rate Limit API
|
||||
#### API de limite de taxa
|
||||
|
||||
You can use the Rate Limit API to check your rate limit status without incurring a hit to the current limit. For more information, see "[Rate limit](/rest/reference/rate-limit)."
|
||||
Você pode usar a API do limite de taxa para verificar o status do seu limite de taxa sem impactar no limite atual. Para obter mais informações, confira "[Limite de taxa](/rest/reference/rate-limit)".
|
||||
|
||||
#### Rate limit HTTP headers
|
||||
#### Cabeçalhos de HTTP de limite de taxa
|
||||
|
||||
The returned HTTP headers of any API request show your current rate limit status:
|
||||
Os cabeçalhos HTTP retornados de qualquer solicitação de API mostram o seu status atual de limite de taxa:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %}/users/octocat
|
||||
@@ -426,21 +394,21 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat
|
||||
> x-ratelimit-reset: 1372700873
|
||||
```
|
||||
|
||||
Header Name | Description
|
||||
Nome do cabeçalho | Descrição
|
||||
-----------|-----------|
|
||||
`x-ratelimit-limit` | The maximum number of requests you're permitted to make per hour.
|
||||
`x-ratelimit-remaining` | The number of requests remaining in the current rate limit window.
|
||||
`x-ratelimit-used` | The number of requests you've made in the current rate limit window.
|
||||
`x-ratelimit-reset` | The time at which the current rate limit window resets in [UTC epoch seconds](http://en.wikipedia.org/wiki/Unix_time).
|
||||
`x-ratelimit-limit` | O número máximo de solicitações que você pode fazer por hora.
|
||||
`x-ratelimit-remaining` | O número de solicitações restantes na janela de limite de taxa atual.
|
||||
`x-ratelimit-used` | O número de solicitações feitas na janela de limite de taxa atual.
|
||||
`x-ratelimit-reset` | O tempo em que a janela de limite de taxa atual é redefinida em [segundos de época UTC](http://en.wikipedia.org/wiki/Unix_time).
|
||||
|
||||
If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object.
|
||||
Se você precisar de outro formato de tempo, qualquer linguagem de programação moderna pode fazer o trabalho. Por exemplo, se você abrir o console em seu navegador, você pode facilmente obter o tempo de redefinição como um objeto de tempo do JavaScript.
|
||||
|
||||
``` javascript
|
||||
new Date(1372700873 * 1000)
|
||||
// => Mon Jul 01 2013 13:47:53 GMT-0400 (EDT)
|
||||
```
|
||||
|
||||
If you exceed the rate limit, an error response returns:
|
||||
Se você exceder o limite de taxa, uma resposta do erro retorna:
|
||||
|
||||
```shell
|
||||
> HTTP/2 403
|
||||
@@ -456,9 +424,9 @@ If you exceed the rate limit, an error response returns:
|
||||
> }
|
||||
```
|
||||
|
||||
### Increasing the unauthenticated rate limit for OAuth Apps
|
||||
### Aumentando o limite de taxa não autenticado para aplicativos OAuth
|
||||
|
||||
If your OAuth App needs to make unauthenticated calls with a higher rate limit, you can pass your app's client ID and secret before the endpoint route.
|
||||
Se o seu aplicativo OAuth precisar fazer chamadas não autenticadas com um limite de taxa mais alto, você poderá passar o ID e o segredo do cliente do seu aplicativo antes do encaminhamento de pontos de extremidade.
|
||||
|
||||
```shell
|
||||
$ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre %}/user/repos
|
||||
@@ -472,21 +440,21 @@ $ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Never share your client secret with anyone or include it in client-side browser code. Use the method shown here only for server-to-server calls.
|
||||
**Observação:** Nunca compartilhe seu segredo de cliente com alguém ou o inclua no código do navegador do lado do cliente. Use o método mostrado aqui apenas para chamadas de servidor para servidor.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Staying within the rate limit
|
||||
### Manter-se dentro do limite de taxa
|
||||
|
||||
If you exceed your rate limit using Basic Authentication or OAuth, you can likely fix the issue by caching API responses and using [conditional requests](#conditional-requests).
|
||||
Se você exceder o limite de taxa usando a autenticação básica ou o OAuth, provavelmente poderá corrigir o problema armazenando em cache as respostas da API e usando [solicitações condicionais](#conditional-requests).
|
||||
|
||||
### Secondary rate limits
|
||||
### Limites de taxa secundária
|
||||
|
||||
In order to provide quality service on {% data variables.product.product_name %}, additional rate limits may apply to some actions when using the API. For example, using the API to rapidly create content, poll aggressively instead of using webhooks, make multiple concurrent requests, or repeatedly request data that is computationally expensive may result in secondary rate limiting.
|
||||
A fim de fornecer serviço de qualidade no {% data variables.product.product_name %}, podem-se aplicar limites de taxa adicionais podem a algumas ações ao usar a API. Por exemplo, usar a API para criar rapidamente conteúdo, fazer sondagem de modo agressivo em vez de usar webhooks, fazer várias solicitações simultâneas ou solicitar repetidamente dados caros do ponto de vista computacional podem resultar na limitação da taxa secundária.
|
||||
|
||||
Secondary rate limits are not intended to interfere with legitimate use of the API. Your normal rate limits should be the only limit you target. To ensure you're acting as a good API citizen, check out our [Best Practices guidelines](/guides/best-practices-for-integrators/).
|
||||
Limites de taxa secundária não pretendem interferir com o uso legítimo da API. Seus limites de taxa normais devem ser o único limite em que você deve focar. Para garantir que você esteja agindo como um bom cidadão da API, confira nossas [Diretrizes de Práticas Recomendadas](/guides/best-practices-for-integrators/).
|
||||
|
||||
If your application triggers this rate limit, you'll receive an informative response:
|
||||
Se seu aplicativo acionar este limite de taxa, você receberá uma resposta informativa:
|
||||
|
||||
```shell
|
||||
> HTTP/2 403
|
||||
@@ -501,19 +469,18 @@ If your application triggers this rate limit, you'll receive an informative resp
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
## User agent required
|
||||
## Agente de usuário obrigatório
|
||||
|
||||
All API requests MUST include a valid `User-Agent` header. Requests with no `User-Agent`
|
||||
header will be rejected. We request that you use your {% data variables.product.product_name %} username, or the name of your
|
||||
application, for the `User-Agent` header value. This allows us to contact you if there are problems.
|
||||
Todas as solicitações de API PRECISAM incluir um cabeçalho `User-Agent` válido. Solicitações sem cabeçalho `User-Agent` serão rejeitadas. Pedimos que use seu nome de usuário de {% data variables.product.product_name %} ou o nome de seu
|
||||
aplicativo, para o valor do cabeçalho `User-Agent`. Isso nos permite entrar em contato com você, em caso de problemas.
|
||||
|
||||
Here's an example:
|
||||
Veja um exemplo:
|
||||
|
||||
```shell
|
||||
User-Agent: Awesome-Octocat-App
|
||||
```
|
||||
|
||||
cURL sends a valid `User-Agent` header by default. If you provide an invalid `User-Agent` header via cURL (or via an alternative client), you will receive a `403 Forbidden` response:
|
||||
O cURL envia um cabeçalho `User-Agent` válido por padrão. Se você fornecer um cabeçalho `User-Agent` inválido via cURL (ou por meio de um cliente alternativo), receberá uma resposta `403 Forbidden`:
|
||||
|
||||
```shell
|
||||
$ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta
|
||||
@@ -528,20 +495,15 @@ $ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Conditional requests
|
||||
## Solicitações condicionais
|
||||
|
||||
Most responses return an `ETag` header. Many responses also return a `Last-Modified` header. You can use the values
|
||||
of these headers to make subsequent requests to those resources using the
|
||||
`If-None-Match` and `If-Modified-Since` headers, respectively. If the resource
|
||||
has not changed, the server will return a `304 Not Modified`.
|
||||
A maioria das respostas retorna um cabeçalho `ETag`. Muitas respostas também retornam um cabeçalho `Last-Modified`. Você pode usar os valores desses cabeçalhos para fazer solicitações subsequentes a esses recursos usando os cabeçalhos `If-None-Match` e `If-Modified-Since`, respectivamente. Se o recurso não tiver sido alterado, o servidor retornará um `304 Not Modified`.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Note**: Making a conditional request and receiving a 304 response does not
|
||||
count against your [Rate Limit](#rate-limiting), so we encourage you to use it
|
||||
whenever possible.
|
||||
**Observação**: Fazer uma solicitação condicional e receber uma resposta 304 não conta para o seu [Limite de Taxa](#rate-limiting). Portanto, recomendamos que você o utilize sempre que possível.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
@@ -578,16 +540,12 @@ $ curl -I {% data variables.product.api_url_pre %}/user -H "If-Modified-Since: T
|
||||
> x-ratelimit-reset: 1372700873
|
||||
```
|
||||
|
||||
## Cross origin resource sharing
|
||||
## Compartilhamento de recursos entre origens
|
||||
|
||||
The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from
|
||||
any origin.
|
||||
You can read the [CORS W3C Recommendation](http://www.w3.org/TR/cors/), or
|
||||
[this intro](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki) from the
|
||||
HTML 5 Security Guide.
|
||||
A API é compatível com Compartilhamento de Recursos de Origens Cruzadas (CORS) para solicitações de AJAX de qualquer origem.
|
||||
Você pode ler a [Recomendação CORS W3C](http://www.w3.org/TR/cors/) ou [esta introdução](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki) do Guia de Segurança HTML 5.
|
||||
|
||||
Here's a sample request sent from a browser hitting
|
||||
`http://example.com`:
|
||||
Aqui está uma solicitação de exemplo enviada de um navegador atingindo `http://example.com`:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com"
|
||||
@@ -596,7 +554,7 @@ Access-Control-Allow-Origin: *
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
```
|
||||
|
||||
This is what the CORS preflight request looks like:
|
||||
A solicitação pré-voo de CORS se parece com isso:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS
|
||||
@@ -608,13 +566,9 @@ Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ra
|
||||
Access-Control-Max-Age: 86400
|
||||
```
|
||||
|
||||
## JSON-P callbacks
|
||||
## Chamadas de retorno do JSON-P
|
||||
|
||||
You can send a `?callback` parameter to any GET call to have the results
|
||||
wrapped in a JSON function. This is typically used when browsers want
|
||||
to embed {% data variables.product.product_name %} content in web pages by getting around cross domain
|
||||
issues. The response includes the same data output as the regular API,
|
||||
plus the relevant HTTP Header information.
|
||||
Você pode enviar um parâmetro `?callback` para qualquer chamada de GET para envolver os resultados em uma função JSON. Isso geralmente é usado quando os navegadores desejam incorporar o conteúdo do {% data variables.product.product_name %} em páginas da Web, contornando problemas entre domínios. A resposta inclui a mesma saída de dados da API regular, mais as informações relevantes do cabeçalho de HTTP.
|
||||
|
||||
```shell
|
||||
$ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
@@ -635,7 +589,7 @@ $ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
> })
|
||||
```
|
||||
|
||||
You can write a JavaScript handler to process the callback. Here's a minimal example you can try out:
|
||||
Você pode escrever um manipulador do JavaScript para processar o retorno de chamada. Aqui está um exemplo pequeno que você pode experimentar:
|
||||
|
||||
<html>
|
||||
<head>
|
||||
@@ -659,15 +613,13 @@ You can write a JavaScript handler to process the callback. Here's a minimal exa
|
||||
</body>
|
||||
</html>
|
||||
|
||||
All of the headers are the same String value as the HTTP Headers with one
|
||||
notable exception: Link. Link headers are pre-parsed for you and come
|
||||
through as an array of `[url, options]` tuples.
|
||||
Todos os cabeçalhos têm o mesmo valor da string que os cabeçalhos de HTTP com uma exceção notável: Link. Cabeçalhos de link são pré-analisados para você e chegam como um array de tuplas de `[url, options]`.
|
||||
|
||||
A link that looks like this:
|
||||
Um link que se parece com isto:
|
||||
|
||||
Link: <url1>; rel="next", <url2>; rel="foo"; bar="baz"
|
||||
|
||||
... will look like this in the Callback output:
|
||||
... será mostrado assim na saída da chamada de retorno:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -689,39 +641,39 @@ A link that looks like this:
|
||||
}
|
||||
```
|
||||
|
||||
## Timezones
|
||||
## Fusos horários
|
||||
|
||||
Some requests that create new data, such as creating a new commit, allow you to provide time zone information when specifying or generating timestamps. We apply the following rules, in order of priority, to determine timezone information for such API calls.
|
||||
Algumas solicitações que criam novos dados, como a criação de um novo commit, permitem que você forneça informações do fuso horário ao especificar ou marcas de tempo. Aplicamos as seguintes regras, por ordem de prioridade, para determinar as informações do fuso horário para essas chamadas da API.
|
||||
|
||||
* [Explicitly providing an ISO 8601 timestamp with timezone information](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
* [Using the `Time-Zone` header](#using-the-time-zone-header)
|
||||
* [Using the last known timezone for the user](#using-the-last-known-timezone-for-the-user)
|
||||
* [Defaulting to UTC without other timezone information](#defaulting-to-utc-without-other-timezone-information)
|
||||
* [Fornecer explicitamente uma marca de tempo ISO 8601 com informações de fuso horário](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
* [Usar o cabeçalho `Time-Zone`](#using-the-time-zone-header)
|
||||
* [Usar o último fuso horário conhecido para o usuário](#using-the-last-known-timezone-for-the-user)
|
||||
* [Definir como padrão UTC sem outras informações de fuso horário](#defaulting-to-utc-without-other-timezone-information)
|
||||
|
||||
Note that these rules apply only to data passed to the API, not to data returned by the API. As mentioned in "[Schema](#schema)," timestamps returned by the API are in UTC time, ISO 8601 format.
|
||||
Observe que essas regras se aplicam somente a dados passados para a API, não a dados retornados pela API. Conforme mencionado no "[Esquema](#schema)", os registros de hora retornados pela API estão em formato UTC, ISO 8601.
|
||||
|
||||
### Explicitly providing an ISO 8601 timestamp with timezone information
|
||||
### Fornecer explicitamente uma marca de tempo ISO 8601 com informações de fuso horário
|
||||
|
||||
For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the [Commits API](/rest/reference/git#commits).
|
||||
Para chamadas de API que permitem que uma marca de tempo seja especificada, usamos essa marca de tempo exata. Um exemplo disso é a [API Commits](/rest/reference/git#commits).
|
||||
|
||||
These timestamps look something like `2014-02-27T15:05:06+01:00`. Also see [this example](/rest/reference/git#example-input) for how these timestamps can be specified.
|
||||
Esses carimbos de data/hora se parecem com `2014-02-27T15:05:06+01:00`. Confira também [este exemplo](/rest/reference/git#example-input) para saber como esses carimbos de data/hora podem ser especificados.
|
||||
|
||||
### Using the `Time-Zone` header
|
||||
### Usar o cabeçalho `Time-Zone`
|
||||
|
||||
It is possible to supply a `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
É possível fornecer um cabeçalho `Time-Zone` que define um fuso horário de acordo com a [lista de nomes do banco de dados Olson](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
|
||||
```shell
|
||||
$ curl -H "Time-Zone: Europe/Amsterdam" -X POST {% data variables.product.api_url_pre %}/repos/github/linguist/contents/new_file.md
|
||||
```
|
||||
|
||||
This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the [Contents API](/rest/reference/repos#contents) generates a git commit for each addition or change and uses the current time as the timestamp. This header will determine the timezone used for generating that current timestamp.
|
||||
Isso significa que geramos uma marca de tempo no momento em que sua chamada de API é feita no fuso horário que este cabeçalho define. Por exemplo, o [API de Conteúdo](/rest/reference/repos#contents) gera um commit do git para cada adição ou alteração e usa a hora atual como marca de tempo. Este cabeçalho determinará o fuso horário usado para gerar essa marca de tempo atual.
|
||||
|
||||
### Using the last known timezone for the user
|
||||
### Usar o último fuso horário conhecido para o usuário
|
||||
|
||||
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website.
|
||||
Se nenhum cabeçalho `Time-Zone` for especificado e você fizer uma chamada autenticada para a API, nós usaremos o último fuso horário conhecido para o usuário autenticado. O último fuso horário conhecido é atualizado sempre que você navegar no site de {% data variables.product.product_name %}.
|
||||
|
||||
### Defaulting to UTC without other timezone information
|
||||
### Definir como padrão UTC sem outras informações de fuso horário
|
||||
|
||||
If the steps above don't result in any information, we use UTC as the timezone to create the git commit.
|
||||
Se as etapas acima não resultarem em nenhuma informação, usaremos UTC como o fuso horário para criar o commit do git.
|
||||
|
||||
[pagination-guide]: /guides/traversing-with-pagination
|
||||
|
||||
@@ -258,6 +258,8 @@ sections:
|
||||
- Reconfigure the IdP by uploading a static copy of the SAML metadata without the `WantAssertionsEncrypted` attribute.
|
||||
- Copy the SAML metadata, remove `WantAssertionsEncrypted` attribute, host it on a web server, and reconfigure the IdP to point to that URL.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
deprecations:
|
||||
- heading: Deprecation of GitHub Enterprise Server 3.0
|
||||
notes:
|
||||
|
||||
@@ -55,6 +55,8 @@ sections:
|
||||
- Reconfigure the IdP by uploading a static copy of the SAML metadata without the `WantAssertionsEncrypted` attribute.
|
||||
- Copy the SAML metadata, remove `WantAssertionsEncrypted` attribute, host it on a web server, and reconfigure the IdP to point to that URL.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
deprecations:
|
||||
- heading: Deprecation of GitHub Enterprise Server 3.0
|
||||
notes:
|
||||
|
||||
@@ -31,6 +31,8 @@ sections:
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
deprecations:
|
||||
- heading: Deprecation of GitHub Enterprise Server 3.0
|
||||
notes:
|
||||
|
||||
@@ -37,4 +37,6 @@ sections:
|
||||
- |
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4 releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -28,4 +28,6 @@ sections:
|
||||
- |
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -27,4 +27,6 @@ sections:
|
||||
- |
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration.
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -32,3 +32,5 @@ sections:
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -24,3 +24,5 @@ sections:
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -24,3 +24,5 @@ sections:
|
||||
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
|
||||
- After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
@@ -27,4 +27,6 @@ sections:
|
||||
- The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues.
|
||||
- Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail.
|
||||
- Actions services need to be restarted after restoring an appliance from a backup taken on a different host.
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}'
|
||||
- |
|
||||
GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28]
|
||||
Reference in New Issue
Block a user