> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/github.md).

# GitHub

GitHub is a development platform for version control, code collaboration, and project management.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector                      | Authentication        |
| ------------------------------ | --------------------- |
| GitHub                         | OAuth sign-in         |
| GitHub (Personal Access Token) | Personal Access Token |

#### GitHub

Connect to GitHub via OAuth to interact with user-specific repositories, issues, pull requests, and more.

**Set up in GitHub**

1. Sign in to GitHub when the window opens.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **GitHub**.
2. Select **Connect**, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

**Provider documentation:** [Setup reference](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps).

#### GitHub (Personal Access Token)

Connect to GitHub with a Personal Access Token. Access to repositories, pull requests, commits, and more is governed by the token's own scopes.

**Set up in GitHub**

1. In GitHub, open Settings → Developer settings → Personal access tokens. Create a token for the account and repositories required by the workflow.
2. Choose repository access and permissions for the actions you will run. Obtain organization approval or SSO authorization if your organization requires it.
3. Copy the token before leaving its creation page and enter it in the StackAI connection.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **GitHub (Personal Access Token)**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field         | Required | What to enter                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Personal Access Token | Yes      | A GitHub Personal Access Token. The token's own scopes/permissions determine what actions succeed — grant only what the workflow needs (a fine-grained token with least-privilege permissions is recommended). A write action returns 403 if the token is read-only or lacks the required scope. [Provider instructions](https://github.com/settings/personal-access-tokens/new). |

