Use Github with AI Agents

A platform for version control and collaboration, allowing you to work together on projects from anywhere.
🔗 Connect and Use Github
1. 🔑 Connect your Github account
2. ✅ Select an action
3. 🚀 Go live with the agent
What do you want to do?
Actions
meta
security-advisories
apps
classroom
codes-of-conduct
emojis
dependabot
secret-scanning
activity
gists
gitignore
issues
licenses
markdown
orgs
actions
oidc
code-scanning
codespaces
copilot
packages
interactions
migrations
projects
repos
billing
teams
reactions
rate-limit
checks
dependency-graph
git
pulls
search
users
Main

API actions for Github for AI assitants/agents

Language
JS
PYTHON

Code-scanning

Delete A Code Scanning Analysis From A Repository

Delete the latest GitHub code scanning analyses marked as deletable to avoid a 400 error. This requires OAuth or access tokens with proper scopes and allows further deletion URLs with options
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_CODE_SCANNING_ANALYSIS_FROM_A_REPOSITORY])

List Code Ql Databases For A Repository

This endpoint lists CodeQL databases in a repository. For access, OAuth and classic tokens require `security_events` scope for private/public repos, or `public_repo` scope for public repos onl
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CODE_QL_DATABASES_FOR_A_REPOSITORY])

Get A Code Ql Database For A Repository

This endpoint fetches a CodeQL database for a repo, providing JSON metadata by default. For binary download, use `Accept: application/zip` and handle redirects. Requires `security_events` scop
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_CODE_QL_DATABASE_FOR_A_REPOSITORY])

Get A Code Scanning Default Setup Configuration

The default setup for code scanning requires `repo` scope for both OAuth app and classic personal access tokens for accessing private/public repositories, and `public_repo` scope for public re
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_CODE_SCANNING_DEFAULT_SETUP_CONFIGURATION])

Update A Code Scanning Default Setup Configuration

The updated code scanning configuration requires `repo` scope for OAuth and classic personal access tokens for both private and public repositories, and `public_repo` scope for public reposito
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_CODE_SCANNING_DEFAULT_SETUP_CONFIGURATION])

Upload An Analysis As Sarif Data

SARIF data can be uploaded to GitHub for PRs/branches, viewed in PR checks/Security tab. Data must be gzip/Base64 encoded, with entry and size limits. Requires `security_events` or `public_rep
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPLOAD_AN_ANALYSIS_AS_SARIF_DATA])

Get Information About A Sarif Upload

The text outlines how to obtain SAROC upload details, like status and analysis URL, via a specific endpoint, emphasizing the need for OAuth and access token scopes for both private and public
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_INFORMATION_ABOUT_A_SARIF_UPLOAD])

Repos

List Codeowners Errors

The text instructs to identify and list syntax errors in the CODEOWNERS file, referencing GitHub's documentation for correct syntax guidelines.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CODEOWNERS_ERRORS])

List Repository Collaborators

The endpoint lists all collaborators in organization-owned repositories, including various organization members, and requires users with push access, and tokens with `read:org` and `repo` scop
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_COLLABORATORS])

Repo S List Collaborators

The endpoint lists all collaborators in organization-owned repositories, including various organization members, and requires users with push access, and tokens with `read:org` and `repo` scop
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_LIST_COLLABORATORS])

Check If A User Is A Repository Collaborator

Organization repository collaborators encompass direct members, outside collaborators, team and child team members, and owners, all needing push access and the correct OAuth/personal tokens fo
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CHECK_IF_A_USER_IS_A_REPOSITORY_COLLABORATOR])

Add A Repository Collaborator

This endpoint handles notifications and collaborator permissions with possible secondary rate limiting. It restricts adding outside collaborators and changing permissions, imposing guidelines
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ADD_A_REPOSITORY_COLLABORATOR])

Remove A Repository Collaborator

Removing a collaborator from a repo revokes their access, cancels invitations, unassigns issues, affects their fork permissions, and updates org project access. Changes may take time and acces
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_A_REPOSITORY_COLLABORATOR])

Get Repository Permissions For A User

The text details checking a collaborator's repository permission, outlining roles like admin, write, read, none, and correlating maintain with write, triage with read. It suggests using 'role_
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER])

List Commit Comments For A Repository

This endpoint lists commit comments for a repository in ascending ID order, supporting media types for different comment formats, including raw markdown, text, HTML, and a combination of all.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_COMMIT_COMMENTS_FOR_A_REPOSITORY])

Get A Commit Comment

This endpoint retrieves a specific commit comment, offering custom media types for different representations: raw markdown (default), text-only, HTML, or a full version that includes all forma
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_COMMIT_COMMENT])

Update A Commit Comment

This endpoint updates commit comments and supports different media types for responses, including raw markdown, text, HTML, or all. For details, visit the GitHub docs on media types.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_COMMIT_COMMENT])

Delete A Commit Comment

Deletes a specific commit comment in a GitHub repo using `owner`, `repo`, and `comment_id`. Successful deletion returns 204, failure returns 404. More info at GitHub's API documentation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_COMMIT_COMMENT])

List Commits

The `verification` object in a commit includes the `verified` status, `reason`, `signature`, and `payload`. Failure can result from key issues, service errors, unsigned commits, unrecognized s
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_COMMITS])

Repo S List Commits

The `verification` object in a commit includes the `verified` status, `reason`, `signature`, and `payload`. Failure can result from key issues, service errors, unsigned commits, unrecognized s
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_LIST_COMMITS])

List Branches For Head Commit

Protected branches are accessible in both public and private repositories across various GitHub plans including Free, Pro, Team, and Enterprise versions. They identify branches having the late
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_BRANCHES_FOR_HEAD_COMMIT])

List Commit Comments

An endpoint lists commit comments, supporting custom media types for responses: raw markdown, text only, HTML rendered markdown, or all formats. See GitHub docs for more.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_COMMIT_COMMENTS])

Create A Commit Comment

The endpoint allows adding comments to commits with `:commit_sha`, triggering notifications. Rapid use may cause rate limiting. Supports various media types for comments. See GitHub docs for l
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_COMMIT_COMMENT])

List Pull Requests Associated With A Commit

Specifies how to find pull requests linked to a commit: returns merged PRs if the commit is in the default branch, and only open PRs otherwise. Use `commit_sha` to list PRs for a branch.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_PULL_REQUESTS_ASSOCIATED_WITH_A_COMMIT])

Get A Commit

The API provides commit content with `read` access, supports pagination for over 300 diffs up to 3000 files, and custom media types. Large diffs may time out. Includes signature status in a `v
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_COMMIT])

Repo S Get Commit

The API provides commit content with `read` access, supports pagination for over 300 diffs up to 3000 files, and custom media types. Large diffs may time out. Includes signature status in a `v
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_GET_COMMIT])

Get The Combined Status For A Specific Reference

Users with pull access can view combined commit statuses for a SHA, branch, or tag in a repository. A `state` is also returned, indicating `failure`, `pending`, or `success` based on the conte
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_COMBINED_STATUS_FOR_A_SPECIFIC_REFERENCE])

List Commit Statuses For A Reference

Users with pull access can see commit statuses for a SHA, branch, or tag in reverse order, with the latest first. It's accessible through a legacy route.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_COMMIT_STATUSES_FOR_A_REFERENCE])

Get Community Profile Metrics

The text details metrics for evaluating non-fork repositories, such as health score, documentation, and compliance with recommended files, including a 'health_percentage' and notes that 'conte
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_COMMUNITY_PROFILE_METRICS])

Compare Two Commits

The API enables comparison of two commits, across same/different repos or forks, focusing on file changes, order variations from `git log`, supports pagination for extensive comparisons, and p
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_COMPARE_TWO_COMMITS])

Get Repository Content

This API endpoint fetches contents of files or directories in various formats, uniquely manages directories, symlinks, and submodules, and supports up to 1,000 files per directory with size co
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_REPOSITORY_CONTENT])

Repo S Get Content

This API endpoint fetches contents of files or directories in various formats, uniquely manages directories, symlinks, and submodules, and supports up to 1,000 files per directory with size co
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_GET_CONTENT])

Create Or Update File Contents

This endpoint creates or replaces a file in a repository but cannot be used concurrently with the "Delete a file" endpoint to avoid errors. It requires `repo` and, for modifying `.github/workf
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_OR_UPDATE_FILE_CONTENTS])

Repo S Create Or Update File Contents

This endpoint creates or replaces a file in a repository but cannot be used concurrently with the "Delete a file" endpoint to avoid errors. It requires `repo` and, for modifying `.github/workf
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_CREATE_OR_UPDATE_FILE_CONTENTS])

Codespaces

List Codespaces In A Repository For The Authenticated User

Lists the codespaces associated to a specified repository and the authenticated user. OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CODESPACES_IN_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])

Create A Codespace In A Repository

Creates a codespace owned by the authenticated user in the specified repository. OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_CODESPACE_IN_A_REPOSITORY])

List Repo Dev Container Configs For User

This text describes an API endpoint that retrieves devcontainer.json files from a specified repository, detailing launch configurations for codespaces. OAuth app and personal tokens require `c
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPO_DEV_CONTAINER_CONFIGS_FOR_USER])

List Available Machine Types For A Repository

List the machine types available for a given repository based on its configuration. OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_AVAILABLE_MACHINE_TYPES_FOR_A_REPOSITORY])

Get Default Attributes For A Codespace

Gets the default attributes for codespaces created by the user with the repository. OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_DEFAULT_ATTRIBUTES_FOR_A_CODESPACE])

