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

Pulls

Update A Pull Request Branch

Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_PULL_REQUEST_BRANCH])

Repos

Get A Repository Readme

This endpoint retrieves the preferred README of a repository, supporting two media types: `application/vnd.github.raw+json` for raw file contents (default) and `application/vnd.github.html+jso
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_README])

Get A Repository Readme For A Directory

This endpoint fetches a repository's README, offering raw file contents by default (`application/vnd.github.raw+json`) or in HTML format (`application/vnd.github.html+json`), utilizing GitHub'
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_README_FOR_A_DIRECTORY])

List Releases

The text explains that the provided list only includes releases, not all Git tags, advising to use the Repository Tags API for those. Published releases are public, while draft releases info i
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_RELEASES])

Create A Release

Users with push access can create a release, triggering notifications. Rapid creation may face secondary rate limiting. For details, see GitHub's rate limits and REST API best practices.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_RELEASE])

Get A Release Asset

To download an asset, set the `Accept` header to `application/octet-stream`. The API may redirect (302) or stream directly (200), so clients should support both responses.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_RELEASE_ASSET])

Update A Release Asset

Users with push access to the repository can edit a release asset.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_RELEASE_ASSET])

Delete A Release Asset

Delete a specified release asset from a GitHub repository by providing the `owner`, `repo`, and `asset_id`. Access the detailed API documentation at https://docs.github.com/rest/releases/asset
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_RELEASE_ASSET])

Generate Release Notes Content For A Release

Release notes, named and formatted in Markdown, detail changes since the last release and contributors. Intended for creating new releases, they are not stored but generated as needed.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GENERATE_RELEASE_NOTES_CONTENT_FOR_A_RELEASE])

Get The Latest Release

The latest published release for a repository is the most recent non-prerelease, non-draft version, ordered by the `created_at` date, which is the commit date, not the drafting or publishing d
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_LATEST_RELEASE])

Get A Release By Tag Name

Get a published release with the specified tag.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_RELEASE_BY_TAG_NAME])

Get A Release

The public release is accessible with a given release ID, providing an `upload_url` for asset uploads. This URL is a hypermedia resource, detailed in GitHub's REST API guide.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_RELEASE])

Update A Release

Users with push access to the repository can edit a release.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_RELEASE])

Delete A Release

Users with push access to the repository can delete a release.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_RELEASE])

List Release Assets

This endpoint fetches assets for a repository's release on GitHub, needing repository owner, repo name, and release ID. Supports pagination with `per_page` and `page`. Returns asset details li
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_RELEASE_ASSETS])

Get Rules For A Branch

The text details a feature returning all active rules for a branch, real or hypothetical, at any configuration level. Rules in "evaluate" or "disabled" status are excluded.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_RULES_FOR_A_BRANCH])

Get All Repository Rulesets

Get all the rulesets for a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ALL_REPOSITORY_RULESETS])

Create A Repository Ruleset

Create a ruleset for a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REPOSITORY_RULESET])

List Repository Rule Suites

This text discusses managing repository-level rule evaluations, including insights. For details, visit the provided GitHub documentation link.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_RULE_SUITES])

Get A Repository Rule Suite

This document provides details on obtaining rule evaluations for a repository, with further guidance available on managing rulesets at a provided GitHub documentation link.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_RULE_SUITE])

Get A Repository Ruleset

Get a ruleset for a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_RULESET])

Update A Repository Ruleset

Update a ruleset for a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_REPOSITORY_RULESET])

Delete A Repository Ruleset

Delete a ruleset for a repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_REPOSITORY_RULESET])

Get The Weekly Commit Activity

The endpoint provides weekly aggregates of additions and deletions for repositories with fewer than 10,000 commits. Repositories exceeding this limit return a 422 status code.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_WEEKLY_COMMIT_ACTIVITY])

Repo S Get Code Frequency Stats

The endpoint provides weekly aggregates of additions and deletions for repositories with fewer than 10,000 commits. Repositories exceeding this limit return a 422 status code.<<DEPRECATED use
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_GET_CODE_FREQUENCY_STATS])

Get The Last Year Of Commit Activity

Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_LAST_YEAR_OF_COMMIT_ACTIVITY])

Get All Contributor Commit Activity

The endpoint shows the total commits authored by a contributor, a weekly summary (`weeks` array) of additions, deletions, and commits, starting from a Unix timestamp. For repositories with 10,
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ALL_CONTRIBUTOR_COMMIT_ACTIVITY])

Repo S Get Contributors Stats

The endpoint shows the total commits authored by a contributor, a weekly summary (`weeks` array) of additions, deletions, and commits, starting from a Unix timestamp. For repositories with 10,
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_GET_CONTRIBUTORS_STATS])

Get The Weekly Commit Count

The text explains how to find total commit counts for an owner and everyone (all) in the last 52 weeks, from the oldest to the most recent week (seven days ago until today at UTC midnight), by
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_WEEKLY_COMMIT_COUNT])

Get The Hourly Commit Count For Each Day

The text details a format for tracking commits: `[day, hour, commits]`, with days 0-6 for Sunday-Saturday and hours 0-23. Example `[2, 14, 25]` represents 25 commits at 2pm on Tuesdays, based
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_HOURLY_COMMIT_COUNT_FOR_EACH_DAY])

Create A Commit Status

Users with push access in a repository can create commit statuses for a given SHA. Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_COMMIT_STATUS])

Reactions

List Reactions For A Release

List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release).
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REACTIONS_FOR_A_RELEASE])

Create Reaction For A Release

Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this releas
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_REACTION_FOR_A_RELEASE])

Delete A Release Reaction

You can delete a reaction to a GitHub release by using the route `DELETE /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`, specifying the repository by `repository_id`
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_RELEASE_REACTION])

Secret-scanning

List Secret Scanning Alerts For A Repository

This endpoint lists secret scanning alerts for repositories, requiring the user to be an administrator and to use tokens with `repo`, `security_events`, or `public_repo` (for public repositori
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_SECRET_SCANNING_ALERTS_FOR_A_REPOSITORY])

Get A Secret Scanning Alert

To fetch a secret scanning alert, a user must be an admin of the repo or its organization, and use tokens with `repo`, `security_events`, or `public_repo` (for public repositories) scopes.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_SECRET_SCANNING_ALERT])

Update A Secret Scanning Alert

This endpoint lets admins of repositories or their organizations update the status of secret scanning alerts. It requires OAuth or personal access tokens with `repo` or `security_events` scope
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_SECRET_SCANNING_ALERT])

List Locations For A Secret Scanning Alert

This endpoint displays all secret scanning alerts for eligible repositories to their admins, requiring OAuth or access tokens with `repo`, `security_events`, or `public_repo` for public ones.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_LOCATIONS_FOR_A_SECRET_SCANNING_ALERT])

Security-advisories

List Repository Security Advisories

Users with certain roles and 'repo' or 'repository_advisories:read' scope via OAuth or classic tokens can access both published and unpublished security advisories in private repositories.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_SECURITY_ADVISORIES])

Create A Repository Security Advisory

To create a draft repository security advisory, the user must be a security manager or admin of the repository. OAuth app and classic personal access tokens require `repo` or `repository_advis
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REPOSITORY_SECURITY_ADVISORY])

Privately Report A Security Vulnerability

To report a security vulnerability in a repository, follow the guide on private reporting at: https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_PRIVATELY_REPORT_A_SECURITY_VULNERABILITY])

Get A Repository Security Advisory

Publicly published security advisories are freely accessible, while unpublished ones require authenticated access with specific roles. Private repository advisories need tokens with `repo` or
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_SECURITY_ADVISORY])

Update A Repository Security Advisory

To update a repository security advisory using its GHSA ID, the user must have specific repository roles or be a collaborator with appropriate OAuth or personal access token scopes (`repo` or
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_REPOSITORY_SECURITY_ADVISORY])

Request A Cve For A Repository Security Advisory

To get a CVE number for a project's security vulnerability, request it via GitHub for public repositories only. The requester must be a security manager or administrator with specific OAuth or
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REQUEST_A_CVE_FOR_A_REPOSITORY_SECURITY_ADVISORY])

Create A Temporary Private Fork

Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minute
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_TEMPORARY_PRIVATE_FORK])

Activity

List Stargazers

This endpoint lists the people who have starred a repository and supports custom media types, including one that adds a timestamp for when the star was created. See GitHub's media types docume
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_STARGAZERS])

Activity List Stargazers For Repo

This endpoint lists the people who have starred a repository and supports custom media types, including one that adds a timestamp for when the star was created. See GitHub's media types docume
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ACTIVITY_LIST_STARGAZERS_FOR_REPO])

List Watchers

Lists the people watching the specified repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_WATCHERS])

Get A Repository Subscription

Gets information about whether the authenticated user is subscribed to the repository.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_REPOSITORY_SUBSCRIPTION])

Set A Repository Subscription

To manage repository notifications: enable by setting `subscribed` to true, ignore by setting `ignored` to true, or stop watching by deleting the repository's subscription.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SET_A_REPOSITORY_SUBSCRIPTION])

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🧪