**Provider documentation:** [Setup reference](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **GitHub** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Create Reference

Create a new Git reference (branch or tag) pointing to a specific commit.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Branch/Tag | string          | Yes      | The branch or tag to create (e.g., 'my-branch', 'feature/foo', or 'tags/v1.0').          |
| Commit SHA | string          | Yes      | The SHA of the commit to point the new reference to.                                     |

**Outputs**

| Field            | Type    | Description                                     |
| ---------------- | ------- | ----------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.               |
| Success          | boolean | Whether the reference was created successfully. |
| Result           | string  | Human-readable result description.              |
| Branch/Tag       | string  | The full reference name that was created.       |
| Reference Object | object  | The Git object this reference points to.        |
| API URL          | string  | The API URL for this reference.                 |

#### Delete Reference

Delete a Git reference (branch or tag) from a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Branch/Tag | string          | Yes      | The branch or tag to delete (e.g., 'my-branch', 'feature/foo', or 'tags/v1.0').          |

**Outputs**

| Field       | Type    | Description                                     |
| ----------- | ------- | ----------------------------------------------- |
| Status Code | integer | HTTP status code of the response.               |
| Success     | boolean | Whether the reference was deleted successfully. |
| Result      | string  | Human-readable result description.              |

#### Get Git Commit

Get detailed information about a specific Git commit.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Commit SHA | string          | Yes      | The SHA of the commit to retrieve.                                                       |

**Outputs**

| Field          | Type          | Description                                    |
| -------------- | ------------- | ---------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.              |
| Success        | boolean       | Whether the commit was retrieved successfully. |
| Result         | string        | Human-readable result description.             |
| Commit SHA     | string        | The full SHA of the commit.                    |
| Commit Message | string        | The commit message.                            |
| Author         | object        | Information about the commit author.           |
| Committer      | object        | Information about the committer.               |
| Tree           | object        | Information about the commit's tree object.    |
| Parent Commits | object\_array | List of parent commits.                        |
| API URL        | string        | The API URL for this commit.                   |

#### Get Reference

Get information about a Git reference (branch or tag).

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Branch/Tag | string          | Yes      | The branch or tag to retrieve (e.g., 'main', 'feature/foo', or 'tags/v1.0').             |

**Outputs**

| Field            | Type    | Description                                       |
| ---------------- | ------- | ------------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.                 |
| Success          | boolean | Whether the reference was retrieved successfully. |
| Result           | string  | Human-readable result description.                |
| Branch/Tag       | string  | The full reference name.                          |
| Reference Object | object  | The Git object this reference points to.          |
| API URL          | string  | The API URL for this reference.                   |

#### Update Reference

Update a Git reference (branch or tag) to point to a new commit.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only accessible public repositories can be used.

**Inputs**

| Field          | Type            | Required | Description                                                                                    |
| -------------- | --------------- | -------- | ---------------------------------------------------------------------------------------------- |
| Repository     | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.       |
| Branch/Tag     | string          | Yes      | The branch or tag to update (e.g., 'main', 'feature/foo', or 'tags/v1.0').                     |
| New Commit SHA | string          | Yes      | The SHA of the commit to point the reference to.                                               |
| Force Update   | boolean         | No       | Force the update even if it's not a fast-forward. Use with caution as this can overwrite work. |

**Outputs**

| Field            | Type    | Description                                     |
| ---------------- | ------- | ----------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.               |
| Success          | boolean | Whether the reference was updated successfully. |
| Result           | string  | Human-readable result description.              |
| Branch/Tag       | string  | The full reference name that was updated.       |
| Reference Object | object  | The Git object this reference now points to.    |
| API URL          | string  | The API URL for this reference.                 |

#### Check If Pull Request Is Merged

Check if a pull request has been merged into the target branch.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number of the pull request to check.                                                 |

**Outputs**

| Field       | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| Status Code | integer | HTTP status code of the response.             |
| Success     | boolean | Whether the operation completed successfully. |
| Result      | string  | Human-readable result description.            |
| Is Merged   | boolean | Whether the pull request has been merged.     |

#### Create Pull Request

Create a new pull request in a GitHub repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only accessible public repositories can be used.

**Inputs**

| Field           | Type            | Required | Description                                                                              |
| --------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository      | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Title           | string          | Yes      | The title of the pull request.                                                           |
| Source Branch   | string          | Yes      | The branch containing your changes.                                                      |
| Target Branch   | string          | Yes      | The branch you want to merge your changes into.                                          |
| Description     | textarea        | No       | The description of the pull request.                                                     |
| Create as Draft | boolean         | No       | Create the pull request as a draft.                                                      |

**Outputs**

| Field        | Type    | Description                                   |
| ------------ | ------- | --------------------------------------------- |
| Status Code  | integer | HTTP status code of the response.             |
| Success      | boolean | Whether the operation completed successfully. |
| Result       | string  | Human-readable result description.            |
| Pull Request | object  | The created pull request details.             |

#### Get Pull Request

Get detailed information about a specific pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                             |

**Outputs**

| Field        | Type    | Description                                   |
| ------------ | ------- | --------------------------------------------- |
| Status Code  | integer | HTTP status code of the response.             |
| Success      | boolean | Whether the operation completed successfully. |
| Result       | string  | Human-readable result description.            |
| Pull Request | object  | The pull request details.                     |

#### Get Pull Request Review

Get details of a specific review on a pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                             |
| Review ID           | integer         | Yes      | The unique identifier of the review.                                                     |

**Outputs**

| Field              | Type    | Description                                                   |
| ------------------ | ------- | ------------------------------------------------------------- |
| Status Code        | integer | HTTP status code of the response.                             |
| Success            | boolean | Whether the operation completed successfully.                 |
| Result             | string  | Human-readable result description.                            |
| Review ID          | integer | Unique identifier of the review.                              |
| Review State       | string  | The state of the review (APPROVED, CHANGES\_REQUESTED, etc.). |
| Review Body        | string  | The text content of the review.                               |
| Reviewer           | object  | The user who submitted the review.                            |
| Submitted At       | string  | When the review was submitted.                                |
| Commit SHA         | string  | The commit SHA the review was made on.                        |
| Review URL         | string  | URL to view the review on GitHub.                             |
| Author Association | string  | How the reviewer is associated with the repository.           |

#### Get Review Comment

Get a specific comment from a pull request review.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Comment ID | integer         | Yes      | The unique identifier of the review comment.                                             |

**Outputs**

| Field              | Type    | Description                                       |
| ------------------ | ------- | ------------------------------------------------- |
| Status Code        | integer | HTTP status code of the response.                 |
| Success            | boolean | Whether the operation completed successfully.     |
| Result             | string  | Human-readable result description.                |
| Comment ID         | integer | Unique identifier of the comment.                 |
| Comment Text       | string  | The text content of the comment.                  |
| Code Context       | string  | The diff hunk showing code context.               |
| File Path          | string  | The file the comment is on.                       |
| Line Number        | integer | The line number the comment refers to.            |
| Side               | string  | Which side of the diff (LEFT or RIGHT).           |
| Author             | object  | The user who made the comment.                    |
| Created At         | string  | When the comment was created.                     |
| Updated At         | string  | When the comment was last updated.                |
| Comment URL        | string  | URL to view the comment on GitHub.                |
| Review ID          | integer | The ID of the parent review.                      |
| Reply To ID        | integer | ID of the comment this is replying to.            |
| Author Association | string  | How the author is associated with the repository. |

#### List Pull Requests

List pull requests from a GitHub repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field         | Type            | Required | Description                                                                              |
| ------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository    | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| PR Status     | select (string) | No       | Filter pull requests by their current state. Available values: Open, Closed, All.        |
| Sort Order    | select (string) | No       | Sort order for the pull requests. Available values: Newest first, Oldest first.          |
| PR Author     | string          | No       | Filter pull requests by the GitHub username of the author.                               |
| Target Branch | string          | No       | Filter pull requests targeting this branch.                                              |

**Outputs**

| Field         | Type          | Description                                   |
| ------------- | ------------- | --------------------------------------------- |
| Status Code   | integer       | HTTP status code of the response.             |
| Success       | boolean       | Whether the operation completed successfully. |
| Result        | string        | Human-readable result description.            |
| Pull Requests | object\_array | List of pull requests from the repository.    |

#### List Comments for Review

List comments from a specific review (requires Review ID).

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                             |
| Review ID           | integer         | Yes      | The unique identifier of the review.                                                     |

**Outputs**

| Field          | Type          | Description                                   |
| -------------- | ------------- | --------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.             |
| Success        | boolean       | Whether the operation completed successfully. |
| Result         | string        | Human-readable result description.            |
| Total Comments | integer       | Total number of comments in the review.       |
| Comments       | object\_array | List of review comments.                      |

#### List PR Review Comments

List all review comments on a pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                             |

**Outputs**

| Field          | Type          | Description                                   |
| -------------- | ------------- | --------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.             |
| Success        | boolean       | Whether the operation completed successfully. |
| Result         | string        | Human-readable result description.            |
| Total Comments | integer       | Total number of review comments on the PR.    |
| Comments       | object\_array | List of review comments on the pull request.  |

#### List Pull Request Commits

List commits in a pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number of the pull request.                                                          |

**Outputs**

| Field       | Type          | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Status Code | integer       | HTTP status code of the response.             |
| Success     | boolean       | Whether the operation completed successfully. |
| Result      | string        | Human-readable result description.            |
| Commits     | object\_array | List of commits in the pull request.          |

#### List Pull Request Files

List all files changed in a pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                             |

**Outputs**

| Field             | Type          | Description                                          |
| ----------------- | ------------- | ---------------------------------------------------- |
| Status Code       | integer       | HTTP status code of the response.                    |
| Success           | boolean       | Whether the operation completed successfully.        |
| Result            | string        | Human-readable result description.                   |
| Total Files       | integer       | Total number of files changed in the PR.             |
| Patches Included  | integer       | Number of files with patch data included.            |
| Patches Truncated | boolean       | Whether some patches were omitted due to file count. |
| Files             | object\_array | List of files changed in the pull request.           |

#### List Pull Request Reviews

List all reviews for a pull request.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                              |
| ------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Pull Request Number | integer         | Yes      | The number of the pull request.                                                          |

**Outputs**

| Field       | Type          | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Status Code | integer       | HTTP status code of the response.             |
| Success     | boolean       | Whether the operation completed successfully. |
| Result      | string        | Human-readable result description.            |
| Reviews     | object\_array | List of reviews for the pull request.         |

#### Merge Pull Request

Merge a pull request into its base branch.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only accessible public repositories can be used.

**Inputs**

| Field               | Type            | Required | Description                                                                                                                                           |
| ------------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Repository          | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.                                                              |
| Pull Request Number | integer         | Yes      | The number that identifies the pull request.                                                                                                          |
| Merge Strategy      | select (string) | No       | How to merge the pull request. Defaults to squash. Available values: Squash and Merge (Recommended), Merge Commit, Rebase and Merge. Default: squash. |
| Commit Title        | string          | No       | Optional title for the merge commit.                                                                                                                  |
| Commit Message      | textarea        | No       | Optional message for the merge commit.                                                                                                                |

**Outputs**

| Field            | Type    | Description                                   |
| ---------------- | ------- | --------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.             |
| Success          | boolean | Whether the operation completed successfully. |
| Result           | string  | Human-readable result description.            |
| Merged           | boolean | Whether the PR was merged.                    |
| Merge Commit SHA | string  | SHA of the merge commit.                      |

#### Get Latest Release

Get the latest published release for a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field       | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| Status Code | integer | HTTP status code of the response.             |
| Success     | boolean | Whether the operation completed successfully. |
| Result      | string  | Human-readable result description.            |
| Release     | object  | The latest release information.               |

#### Get Pages

Get GitHub Pages information for a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field       | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| Status Code | integer | HTTP status code of the response.             |
| Success     | boolean | Whether the operation completed successfully. |
| Result      | string  | Human-readable result description.            |
| Pages       | object  | GitHub Pages configuration information.       |

#### Get README

Get the README file content for a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Branch/Tag | string          | No       | The branch or tag to get README from. Defaults to the repository's default branch.       |

**Outputs**

| Field          | Type    | Description                                   |
| -------------- | ------- | --------------------------------------------- |
| Status Code    | integer | HTTP status code of the response.             |
| Success        | boolean | Whether the operation completed successfully. |
| Result         | string  | Human-readable result description.            |
| README Content | string  | The decoded README content as plain text.     |
| Is Binary      | boolean | Whether the file is binary (non-text).        |
| File Path      | string  | The path to the README file.                  |
| File Size      | integer | Size of the README file in bytes.             |
| View URL       | string  | URL to view the README on GitHub.             |
| Download URL   | string  | URL to download the raw README file.          |

#### Get Release

Get a specific release by its ID.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                                        |
| ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.           |
| Release    | select (string) | Yes      | The release to retrieve (select from list or enter ID). Options load from the selected connection. |

**Outputs**

| Field       | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| Status Code | integer | HTTP status code of the response.             |
| Success     | boolean | Whether the operation completed successfully. |
| Result      | string  | Human-readable result description.            |
| Release     | object  | The release information.                      |

#### Get Webhook

Get a specific webhook by its ID.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `admin:repo_hook`
* `write:repo_hook`
* `read:repo_hook`
* `public_repo` — Only webhooks for accessible public repositories can be read.

**Inputs**

| Field      | Type            | Required | Description                                                                                        |
| ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.           |
| Webhook    | select (string) | Yes      | The webhook to retrieve (select from list or enter ID). Options load from the selected connection. |

**Outputs**

| Field       | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| Status Code | integer | HTTP status code of the response.             |
| Success     | boolean | Whether the operation completed successfully. |
| Result      | string  | Human-readable result description.            |
| Webhook     | object  | The webhook information.                      |

#### List Activities

List repository activities like pushes, merges, and branch changes. Filter by branch, actor, time period, or activity type.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field         | Type            | Required | Description                                                                                                                    |
| ------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Repository    | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.                                       |
| Branch        | string          | No       | Filter activities for a specific branch.                                                                                       |
| Actor         | string          | No       | Filter by the GitHub username who performed the activity.                                                                      |
| Time Period   | select (string) | No       | Filter activities by time period. Available values: Last 24 Hours, Last 7 Days, Last 30 Days, Last 90 Days.                    |
| Activity Type | select (string) | No       | Filter by type of activity. Available values: Push, Force Push, Branch Creation, Branch Deletion, PR Merge, Merge Queue Merge. |

**Outputs**

| Field            | Type          | Description                                   |
| ---------------- | ------------- | --------------------------------------------- |
| Status Code      | integer       | HTTP status code of the response.             |
| Success          | boolean       | Whether the operation completed successfully. |
| Result           | string        | Human-readable result description.            |
| Total Activities | integer       | Total number of activities returned.          |
| Activities       | object\_array | List of repository activities.                |

#### List Branches

List all branches in a repository with their protection status.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field          | Type            | Required | Description                                                                                                                     |
| -------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Repository     | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.                                        |
| Protected Only | boolean         | No       | Filter by protection status. True returns only protected branches, False returns only unprotected branches. Omit to return all. |

**Outputs**

| Field          | Type          | Description                                    |
| -------------- | ------------- | ---------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.              |
| Success        | boolean       | Whether the operation completed successfully.  |
| Result         | string        | Human-readable result description.             |
| Total Branches | integer       | Total number of branches returned.             |
| Branches       | object\_array | List of branches with their protection status. |
| Default Branch | string        | The repository's default branch name.          |

#### List Collaborators

List collaborators who have access to a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`, `admin:org`
* `repo`, `write:org`
* `repo`, `read:org`

**Inputs**

| Field            | Type            | Required | Description                                                                                                  |
| ---------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| Repository       | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.                     |
| Affiliation      | select (string) | No       | Filter by collaborator affiliation type. Available values: All, Direct Collaborators, Outside Collaborators. |
| Permission Level | select (string) | No       | Filter by permission level. Available values: Read, Triage, Write, Maintain, Admin.                          |

**Outputs**

| Field               | Type          | Description                                   |
| ------------------- | ------------- | --------------------------------------------- |
| Status Code         | integer       | HTTP status code of the response.             |
| Success             | boolean       | Whether the operation completed successfully. |
| Result              | string        | Human-readable result description.            |
| Total Collaborators | integer       | Total number of collaborators returned.       |
| Collaborators       | object\_array | List of collaborators with their permissions. |

#### List Commit Statuses

List commit statuses for a reference.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `repo:status`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Branch/Tag | string          | Yes      | The commit reference (SHA, branch name, or tag name).                                    |

**Outputs**

| Field          | Type          | Description                                   |
| -------------- | ------------- | --------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.             |
| Success        | boolean       | Whether the operation completed successfully. |
| Result         | string        | Human-readable result description.            |
| Total Statuses | integer       | Total number of commit statuses returned.     |
| Statuses       | object\_array | List of commit statuses for the ref.          |

#### List Commits

List commits in a repository with optional filters.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                                |
| ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------ |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.   |
| Branch/SHA | string          | No       | Branch name or SHA to start listing commits from. Defaults to repository's default branch. |
| File Path  | string          | No       | Only return commits containing changes to this file path.                                  |
| Author     | string          | No       | Filter by commit author (GitHub username or email).                                        |
| Since      | string          | No       | Only commits after this ISO 8601 timestamp.                                                |
| Until      | string          | No       | Only commits before this ISO 8601 timestamp.                                               |

**Outputs**

| Field         | Type          | Description                                   |
| ------------- | ------------- | --------------------------------------------- |
| Status Code   | integer       | HTTP status code of the response.             |
| Success       | boolean       | Whether the operation completed successfully. |
| Result        | string        | Human-readable result description.            |
| Total Commits | integer       | Total number of commits returned.             |
| Commits       | object\_array | List of commits with their details.           |

#### Compare Branches

Compare two branches, tags, or commits to see differences. Shows commits, file changes, and whether branches are ahead/behind/diverged.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field          | Type            | Required | Description                                                                              |
| -------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository     | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Base Branch    | string          | No       | The base branch, tag, or commit SHA to compare from. Default: main.                      |
| Head Branch    | string          | Yes      | The head branch, tag, or commit SHA to compare to.                                       |
| Include Files  | boolean         | No       | Include the list of changed files in the response.                                       |
| Exclude Author | string          | No       | Exclude commits from this author (exact name match).                                     |

**Outputs**

| Field             | Type          | Description                                        |
| ----------------- | ------------- | -------------------------------------------------- |
| Status Code       | integer       | HTTP status code of the response.                  |
| Success           | boolean       | Whether the operation completed successfully.      |
| Result            | string        | Human-readable result description.                 |
| Comparison Status | string        | How the branches relate to each other.             |
| Ahead By          | integer       | Number of commits head is ahead of base.           |
| Behind By         | integer       | Number of commits head is behind base.             |
| Total Commits     | integer       | Total number of commits in the comparison.         |
| Commit Summary    | string        | Summary of commits between branches.               |
| Commits           | object\_array | List of commits between the two references.        |
| Files Changed     | integer       | Number of files changed in the comparison.         |
| Changed Files     | object\_array | List of files changed (if include\_files is true). |
| Comparison URL    | string        | URL to view the comparison on GitHub.              |

#### List Contributors

List contributors to a repository, sorted by contributions.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field             | Type            | Required | Description                                                                              |
| ----------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository        | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Include Anonymous | boolean         | No       | Include anonymous contributors in the results.                                           |

**Outputs**

| Field              | Type          | Description                                          |
| ------------------ | ------------- | ---------------------------------------------------- |
| Status Code        | integer       | HTTP status code of the response.                    |
| Success            | boolean       | Whether the operation completed successfully.        |
| Result             | string        | Human-readable result description.                   |
| Total Contributors | integer       | Total number of contributors returned.               |
| Contributors       | object\_array | List of contributors with their contribution counts. |

#### List Deployments

List deployments for a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `repo_deployment`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field       | Type            | Required | Description                                                                                 |
| ----------- | --------------- | -------- | ------------------------------------------------------------------------------------------- |
| Repository  | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.    |
| Commit SHA  | string          | No       | Filter by the SHA recorded at creation time.                                                |
| Branch/Tag  | string          | No       | Filter by ref (branch, tag, or SHA).                                                        |
| Task        | string          | No       | Filter by task name (e.g., 'deploy').                                                       |
| Environment | select (string) | No       | Filter by environment name (e.g., 'production'). Options load from the selected connection. |

**Outputs**

| Field             | Type          | Description                                   |
| ----------------- | ------------- | --------------------------------------------- |
| Status Code       | integer       | HTTP status code of the response.             |
| Success           | boolean       | Whether the operation completed successfully. |
| Result            | string        | Human-readable result description.            |
| Total Deployments | integer       | Total number of deployments returned.         |
| Deployments       | object\_array | List of deployments for the repository.       |

#### List Forks

List forks of a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                                     |
| ---------- | --------------- | -------- | ----------------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.        |
| Sort By    | select (string) | No       | How to sort the forks. Available values: Newest First, Oldest First, Most Stars, Most Watchers. |

**Outputs**

| Field       | Type          | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Status Code | integer       | HTTP status code of the response.             |
| Success     | boolean       | Whether the operation completed successfully. |
| Result      | string        | Human-readable result description.            |
| Total Forks | integer       | Total number of forks returned.               |
| Forks       | object\_array | List of forks with their details.             |

#### List Pull Requests for Commit

List pull requests associated with a commit.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Commit SHA | string          | Yes      | The SHA of the commit.                                                                   |

**Outputs**

| Field               | Type          | Description                                       |
| ------------------- | ------------- | ------------------------------------------------- |
| Status Code         | integer       | HTTP status code of the response.                 |
| Success             | boolean       | Whether the operation completed successfully.     |
| Result              | string        | Human-readable result description.                |
| Total Pull Requests | integer       | Total number of pull requests returned.           |
| Pull Requests       | object\_array | List of pull requests associated with the commit. |

#### List Releases

List all releases in a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field          | Type          | Description                                   |
| -------------- | ------------- | --------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.             |
| Success        | boolean       | Whether the operation completed successfully. |
| Result         | string        | Human-readable result description.            |
| Total Releases | integer       | Total number of releases returned.            |
| Releases       | object\_array | List of releases in the repository.           |

#### List Tags

List all tags in a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field       | Type          | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Status Code | integer       | HTTP status code of the response.             |
| Success     | boolean       | Whether the operation completed successfully. |
| Result      | string        | Human-readable result description.            |
| Total Tags  | integer       | Total number of tags returned.                |
| Tags        | object\_array | List of tags with their commit references.    |

#### List Teams

List teams with access to a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `public_repo` — Only teams for accessible public repositories can be listed.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field       | Type          | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Status Code | integer       | HTTP status code of the response.             |
| Success     | boolean       | Whether the operation completed successfully. |
| Result      | string        | Human-readable result description.            |
| Total Teams | integer       | Total number of teams returned.               |
| Teams       | object\_array | List of teams with access to the repository.  |

#### List Webhooks

List webhooks for a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* `admin:repo_hook`
* `write:repo_hook`
* `read:repo_hook`
* `public_repo` — Only webhooks for accessible public repositories can be read.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field          | Type          | Description                                   |
| -------------- | ------------- | --------------------------------------------- |
| Status Code    | integer       | HTTP status code of the response.             |
| Success        | boolean       | Whether the operation completed successfully. |
| Result         | string        | Human-readable result description.            |
| Total Webhooks | integer       | Total number of webhooks returned.            |
| Webhooks       | object\_array | List of webhooks for the repository.          |

#### Run Workflow

Manually trigger a GitHub Actions workflow run.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`

**Inputs**

| Field           | Type            | Required | Description                                                                                           |
| --------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------- |
| Repository      | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.              |
| Workflow        | select (string) | Yes      | The workflow to run (ID or filename like 'ci.yml'). Options load from the selected connection.        |
| Branch/Tag      | string          | Yes      | The git reference (branch or tag) to run the workflow on. Default: main.                              |
| Workflow Inputs | object          | No       | Input keys and values for the workflow. Maximum 10 properties. Workflow defaults are used if omitted. |

**Outputs**

| Field       | Type    | Description                                      |
| ----------- | ------- | ------------------------------------------------ |
| Status Code | integer | HTTP status code of the response.                |
| Success     | boolean | Whether the workflow was triggered successfully. |
| Result      | string  | Human-readable result description.               |

#### Get Workflow Run

Get details about a specific GitHub Actions workflow run.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Run ID     | integer         | Yes      | The unique identifier of the workflow run.                                               |

**Outputs**

| Field              | Type    | Description                                               |
| ------------------ | ------- | --------------------------------------------------------- |
| Status Code        | integer | HTTP status code of the response.                         |
| Success            | boolean | Whether the workflow run completed successfully.          |
| Result             | string  | Human-readable result description.                        |
| Run ID             | integer | The unique identifier of the workflow run.                |
| Workflow Name      | string  | The name of the workflow.                                 |
| Branch             | string  | The branch the workflow ran on.                           |
| Commit SHA         | string  | The commit SHA that triggered the run.                    |
| Run Number         | integer | The auto-incrementing run number.                         |
| Run Attempt        | integer | The attempt number (1 for first run, higher for re-runs). |
| Trigger Event      | string  | The event that triggered the workflow.                    |
| Status             | string  | The current status of the workflow run.                   |
| Conclusion         | string  | The final outcome of the workflow run (if completed).     |
| Duration (seconds) | integer | How long the workflow has been running (in seconds).      |
| Triggered By       | object  | The user who triggered the workflow run.                  |
| URL                | string  | Link to view the workflow run on GitHub.                  |
| Created At         | string  | When the workflow run was created.                        |
| Started At         | string  | When the workflow run started executing.                  |
| Updated At         | string  | When the workflow run was last updated.                   |

#### Add User to Organization

Add or update organization membership for a user. This will invite the user to the organization if they are not already a member. The user will need to accept the invitation to become an active member.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `admin:org`
* `write:org`

**Inputs**

| Field        | Type            | Required | Description                                                                                          |
| ------------ | --------------- | -------- | ---------------------------------------------------------------------------------------------------- |
| Organization | string          | Yes      | The organization to add the user to.                                                                 |
| Username     | string          | Yes      | The GitHub username to add to the organization.                                                      |
| Role         | select (string) | No       | The role to assign: 'member' (default) or 'admin'. Available values: Member, Admin. Default: member. |

**Outputs**

| Field            | Type    | Description                                          |
| ---------------- | ------- | ---------------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.                    |
| Success          | boolean | Whether the user was added or invited successfully.  |
| Result           | string  | Human-readable result description.                   |
| Membership State | string  | The current membership state: 'active' or 'pending'. |
| Role             | string  | The assigned role: 'member' or 'admin'.              |
| Username         | string  | The GitHub username that was added.                  |
| Organization     | string  | The organization name.                               |

#### Remove User from Organization

Remove a member from an organization. This will remove the user's membership completely, and they will no longer have access to organization repositories or resources.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `admin:org`
* `write:org`

**Inputs**

| Field        | Type   | Required | Description                                          |
| ------------ | ------ | -------- | ---------------------------------------------------- |
| Organization | string | Yes      | The organization to remove the user from.            |
| Username     | string | Yes      | The GitHub username to remove from the organization. |

**Outputs**

| Field        | Type    | Description                                |
| ------------ | ------- | ------------------------------------------ |
| Status Code  | integer | HTTP status code of the response.          |
| Success      | boolean | Whether the user was removed successfully. |
| Result       | string  | Human-readable result description.         |
| Username     | string  | The GitHub username that was removed.      |
| Organization | string  | The organization name.                     |

#### Add User to Team

Add or update team membership for a user. The user will be invited to the team and will need to accept the invitation to become an active member. You need to be an organization owner or team maintainer to add a user to a team.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `admin:org`
* `write:org`
* `repo`

**Inputs**

| Field        | Type            | Required | Description                                                                                                    |
| ------------ | --------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| Organization | select (string) | Yes      | The organization that owns the team. Options load from the selected connection.                                |
| Team         | select (string) | Yes      | The team to add the user to. Options load from the selected connection.                                        |
| Username     | select (string) | Yes      | The GitHub username to add to the team. Options load from the selected connection.                             |
| Role         | select (string) | No       | The role to assign: 'member' (default) or 'maintainer'. Available values: Member, Maintainer. Default: member. |

**Outputs**

| Field            | Type    | Description                                          |
| ---------------- | ------- | ---------------------------------------------------- |
| Status Code      | integer | HTTP status code of the response.                    |
| Success          | boolean | Whether the user was added or invited successfully.  |
| Result           | string  | Human-readable result description.                   |
| Membership State | string  | The current membership state: 'active' or 'pending'. |
| Role             | string  | The assigned role: 'member' or 'maintainer'.         |
| Username         | string  | The GitHub username that was added.                  |
| Team             | string  | The team name.                                       |
| Organization     | string  | The organization name.                               |

#### Get Repository Details

Get details for a GitHub repository including language breakdown.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |

**Outputs**

| Field              | Type          | Description                                   |
| ------------------ | ------------- | --------------------------------------------- |
| Status Code        | integer       | HTTP status code of the response.             |
| Success            | boolean       | Whether the operation completed successfully. |
| Result             | string        | Human-readable result description.            |
| Full Name          | string        | The repository full name (owner/repo).        |
| Description        | string        | The repository description.                   |
| Private            | boolean       | Whether the repository is private.            |
| Repository URL     | string        | The web URL of the repository.                |
| Stars              | integer       | Number of stars.                              |
| Forks              | integer       | Number of forks.                              |
| Open Issues        | integer       | Number of open issues.                        |
| Watchers           | integer       | Number of watchers.                           |
| Tech Stack         | object        | Language breakdown by percentage.             |
| Primary Language   | string        | The primary programming language.             |
| Default Branch     | string        | Default branch name.                          |
| License            | string        | SPDX identifier or license name.              |
| Topics             | string\_array | List of repository topics.                    |
| Is Fork            | boolean       | Whether the repository is a fork.             |
| Repository Summary | string        | A narrative summary of the repository.        |

#### Create or Update File

Create a new file or update an existing file in a repository. Automatically handles the commit with the provided message.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`, `workflow`
* `repo` — Files in .github/workflows cannot be created or updated without the workflow scope.
* `public_repo`, `workflow` — Only accessible public repositories can be used.
* `public_repo` — Only accessible public repositories can be used, and files in .github/workflows cannot be created or updated.

**Inputs**

| Field          | Type            | Required | Description                                                                              |
| -------------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository     | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| File Path      | string          | Yes      | Path to the file in the repository.                                                      |
| Content        | textarea        | Yes      | The new content for the file.                                                            |
| Commit Message | string          | Yes      | Commit message for this change.                                                          |
| Branch         | string          | No       | Branch to commit to. Defaults to the default branch.                                     |

**Outputs**

| Field       | Type    | Description                                           |
| ----------- | ------- | ----------------------------------------------------- |
| Status Code | integer | HTTP status code of the response.                     |
| Success     | boolean | Whether the file was created or updated successfully. |
| Result      | string  | Human-readable result description.                    |
| Commit SHA  | string  | The SHA of the commit that was created.               |
| File URL    | string  | URL to view the file on GitHub.                       |

#### Get File Content

Get the content of a file from a repository.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field      | Type            | Required | Description                                                                              |
| ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| File Path  | string          | Yes      | Path to the file in the repository.                                                      |
| Branch/Tag | string          | No       | Branch or tag to get file from. Defaults to default branch.                              |

**Outputs**

| Field        | Type    | Description                                |
| ------------ | ------- | ------------------------------------------ |
| Status Code  | integer | HTTP status code of the response.          |
| Success      | boolean | Whether the file was fetched successfully. |
| Result       | string  | Human-readable result description.         |
| Content      | string  | The decoded file content as plain text.    |
| Is Binary    | boolean | Whether the file is binary (non-text).     |
| Encoding     | string  | The encoding of the content.               |
| File Size    | integer | Size of the file in bytes.                 |
| SHA          | string  | The SHA hash of the file.                  |
| Download URL | string  | URL to download the raw file.              |

#### Search Branches

Search for branches in a repository by name.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field        | Type            | Required | Description                                                                              |
| ------------ | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Repository   | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection. |
| Search Query | string          | No       | Filter branches containing this text.                                                    |

**Outputs**

| Field        | Type          | Description                                |
| ------------ | ------------- | ------------------------------------------ |
| Status Code  | integer       | HTTP status code of the response.          |
| Success      | boolean       | Whether the search completed successfully. |
| Result       | string        | Human-readable result description.         |
| Branch Count | integer       | Number of branches found.                  |
| Branch Names | string\_array | List of branch names.                      |

#### Search Workflow Runs

Search for workflow runs in a repository. Filter by workflow, status, or branch.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field         | Type            | Required | Description                                                                                                 |
| ------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| Repository    | select (string) | Yes      | The GitHub repository in 'owner/repo' format. Options load from the selected connection.                    |
| Workflow      | string          | No       | Filter by specific workflow. Leave empty for all workflows.                                                 |
| Status Filter | select (string) | No       | Filter by run status or conclusion. Available values: All, Completed, In Progress, Queued, Success, Failed. |
| Branch        | string          | No       | Filter by branch name.                                                                                      |

**Outputs**

| Field         | Type          | Description                                |
| ------------- | ------------- | ------------------------------------------ |
| Status Code   | integer       | HTTP status code of the response.          |
| Success       | boolean       | Whether the search completed successfully. |
| Result        | string        | Human-readable result description.         |
| Run Count     | integer       | Number of workflow runs found.             |
| Workflow Runs | object\_array | List of workflow runs.                     |

#### List Repositories

List repositories the connected user can access.

**Permission alternatives**

The connection must grant one of these sets of permissions:

* `repo`
* No named scopes — Only accessible public repositories can be used.

**Inputs**

| Field       | Type            | Required | Description                                                                                                      |
| ----------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| Visibility  | select (string) | No       | Filter repositories by visibility. Available values: All, Public, Private.                                       |
| Sort By     | select (string) | No       | How to sort the repositories. Available values: Recently Updated, Recently Created, Recently Pushed, Name (A-Z). |
| Direction   | select (string) | No       | Sort direction. Available values: Descending, Ascending.                                                         |
| Max Results | integer         | No       | Maximum number of repositories to return.                                                                        |

**Outputs**

| Field              | Type          | Description                                   |
| ------------------ | ------------- | --------------------------------------------- |
| Status Code        | integer       | HTTP status code of the response.             |
| Success            | boolean       | Whether the operation completed successfully. |
| Result             | string        | Human-readable result description.            |
| Total Repositories | integer       | Total number of repositories returned.        |
| Repositories       | object\_array | List of repositories with their details.      |

### Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

#### On Pull Request Created

Trigger a workflow execution every time a new pull request is created in GitHub.

**Configuration**

| Field                | Type            | Required | Description                                                                                                                                        |
| -------------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Repository Full Name | select (string) | Yes      | The full name of the repository (e.g., octocat/Hello-World). This is where the webhook will be created. Options load from the selected connection. |

**Event inputs**

| Field                | Type   | Required | Description                                                            |
| -------------------- | ------ | -------- | ---------------------------------------------------------------------- |
| Action               | string | No       | The action performed on the pull request (e.g., 'opened', 'reopened'). |
| Repository Full Name | string | Yes      | The full name of the repository (e.g., octocat/Hello-World).           |
| Pull Request Number  | number | Yes      | The number of the pull request.                                        |
| Pull Request Title   | string | Yes      | The title of the pull request.                                         |
| Pull Request URL     | string | Yes      | The URL to view the pull request on GitHub.                            |
| Pull Request State   | string | Yes      | The current state of the pull request (e.g., open, closed).            |
| Base Branch          | string | Yes      | The name of the branch being merged into.                              |
| Head Branch          | string | Yes      | The name of the branch with changes.                                   |
| Sender Username      | string | Yes      | The GitHub username of the user who created the PR.                    |

**Outputs**

| Field                | Type    | Description                                                 |
| -------------------- | ------- | ----------------------------------------------------------- |
| Action               | string  | The action performed on the pull request (e.g., 'opened').  |
| Repository Full Name | string  | The full name of the repository (e.g., owner/repo).         |
| Pull Request Number  | integer | The number of the pull request.                             |
| Pull Request Title   | string  | The title of the pull request.                              |
| Pull Request URL     | string  | The HTML URL of the pull request.                           |
| Pull Request State   | string  | The current state of the pull request (e.g., open, closed). |
| Base Branch          | string  | The name of the branch being merged into.                   |
| Head Branch          | string  | The name of the branch with changes.                        |
| Sender Username      | string  | The GitHub username of the user who created the PR.         |
| Repository URL       | string  | The HTML URL of the repository.                             |

#### On Release

Trigger a workflow execution every time a release event occurs in GitHub.

**Configuration**

| Field                | Type                      | Required | Description                                                                                                                                                                          |
| -------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Repository Full Name | select (string)           | Yes      | The full name of the repository (e.g., octocat/Hello-World). This is where the webhook will be created. Options load from the selected connection.                                   |
| Release Actions      | multiple\_select (string) | No       | Optional filter for release actions. Leave empty to trigger on all actions. Available values: Published, Created, Edited, Released, Prereleased, Deleted, Unpublished. Default: \[]. |

**Event inputs**

| Field                | Type    | Required | Description                                                                                                         |
| -------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| Action               | string  | No       | The action performed on the release (e.g., 'published', 'created', 'edited', 'deleted', 'prereleased', 'released'). |
| Repository Full Name | string  | Yes      | The full name of the repository (e.g., octocat/Hello-World).                                                        |
| Release ID           | number  | Yes      | The unique identifier of the release.                                                                               |
| Release Tag Name     | string  | Yes      | The git tag associated with the release (e.g., v1.0.0).                                                             |
| Release Name         | string  | Yes      | The name/title of the release.                                                                                      |
| Release Body         | string  | Yes      | The release notes or description.                                                                                   |
| Release URL          | string  | Yes      | The URL to view the release on GitHub.                                                                              |
| Release Draft        | boolean | Yes      | Whether the release is a draft.                                                                                     |
| Release Prerelease   | boolean | Yes      | Whether the release is a prerelease.                                                                                |
| Target Commitish     | string  | Yes      | The branch or commit SHA the release tag points to.                                                                 |
| Sender Username      | string  | Yes      | The GitHub username of the user who triggered the release event.                                                    |

**Outputs**

| Field                | Type    | Description                                              |
| -------------------- | ------- | -------------------------------------------------------- |
| Release Tag Name     | string  | The git tag associated with the release.                 |
| Release Name         | string  | The name/title of the release.                           |
| Release Body         | string  | The release notes or description.                        |
| Release URL          | string  | The HTML URL of the release on GitHub.                   |
| Release Author Login | string  | The GitHub username of the release author.               |
| Repository Name      | string  | The full name of the repository (e.g., owner/repo).      |
| Repository URL       | string  | The HTML URL of the repository.                          |
| Is Prerelease        | boolean | Whether the release is a prerelease.                     |
| Is Draft             | boolean | Whether the release is a draft.                          |
| Action               | string  | The action performed on the release (e.g., 'published'). |
| Target Commitish     | string  | The branch or commit SHA the release tag points to.      |

### Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/github.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
