Git Hub

Learn how to use Git Hub with Composio

Overview

SLUG

GITHUB

Description

GitHub is a code hosting platform for version control and collaboration, offering Git-based repository management, issue tracking, and continuous integration features

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to public_repo,user
bearer_token
string

Tools

SLUG: GITHUB_CREATE_AN_ISSUE

Creates a new issue in a github repository, requiring the repository to exist and have issues enabled; specific fields like assignees, milestone, or labels may require push access.

Action Parameters

assignee
string
assignees
array
body
string
labels
array
milestone
string
owner
stringRequired
repo
stringRequired
title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_CREATE_A_PULL_REQUEST

Creates a pull request in a github repository, requiring existing `base` and `head` branches; `title` or `issue` must be provided.

Action Parameters

base
stringRequired
body
string
draft
boolean
head
stringRequired
head_repo
string
issue
integer
maintainer_can_modify
boolean
owner
stringRequired
repo
stringRequired
title
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_GET_A_PULL_REQUEST

Retrieves a specific pull request from a github repository using its owner, repository name, and pull request number.

Action Parameters

owner
stringRequired
pull_number
integerRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_LIST_BRANCHES

Lists branches for an existing github repository, with an option to filter by protection status.

Action Parameters

owner
stringRequired
page
integerDefaults to 1
per_page
integerDefaults to 30
protected
boolean
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_LIST_COMMITS

Retrieves commits for a repository, optionally filtering by sha (must be valid commit sha or existing branch), path, author, committer, or date range.

Action Parameters

author
string
committer
string
owner
stringRequired
page
integerDefaults to 1
path
string
per_page
integerDefaults to 1
repo
stringRequired
sha
string
since
string
until
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_LIST_PULL_REQUESTS

Lists pull requests for a specified github repository.

Action Parameters

base
string
direction
string
head
string
owner
stringRequired
page
integerDefaults to 1
per_page
integerDefaults to 1
repo
stringRequired
sort
stringDefaults to created
state
stringDefaults to open

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_LIST_REPOSITORY_ISSUES

Lists issues (which include pull requests) for a specified, existing github repository, with options for filtering, sorting, and pagination.

Action Parameters

assignee
string
creator
string
direction
stringDefaults to desc
labels
string
mentioned
string
milestone
string
owner
stringRequired
page
integerDefaults to 1
per_page
integerDefaults to 1
repo
stringRequired
since
string
sort
stringDefaults to created
state
stringDefaults to open

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER

Stars an existing and accessible repository for the authenticated user; this action is idempotent and succeeds even if the repository is already starred.

Action Parameters

owner
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ACCEPT_A_REPOSITORY_INVITATION

Accepts a pending repository invitation that has been issued to the authenticated user.

Action Parameters

invitation_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ACTIVITY_LIST_REPO_S_STARRED_BY_AUTHENTICATED_USER

Deprecated: lists repositories starred by the authenticated user, including star creation timestamps; use 'list repositories starred by the authenticated user' instead.

Action Parameters

direction
stringDefaults to desc
page
integerDefaults to 1
per_page
integerDefaults to 1
sort
stringDefaults to created

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ACTIVITY_LIST_STARGAZERS_FOR_REPO

Deprecated: lists users who have starred a repository; use `list stargazers` instead.

Action Parameters

owner
stringRequired
page
integerDefaults to 1
per_page
integerDefaults to 30
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ACTIVITY_STAR_REPO_FOR_AUTHENTICATED_USER

Deprecated: stars a repository for the authenticated user; use `star a repository for the authenticated user` instead.

Action Parameters

owner
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_APP_ACCESS_RESTRICTIONS

Replaces github app access restrictions for an existing protected branch; requires a json array of app slugs in the request body, where apps must be installed and have 'contents' write permissions.

Action Parameters

branch
stringRequired
owner
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_ASSIGNEES_TO_AN_ISSUE

Adds or removes assignees for a github issue; changes are silently ignored if the authenticated user lacks push access to the repository.

Action Parameters

assignees
array
issue_number
integerRequired
owner
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_A_REPOSITORY_COLLABORATOR

Adds a github user as a repository collaborator, or updates their permission if already a collaborator; `permission` applies to organization-owned repositories (personal ones default to 'push' and ignore this field), and an invitation may be created or permissions updated directly.

Action Parameters

owner
stringRequired
permission
stringDefaults to push
repo
stringRequired
username
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_A_REPOSITORY_TO_AN_APP_INSTALLATION

Adds a repository to a github app installation, granting the app access; requires authenticated user to have admin rights for the repository and access to the installation.

Action Parameters

installation_id
integerRequired
repository_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_A_SECURITY_MANAGER_TEAM

Designates an existing and eligible team as a security manager for an organization, allowing its members to manage security alerts, code security configurations, and dependency reviews for the organization's repositories.

Action Parameters

org
stringRequired
team_slug
stringRequired

Action Response

data
object
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_A_SELECTED_REPOSITORY_TO_A_USER_SECRET

Grants a specified repository access to an authenticated user's existing codespaces secret, enabling codespaces created for that repository to use the secret.

Action Parameters

repository_id
integerRequired
secret_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_EMAIL_FOR_AUTH_USER

Adds one or more email addresses (which will be initially unverified) to the authenticated user's github account; use this to associate new emails, noting an email verified for another account will error, while an existing email for the current user is accepted.

Action Parameters

emails
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: GITHUB_ADD_LABELS_TO_AN_ISSUE

Adds labels (provided in the request body) to a repository issue; labels that do not already exist are created.

Action Parameters

issue_number
integerRequired
owner
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired