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

Git

Create A Blob

This API endpoint enables creating a new blob in a specified repository, supporting `UTF-8` and `base64` encodings. It requires blob content in the request body and returns blob details, inclu
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_BLOB])

Get A Blob

The endpoint returns blob data, offering raw data or JSON with base64 encoded `content`. Supports files up to 100MB. More on media types at GitHub docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_BLOB])

Create A Commit

Git commits' `verification` object confirms signature validity, detailing verification status and reason, with fields like `verified`, `reason`, `signature`, and `payload`, indicating reasons
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_COMMIT])

Get A Commit Object

GitHub's commit object includes a `verification` object summarizing the result of the commit's signature verification, detailing if it was verified, the reason, signature, and signed value. De
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_COMMIT_OBJECT])

List Matching References

The Git database API retrieves ref arrays for branches or tags. Without specifying `:ref`, it returns all references. Non-existent `:ref`s yield starting matches. Mergeability requires a pull
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_MATCHING_REFERENCES])

Get A Reference

Fetches a Git reference using a formatted URL for branches (`heads/<branch name>`) or tags (`tags/<tag name>`). Returns a 404 if not found. For pull request mergeability, a separate request is
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REFERENCE])

Create A Reference

Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REFERENCE])

Update A Reference

Updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_REFERENCE])

Delete A Reference

Deletes the provided reference.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_REFERENCE])

Create A Tag Object

Creating an annotated Git tag involves making a tag object and a `refs/tags/[tag]` reference. Lightweight tags need only the reference. The `verification` object shows if the signature is veri
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_TAG_OBJECT])

Get A Tag

The `verification` object in commit responses includes boolean `verified`, `reason` for verification status, `signature`, and `payload` signed. Reasons for `reason` field range from expired ke
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_TAG])

Create A Tree

The tree creation API allows for nested entries and modifying trees, where changes require committing and updating branches. Using this API can add, delete, or modify files but returns an erro
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_TREE])

Get A Tree

Fetches a tree by SHA1 or ref name. If `truncated` is true, the tree exceeds limits (100,000 entries, 7 MB with `recursive`). Fetch more items by getting sub-trees non-recursively.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_TREE])

Repos

List Repository Webhooks

Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_WEBHOOKS])

Create A Repository Webhook

Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events`
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REPOSITORY_WEBHOOK])

Get A Repository Webhook

Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuratio
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_WEBHOOK])

Update A Repository Webhook

Update a repository's webhook by providing the same or a new `secret`; otherwise, the `secret` is removed. For partial `config` updates, use the specific webhook configuration update guide.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_REPOSITORY_WEBHOOK])

Delete A Repository Webhook

To remove a repository webhook in GitHub Cloud or GitHub Apps, use the repository owner's name, the repository's name, and the webhook's ID. A 204 code confirms deletion, and a 404 code signif
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_REPOSITORY_WEBHOOK])

Get A Webhook Configuration For A Repository

This text outlines how to retrieve a repository's webhook configuration and details, specifying that OAuth app tokens and personal access tokens require `read:repo_hook` or `repo` scope for ac
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_WEBHOOK_CONFIGURATION_FOR_A_REPOSITORY])

Update A Webhook Configuration For A Repository

This text explains how to update a repository's webhook configuration, including its `active` state and `events`, by using a specific update endpoint. OAuth or classic tokens with `write:repo_
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_WEBHOOK_CONFIGURATION_FOR_A_REPOSITORY])

List Deliveries For A Repository Webhook

Returns a list of webhook deliveries for a webhook configured in a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DELIVERIES_FOR_A_REPOSITORY_WEBHOOK])

Get A Delivery For A Repository Webhook

Returns a delivery for a webhook configured in a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DELIVERY_FOR_A_REPOSITORY_WEBHOOK])

Redeliver A Delivery For A Repository Webhook

Redeliver a webhook delivery for a webhook configured in a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REDELIVER_A_DELIVERY_FOR_A_REPOSITORY_WEBHOOK])

Ping A Repository Webhook

This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_PING_A_REPOSITORY_WEBHOOK])

Test The Push Repository Webhook

This text explains that using a specified command can trigger a hook for the latest push in a repository if it's subscribed to `push` events. Without subscription, it responds with 204, withou
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_TEST_THE_PUSH_REPOSITORY_WEBHOOK])

List Repository Invitations

When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_INVITATIONS])

Update A Repository Invitation

Update GitHub repo invitations by specifying user permissions (read, write, admin) through the path `{owner}/{repo}/invitations/{invitation_id}`. More info on GitHub Docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_REPOSITORY_INVITATION])

