docs

GitHub

Read and comment on GitHub issues, pull requests, releases, and security alerts from a workbench

The GitHub tool lets a workbench agent call the GitHub REST API for issues, pull requests, repositories, and security alerts. The agent can read issues and pull requests, including diffs, check runs, and reviews; search issues, pull requests, and repositories; read branches, tags, and releases; and read code scanning, Dependabot, and secret scanning alerts. It can also comment, review, react, and close pull requests. You authenticate with a personal access token or a GitHub App installation, on GitHub.com or GitHub Enterprise Server.

For the complete list of integrations and general tool behavior, see Workbench tools.

Prerequisites

Before you begin, make sure you have:

  • A GitHub account or organization with the repositories the workbench should work with.
  • Either a personal access token or a GitHub App that you can install on those repositories.
  • Permission in Plural Console to create a configured tool and edit the target workbench.
  • An existing workbench, or permission to create one. See Setting up a workbench.

Option A: personal access token

  1. In GitHub, open Settings → Developer settings → Personal access tokens.
  2. Create a fine-grained token and select the resource owner and the repositories the workbench needs. A classic token also works.
  3. Grant the permissions from GitHub permissions for the operations you plan to use.
  4. Generate the token and copy its value.

A fine-grained token cannot read check runs. If the workbench needs check results, use a GitHub App or a classic token.

Option B: GitHub App