Verify Dev Container Permissions Accepted

Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user. OAuth app tokens and personal access tokens (classic) need the `codes
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_VERIFY_DEV_CONTAINER_PERMISSIONS_ACCEPTED])

List Repo Secrets Without Values

Lists all development environment secrets available in a repository without revealing their encrypted values. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPO_SECRETS_WITHOUT_VALUES])

Get Public Key For Secret Encryption

This endpoint allows users with read access to a repository to get a public key for encrypting secrets. For private repositories, OAuth and classic personal access tokens require the `repo` sc
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_PUBLIC_KEY_FOR_SECRET_ENCRYPTION])

Get Repo Dev Env Secret

Gets a single repository development environment secret without revealing its encrypted value. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_REPO_DEV_ENV_SECRET])

Encrypt And Update Dev Secret

Creates/updates a repo dev environment secret using an encrypted value via LibSodium. Requires `repo` scope for OAuth/personal tokens. See GitHub docs for encryption details.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ENCRYPT_AND_UPDATE_DEV_SECRET])

Delete Repo Codespace Secret By Name

Deletes a development environment secret in a repository using the secret name. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_REPO_CODESPACE_SECRET_BY_NAME])

Reactions

List Reactions For A Commit Comment

List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment).
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REACTIONS_FOR_A_COMMIT_COMMENT])

Create Reaction For A Commit Comment

Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_REACTION_FOR_A_COMMIT_COMMENT])

Delete A Commit Comment Reaction

Delete a reaction to a commit comment by using the DELETE method on `/repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`, specifying the `repository_id`.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_COMMIT_COMMENT_REACTION])

Checks

List Check Runs For A Git Reference

Endpoint identifies check runs for SHA, branch, or tag within the same repo; excludes forks, capped at 1000 suites per ref. Full list via specific endpoints. `repo` scope needed for private re
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CHECK_RUNS_FOR_A_GIT_REFERENCE])

List Check Suites For A Git Reference

The text outlines an API feature that lists check suites for commits identified by SHA, branch, or tag. Forked repository pushes are not detected. Access to private repositories needs `repo` s
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_CHECK_SUITES_FOR_A_GIT_REFERENCE])

Frequently asked questions

What is Composio.dev?

Composio.dev is a platform for building AI applications, designed to make the process of developing AI solutions super easy and fun! It provides a comprehensive set of tools and libraries that simplify the process of developing AI solutions, allowing you to focus on the creative aspects of your project without getting bogged down by the technical details.

How does Composio.dev support Github?

Composio.dev seamlessly integrates with Github, allowing you to leverage its capabilities within the Composio.dev platform. You can utilize Github to call functions across various platforms, including Google, GitHub, and others, making it a breeze to incorporate different services into your AI applications. Additionally, it supports user authentication via OAuth2 and can work in conjunction with other popular frameworks like LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with Github?

With Github, you have access to a wide range of state-of-the-art language models, including GPT-4o (OpenAI), GPT-3.5 (OpenAI), GPT-4 (OpenAI), Claude (Anthropic), PaLM (Google), LLaMA and LLaMA 2 (Meta), Gemini, and many others. This flexibility allows you to choose the model that best suits your specific use case, whether you're building a chatbot, a content creation tool, or any other AI-powered application. You can experiment with different models and find the one that delivers the best performance for your project.

How can I integrate Github into my project?

Composio.dev provides a seamless integration for Github, making it super easy to incorporate this powerful framework into your projects. You can leverage the Composio.dev API to call functions from Github, allowing you to tap into its capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with your preferred programming language and integrate Github into your projects seamlessly.

What is the pricing for Github?

Github is completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes it accessible for developers and organizations of all sizes to explore and experiment with this powerful tool without any upfront costs. Whether you're a student working on a personal project or a startup building the next big thing, you can get started with Github without worrying about breaking the bank.

What kind of authentication is supported for Github?

Github supports OAuth2 authentication, ensuring secure and authorized access to its functionalities. You can leverage the Composio.dev API to handle authentication and call functions from Github seamlessly. The SDK is available in Python, JavaScript, and TypeScript for your convenience, making it easy to integrate authentication into your projects and keep your users' data safe and secure.

Can I add Github to my project?

Absolutely! You can easily incorporate Github into your project by utilizing the Composio.dev API. This API allows you to call functions from Github, enabling you to leverage its capabilities within your application. The SDK is available in Python, JavaScript, and TypeScript to facilitate integration, so you can work with the language you're most comfortable with and add Github to your project with ease.

What is the accuracy of Github?

Github is designed to provide highly accurate and reliable results, ensuring that your AI applications perform at their best. The integration with Composio.dev ensures precise function calls, enabling you to build robust and powerful AI applications with confidence. Github's comprehensive framework and the ability to leverage state-of-the-art models ensure reliable and accurate outcomes for your AI development needs, whether you're working on a chatbot, a content creation tool, or any other AI-powered project.

What are some common use cases for Github?

Github can be used for a wide range of AI applications, making it a versatile tool for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. It's particularly useful for building chatbots, virtual assistants, content creation tools, and other AI-powered applications that can help you automate tasks, engage with users, and create compelling content. Whether you're working on a personal project or building a product for your startup, Github can help you bring your ideas to life.

How does Github handle data privacy and security?

Data privacy and security are crucial considerations when working with AI systems, and Github takes these issues seriously. It follows industry best practices and adheres to strict data protection regulations, ensuring that your data is kept safe and secure. Github provides robust security measures, such as encryption and access controls, to ensure the confidentiality and integrity of your data. You can rest assured that your sensitive information is protected when using Github for your AI development needs.
+ Integrate seamlessly with your agentic frameworks
Composio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and Sizes
Building for AI across continents🧪