> ## Documentation Index
> Fetch the complete documentation index at: https://botpress.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Add a bot to GitHub using the official integration.

{/* vale on */}

[Open in Hub](https://studio.botpress.cloud/home?exploreHub=1\&hubItemId=intver_01KMZAHF5WMDMTT9H6V3DQ8T50)
*v1.2.1*

The official GitHub integration allows your bot to interact with your GitHub repositories.

## Setup

> [tab] Basic configuration
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [GitHub account](https://github.com/signup)
>
> **Step 1**
>
> In Botpress Studio, select **Explore Hub** in the upper-right corner.
>
> **Step 2**
>
> Search for the **GitHub** integration, then select **Install Integration**.
>
> **Step 3**
>
> In the **Configuration** menu, select **Authorize GitHub**.
>
> **Step 4**
>
> Follow the instructions to connect Botpress to your GitHub account.
>
> > [!NOTE]
> >
> > When using this configuration mode, a Botpress-managed GitHub App connects to your GitHub organizations and repositories. The app has the necessary permissions to listen to pull request and issue events and to create comments on issues, pull requests, and discussions.
> >
> > If you need more granular control over permissions or prefer to use your own GitHub App, choose one of the manual configuration options instead.

> [tab] Manual with GitHub App
>
> For advanced use cases, you can use your own GitHub App with our integration.
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [GitHub account](https://github.com/signup)
>
> ### Step 1: Install the integration
>
> First, install the integration in Botpress:
>
> **Step 1**
>
> In Botpress Studio, select **Explore Hub** in the upper-right corner.
>
> **Step 2**
>
> Search for the **GitHub** integration, then select **Install Integration**.
>
> **Step 3**
>
> In the **Configuration** menu, select the drop-down menu, then select **Configure with a GitHub App**.
>
> **Step 4**
>
> Copy the webhook URL—you'll need it when creating your GitHub App.
>
> ### Step 2: Create a GitHub App
>
> Next, create your GitHub App:
>
> **Step 1**
>
> On GitHub, navigate to your organization's **Settings** page (or your personal account settings).
>
> **Step 2**
>
> In the left sidebar, select **Developer settings**, then **GitHub Apps**.
>
> **Step 3**
>
> Select **New GitHub App**.
>
> **Step 4**
>
> Fill in the required fields:
>
> * **GitHub App name**: Choose a unique name for your app.
> * **Homepage URL**: Enter your organization's website or any valid URL.
>
> **Step 5**
>
> In the **Webhook** section:
>
> * Paste the webhook URL you copied from Botpress into the **Webhook URL** field.
> * Generate a secure secret key using a password generator.
> * Paste the secret key into the **Webhook secret** field.
>
> ### Step 3: Configure permissions
>
> Set the required permissions for your GitHub App:
>
> **Repository permissions:**
>
> * **Discussions**: Read & write
> * **Issues**: Read & write
> * **Pull requests**: Read & write
>
> **Organization permissions:**
>
> * **Team discussions**: Read & write
>
> ### Step 4: Subscribe to webhook events
>
> Select the webhook events your bot should receive:
>
> * Discussion
> * Discussion comment
> * Issues
> * Issue comment
> * Pull request
> * Pull request review
> * Pull request review comment
> * Pull request review thread
>
> When you're done, select **Create GitHub App**.
>
> ### Step 5: Generate a private key
>
> Next, generate a private key:
>
> **Step 1**
>
> In your newly created GitHub App, navigate to the **General** tab.
>
> **Step 2**
>
> Scroll down to **Private keys** and select **Generate a private key**.
>
> **Step 3**
>
> Save the downloaded `.pem` file to a secure location.
>
> ### Step 6: Install the GitHub App
>
> Now you can install the GitHub App:
>
> **Step 1**
>
> In your GitHub App's settings, select **Install App** from the left sidebar.
>
> **Step 2**
>
> Select the organization or account where you want to install the app.
>
> **Step 3**
>
> Choose whether to grant access to all repositories or select specific ones.
>
> **Step 4**
>
> Select **Install**.
>
> ### Step 7: Configure the integration in Botpress
>
> Finally, fill in the integration's configuration fields:
>
> > [accordion] GitHub App ID
> >
> > 1. In your GitHub App's **General** tab, find the **App ID** field.
> > 2. Copy the App ID and paste it into the **GitHub App ID** field in Botpress.
>
> > [accordion] GitHub App Private Key
> >
> > Open the `.pem` file you downloaded earlier and paste its entire contents into the **GitHub App Private Key** field.
>
> > [accordion] GitHub Webhook Secret
> >
> > Paste the webhook secret key you generated in [Step 2](#step-2:-create-a-github-app) into the **GitHub Webhook Secret** field.
>
> > [accordion] GitHub App Installation ID
> >
> > 1. Navigate to your organization's **Settings > Installed GitHub Apps**.
> > 2. Find your newly installed GitHub App and select **Configure**.
> > 3. Look at the URL—it should end with `/installations/:installation_id`. For example, in `https://github.com/organizations/my-org/settings/installations/123456`, the installation ID is `123456`.
> > 4. Copy the installation ID and paste it into the **GitHub App Installation ID** field in Botpress.
>
> When you've filled in all the fields, select **Save Configuration**. This will automatically enable your integration.
>
> > [!TIP]
> >
> > You've manually configured your GitHub integration with a GitHub App!

> [tab] Manual with Personal Access Token (PAT)
>
> You can also use a Personal Access Token (PAT) to connect your GitHub account to Botpress.
>
> > [!WARNING]
> >
> > When you use a PAT, actions taken by the bot will be attributed to your personal GitHub account. If you want actions attributed to your organization, use the [GitHub App configuration](#manual-with-github-app) instead.
> >
> > GitHub Apps also don't consume a seat in your organization and offer more granular permissions—we recommend using them for production use cases.
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [GitHub account](https://github.com/signup)
>
> ### Step 1: Install the integration
>
> **Step 1**
>
> In Botpress Studio, select **Explore Hub** in the upper-right corner.
>
> **Step 2**
>
> Search for the **GitHub** integration, then select **Install Integration**.
>
> **Step 3**
>
> In the **Configuration** menu, select the drop-down menu, then select **Configure with a Personal Access Token**.
>
> **Step 4**
>
> Copy the webhook URL—you'll need it when setting up the webhook.
>
> ### Step 2: Enable fine-grained PATs for your organization
>
> If you're using an organization, you need to enable fine-grained Personal Access Tokens:
>
> **Step 1**
>
> On GitHub, navigate to your organization's **Settings** page.
>
> **Step 2**
>
> In the left sidebar, under **Third-party Access**, select **Personal access tokens**.
>
> **Step 3**
>
> Select **Allow access via fine-grained personal access tokens**.
>
> **Step 4**
>
> Complete the setup process to enable fine-grained PATs.
>
> > [!NOTE]
> >
> > You don't need to enable classic personal access tokens.
>
> ### Step 3: Set up the webhook
>
> **Step 1**
>
> Navigate to either your repository or organization's **Settings** page on GitHub.
>
> **Step 2**
>
> In the left sidebar, select **Webhooks**, then **Add webhook**.
>
> **Step 3**
>
> Configure the webhook:
>
> * **Payload URL**: Paste the webhook URL from Botpress.
> * **Content type**: Select `application/json`.
> * **Secret**: Generate a secure secret key and paste it here.
>
> **Step 4**
>
> Under **Which events would you like to trigger this webhook?**, select **Let me select individual events**, then choose:
>
> * Discussion
> * Discussion comment
> * Issues
> * Issue comment
> * Pull request
> * Pull request review
> * Pull request review comment
> * Pull request review thread
>
> **Step 5**
>
> Select **Add webhook**.
>
> ### Step 4: Create a fine-grained Personal Access Token
>
> **Step 1**
>
> On GitHub, go to your account **Settings**.
>
> **Step 2**
>
> In the left sidebar, select **Developer settings**, then **Personal access tokens > Fine-grained tokens**.
>
> **Step 3**
>
> Select **Generate new token**.
>
> **Step 4**
>
> Configure the token:
>
> * **Token name**: Enter a descriptive name (e.g., "Botpress Integration").
>
> * **Expiration**: Choose an appropriate expiration date.
>
> * **Resource owner**: Select your organization (or personal account).
>
> * **Repository access**: Select the repositories your bot needs access to.
>
> > [!NOTE]
> >
> > If you select **Public Repositories only**, the bot won't be able to reply to issues or pull requests.
>
> **Step 5**
>
> Under **Permissions**, set the following:
>
> **Repository permissions:**
>
> * **Discussions**: Read & write
> * **Issues**: Read & write
> * **Pull requests**: Read & write
>
> **Organization (or Account) permissions:**
>
> * **Team discussions**: Read & write
>
> **Step 6**
>
> Select **Generate token** and copy it to a secure location.
>
> ### Step 5: Configure the integration in Botpress
>
> Fill in the integration's configuration fields:
>
> > [accordion] GitHub Personal Access Token
> >
> > Paste the Personal Access Token you generated in the previous step.
>
> > [accordion] GitHub Webhook Secret
> >
> > Paste the webhook secret key you generated in [Step 3](#step-3:-set-up-the-webhook).
>
> When you've filled in all the fields, select **Save Configuration**. This will automatically enable your integration.
>
> > [!TIP]
> >
> > You've manually configured your GitHub integration with a Personal Access Token!

***

## Cards

{/* vale off */}

Here's a reference for all [Cards](https://botpress.com/docs/studio/concepts/cards/introduction.md) available with the integration:

### Find Target

Find a target in a repository

**input** `object`

**query** `string` *required*

The query used to find the target

**channel** `enum\<string\>` *required*

The channel of the target

Available options: `pullRequest`, `issue`

**repo** `string` *required*

The repository name

**output** `object`

**targets** `array` *required*

The list of received target

**array item properties**

**displayName** `string` *required*

The display name

**tags** `object` *required*

The tags associated with the target

**channel** `enum\<string\>` *required*

The channel of the target

Available options: `pullRequest`, `issue`

***

## Triggers

{/* vale off */}

Here's a reference for all [Triggers](https://botpress.com/docs/studio/concepts/triggers.md) available with the integration:

> [!TIP]
>
> You can access data returned from any of these Triggers by reading `event.payload` after the Trigger fires.

### Aggregate File Changes

**payload** `object`

**modifiedItems** `object` *required*

The modified items

**created** `array` *required*

The files created

**array item properties**

**id** `string` *required*

The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the file is in the root folder.

**absolutePath** `string` *required*

The full path of the file

**sizeInBytes** `number`

The file size in bytes, if available

**lastModifiedDate** `string (date-time)`

The last modified date of the file, if available

**contentHash** `string`

The hash of the file content, or version/revision number, if available

**updated** `array` *required*

The files updated

**array item properties**

**id** `string` *required*

The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the file is in the root folder.

**absolutePath** `string` *required*

The full path of the file

**sizeInBytes** `number`

The file size in bytes, if available

**lastModifiedDate** `string (date-time)`

The last modified date of the file, if available

**contentHash** `string`

The hash of the file content, or version/revision number, if available

**deleted** `array` *required*

The files and folders deleted

> [tab] file
>
> **id** `string` *required*
>
> The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.
>
> **type** `string` *required*
>
> **name** `string` *required*
>
> The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."
>
> **parentId** `string`
>
> The parent folder ID. Leave empty if the file is in the root folder.
>
> **absolutePath** `string` *required*
>
> The full path of the file
>
> **sizeInBytes** `number`
>
> The file size in bytes, if available
>
> **lastModifiedDate** `string (date-time)`
>
> The last modified date of the file, if available
>
> **contentHash** `string`
>
> The hash of the file content, or version/revision number, if available

> [tab] folder
>
> **id** `string` *required*
>
> The folder's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.
>
> **type** `string` *required*
>
> **name** `string` *required*
>
> The folder's name. This will be displayed in the Botpress UI and be used as the folder's name on Files API."
>
> **parentId** `string`
>
> The parent folder ID. Leave empty if the folder is in the root folder.
>
> **absolutePath** `string` *required*
>
> The full path of the folder

### File Created

**payload** `object`

**file** `object` *required*

The created file

**id** `string` *required*

The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the file is in the root folder.

**absolutePath** `string` *required*

The full path of the file

**sizeInBytes** `number`

The file size in bytes, if available

**lastModifiedDate** `string (date-time)`

The last modified date of the file, if available

**contentHash** `string`

The hash of the file content, or version/revision number, if available

### File Deleted

**payload** `object`

**file** `object` *required*

The deleted file

**id** `string` *required*

The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the file is in the root folder.

**absolutePath** `string` *required*

The full path of the file

**sizeInBytes** `number`

The file size in bytes, if available

**lastModifiedDate** `string (date-time)`

The last modified date of the file, if available

**contentHash** `string`

The hash of the file content, or version/revision number, if available

### File Updated

**payload** `object`

**file** `object` *required*

The updated file

**id** `string` *required*

The file's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The file's name. This will be displayed in the Botpress UI and be used as the file's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the file is in the root folder.

**absolutePath** `string` *required*

The full path of the file

**sizeInBytes** `number`

The file size in bytes, if available

**lastModifiedDate** `string (date-time)`

The last modified date of the file, if available

**contentHash** `string`

The hash of the file content, or version/revision number, if available

### Folder Deleted Recursive

**payload** `object`

**folder** `object` *required*

The deleted folder

**id** `string` *required*

The folder's ID. This could be a unique identifier from the external service, or a relative or absolute path, so long as it's unique.

**type** `string` *required*

**name** `string` *required*

The folder's name. This will be displayed in the Botpress UI and be used as the folder's name on Files API."

**parentId** `string`

The parent folder ID. Leave empty if the folder is in the root folder.

**absolutePath** `string` *required*

The full path of the folder

### Issue opened

Triggered when an issue is opened

**payload** `object`

**issue** `object` *required*

The issue that was opened

**id** `number` *required*

Unique identifier of the issue

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the issue

**name** `string` *required*

Name of the issue

**repository** `object` *required*

The repository the issue belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**body** `string` *required*

The body of the issue

**number** `number` *required*

The issue number

**labels** `array` *required*

The labels associated with the issue

**array item properties**

**id** `number` *required*

Unique identifier of the label

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the label

**name** `string` *required*

Name of the label

**author** `object` *required*

The author of the issue

**id** `number` *required*

Unique identifier of the author

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the author

**name** `string` *required*

Name of the author

**handle** `string` *required*

The handle of the author

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this author

**assignees** `array` *required*

The assignees of the issue

**array item properties**

**id** `number` *required*

Unique identifier of the assignee

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the assignee

**name** `string` *required*

Name of the assignee

**handle** `string` *required*

The handle of the assignee

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this assignee

**eventSender** `object` *required*

The user who triggered the event

**id** `number` *required*

Unique identifier of the user

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the user

**name** `string` *required*

Name of the user

**handle** `string` *required*

The handle of the user

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this user

**id** `number` *required*

use issue.id instead

**issueUrl** `string` *required*

use issue.url instead

**repoUrl** `string` *required*

use issue.repository.url instead

**number** `number` *required*

use issue.number instead

**title** `string` *required*

use issue.name instead

**content** `string | null` *required*

**repositoryName** `string` *required*

use issue.repository.name instead

**repositoryOwner** `string` *required*

use issue.repository.owner.handle instead

### Pull Request merged

Triggered when a pull request is merged

**payload** `object`

**pullRequest** `object` *required*

The pull request that was merged

**id** `number` *required*

Unique identifier of the pull request

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the pull request

**name** `string` *required*

Name of the pull request

**repository** `object` *required*

The repository the pull request belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**body** `string` *required*

The body of the pull request

**number** `number` *required*

The pull request number

**labels** `array` *required*

The labels associated with the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the label

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the label

**name** `string` *required*

Name of the label

**author** `object` *required*

The author of the pull request

**id** `number` *required*

Unique identifier of the author

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the author

**name** `string` *required*

Name of the author

**handle** `string` *required*

The handle of the author

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this author

**assignees** `array` *required*

The assignees of the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the assignee

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the assignee

**name** `string` *required*

Name of the assignee

**handle** `string` *required*

The handle of the assignee

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this assignee

**target** `object` *required*

The target repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**source** `object` *required*

The source repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**eventSender** `object` *required*

The user who triggered the event

**id** `number` *required*

Unique identifier of the user

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the user

**name** `string` *required*

Name of the user

**handle** `string` *required*

The handle of the user

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this user

**type** `string`

Not needed anymore

**id** `number` *required*

use pullRequest.id instead

**title** `string` *required*

use pullRequest.name instead

**content** `string` *required*

use pullRequest.body instead

**baseBranch** `string`

use pullRequest.source.ref instead

**userId** `string`

use pullRequest.author.id instead

**conversationId** `string`

use the conversation id associated with the event instead

**targets** `object` *required*

Not needed

**pullRequest** `string`

use pullRequest.number instead

**issue** `string`

Not needed

**discussion** `string`

Not needed

### Pull Request opened

Triggered when a pull request is opened

**payload** `object`

**pullRequest** `object` *required*

The pull request that was opened

**id** `number` *required*

Unique identifier of the pull request

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the pull request

**name** `string` *required*

Name of the pull request

**repository** `object` *required*

The repository the pull request belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**body** `string` *required*

The body of the pull request

**number** `number` *required*

The pull request number

**labels** `array` *required*

The labels associated with the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the label

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the label

**name** `string` *required*

Name of the label

**author** `object` *required*

The author of the pull request

**id** `number` *required*

Unique identifier of the author

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the author

**name** `string` *required*

Name of the author

**handle** `string` *required*

The handle of the author

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this author

**assignees** `array` *required*

The assignees of the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the assignee

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the assignee

**name** `string` *required*

Name of the assignee

**handle** `string` *required*

The handle of the assignee

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this assignee

**target** `object` *required*

The target repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**source** `object` *required*

The source repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**eventSender** `object` *required*

The user who triggered the event

**id** `number` *required*

Unique identifier of the user

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the user

**name** `string` *required*

Name of the user

**handle** `string` *required*

The handle of the user

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this user

**type** `string`

Not needed anymore

**id** `number` *required*

use pullRequest.id instead

**title** `string` *required*

use pullRequest.name instead

**content** `string` *required*

use pullRequest.body instead

**baseBranch** `string`

use pullRequest.source.ref instead

**userId** `string`

use pullRequest.author.id instead

**conversationId** `string`

use the conversation id associated with the event instead

**targets** `object` *required*

Not needed

**pullRequest** `string`

use pullRequest.number instead

**issue** `string`

Not needed

**discussion** `string`

Not needed

### Pull Request review submitted

Triggered when a review is submitted on a pull request

**payload** `object`

**review** `object` *required*

The review that was submitted

**id** `number` *required*

Unique identifier of the pull request review

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the pull request review

**pullRequest** `object` *required*

The pull request being reviewed

**id** `number` *required*

Unique identifier of the pull request

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the pull request

**name** `string` *required*

Name of the pull request

**repository** `object` *required*

The repository the pull request belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**body** `string` *required*

The body of the pull request

**number** `number` *required*

The pull request number

**labels** `array` *required*

The labels associated with the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the label

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the label

**name** `string` *required*

Name of the label

**author** `object` *required*

The author of the pull request

**id** `number` *required*

Unique identifier of the author

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the author

**name** `string` *required*

Name of the author

**handle** `string` *required*

The handle of the author

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this author

**assignees** `array` *required*

The assignees of the pull request

**array item properties**

**id** `number` *required*

Unique identifier of the assignee

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the assignee

**name** `string` *required*

Name of the assignee

**handle** `string` *required*

The handle of the assignee

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this assignee

**target** `object` *required*

The target repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**source** `object` *required*

The source repository and branch of the pull request

**ref** `string` *required*

The name of the branch

**label** `string` *required*

The display label of the branch

**repository** `object` *required*

The repository the branch belongs to

**id** `number` *required*

Unique identifier of the repository

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository

**name** `string` *required*

Name of the repository

**owner** `object` *required*

The owner of the repository

**id** `number` *required*

Unique identifier of the repository owner

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the repository owner

**name** `string` *required*

Name of the repository owner

**handle** `string` *required*

The handle of the repository owner

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this repository owner

**commitId** `string` *required*

The commit ID of the review

**state** `enum\<string\>` *required*

The state of the review

Available options: `APPROVED`, `CHANGES_REQUESTED`, `COMMENTED`, `DISMISSED`

**author** `object` *required*

The author of the review

**id** `number` *required*

Unique identifier of the review author

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the review author

**name** `string` *required*

Name of the review author

**handle** `string` *required*

The handle of the review author

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this review author

**body** `string` *required*

The body of the review

**eventSender** `object` *required*

The user who triggered the event

**id** `number` *required*

Unique identifier of the user

**nodeId** `string` *required*

Node ID for GraphQL

**url** `string` *required*

URL of the user

**name** `string` *required*

Name of the user

**handle** `string` *required*

The handle of the user

**botpressUser** `string` *required*

The ID of the Botpress user corresponding to this user


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.