Delete A Repository Invitation

Delete a repository invitation by specifying the repo's owner, repository name, and invitation ID. For detailed API usage, visit: https://docs.github.com/rest/collaborators/invitations#delete-a-re
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_REPOSITORY_INVITATION])

Migrations

Get An Import Status

The import endpoint will be deprecated on April 12, 2024, due to low usage. It involves steps from detecting to completion and reports issues like `auth_failed`. For alternatives, see the chan
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_IMPORT_STATUS])

Start An Import

Use GitHub Importer for source imports to a repository. If the repository has GitHub Actions, the import will fail with a 422 error. This feature is deprecated and will be removed on April 12,
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_START_AN_IMPORT])

Update An Import

API enables updating imports with credentials or project selection. Without parameters, it restarts imports. For multi-project servers, use `project_choices`. The endpoint will be deprecated a
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_AN_IMPORT])

Cancel An Import

The import feature for repositories is deprecated due to low usage and alternatives, ceasing on April 12, 2024. More info can be found in the changelog.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CANCEL_AN_IMPORT])

Get Commit Authors

Different source control systems have varied author identification methods, leading to inaccuracies in author mapping. GitHub Importer tries to fix this, but will be deprecated by April 12, 20
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_COMMIT_AUTHORS])

Map A Commit Author

Update an author's identity in your application before pushing new commits. The endpoint will be deprecated on April 12, 2024, due to low usage. See the changelog for alternatives.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_MAP_A_COMMIT_AUTHOR])

Get Large Files

This endpoint, listing files over 100MB from imports, is deprecated due to low use and alternatives. It'll be discontinued on April 12, 2024. Details at [changelog](https://gh.io/source-import
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_LARGE_FILES])

Update Git Lfs Preference

Import repositories with files over 100MB from SVN, Mercurial, and TFS using Git LFS. Note: This feature will be deprecated on April 12, 2024. More details and alternatives are in the changelo
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_GIT_LFS_PREFERENCE])

Interactions

Get Interaction Restrictions For A Repository

Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_INTERACTION_RESTRICTIONS_FOR_A_REPOSITORY])

Set Interaction Restrictions For A Repository

This text outlines how to restrict interactions in a GitHub repository to specific user types. It requires owner or admin access. Setting restrictions when there's already a limit at the user/
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SET_INTERACTION_RESTRICTIONS_FOR_A_REPOSITORY])

Remove Interaction Restrictions For A Repository

This text outlines the process for removing interaction restrictions from a repository, requiring owner or admin access. Attempting to change limits at the user or organization level without p
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_INTERACTION_RESTRICTIONS_FOR_A_REPOSITORY])

Issues

List Repository Issues

GitHub's "Issues" endpoint lists only open issues but may include pull requests, identifiable by the `pull_request` key. Use "List pull requests" for PR IDs. Supports various media types for m
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_ISSUES])

Issues List For Repo

GitHub's "Issues" endpoint lists only open issues but may include pull requests, identifiable by the `pull_request` key. Use "List pull requests" for PR IDs. Supports various media types for m
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ISSUES_LIST_FOR_REPO])

Create An Issue

Pull access users can create issues unless disabled. API may return `410 Gone` if issues off. Excessive endpoint use can trigger rate limiting. It supports raw, text, HTML formats for return d
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_AN_ISSUE])

Issues Create

Pull access users can create issues unless disabled. API may return `410 Gone` if issues off. Excessive endpoint use can trigger rate limiting. It supports raw, text, HTML formats for return d
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ISSUES_CREATE])

List Issue Comments For A Repository

The REST API lists comments on repository issues and pull requests, treating all pull requests as issues but not vice versa. Comments are sorted by ID, with different media types available for
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ISSUE_COMMENTS_FOR_A_REPOSITORY])

Get An Issue Comment

The REST API allows fetching comments on issues and PRs, noting that not all issues are PRs. It supports several media types for different markdown representations: raw, text, HTML, and a full
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ISSUE_COMMENT])

Update An Issue Comment

The REST API lets you update comments on issues and PRs; PRs are issues, but not all issues are PRs. It supports media types for different representations of markdown: raw, text, HTML, or all.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_AN_ISSUE_COMMENT])

Delete An Issue Comment

You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_ISSUE_COMMENT])

Reactions

List Reactions For An Issue Comment

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

Create Reaction For An Issue Comment

Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-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_AN_ISSUE_COMMENT])

Delete An Issue Comment Reaction

You can delete a reaction to an issue comment by specifying `repository_id` using the route `DELETE /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_ISSUE_COMMENT_REACTION])

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🧪