Use github with Langchain Python

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
- GITHUB API ROOT
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
Framework

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])

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])

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])

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])

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])

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])

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])

Frequently asked questions

What is Composio.dev?

Composio.dev is a cutting-edge framework for building AI applications, designed to make the process of developing AI solutions super easy and fun! It's a collection of powerful tools and libraries that simplify the process of creating AI applications, 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, making it a breeze to leverage its capabilities within the Composio.dev platform. You can use github to call functions on various platforms like Google, GitHub, and others, allowing you to incorporate different services into your AI applications with ease. It also supports user login via OAuth2 and can work with other popular frameworks such as LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with github and langchain_python?

When using github and langchain_python, 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 with langchain_python?

Integrating github with langchain_python is super easy with Composio.dev! You can use the Composio.dev API to call functions from both github and langchain_python, allowing you to tap into their capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with the language you're most comfortable with and integrate these powerful tools into your projects seamlessly.

What is the pricing for github and langchain_python?

Both github and langchain_python are completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes them accessible for developers and organizations of all sizes, whether you're a student working on a personal project or a startup building the next big thing. You can get started with these powerful tools without worrying about breaking the bank.

What kind of authentication is supported for github and langchain_python?

github and langchain_python support OAuth2 authentication, ensuring secure and authorized access to their functionalities. You can use the Composio.dev API to handle authentication and call functions from both github and langchain_python 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 both github and langchain_python, enabling you to leverage their 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 these powerful tools to your project with ease.

What is the accuracy of github and langchain_python?

github and langchain_python are 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. The 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 and langchain_python?

github and langchain_python can be used for a wide range of AI applications, making them versatile tools for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. They're 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, these tools 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.

Can I customize github and langchain_python for my specific needs?

Absolutely! github and langchain_python are highly customizable and extensible, allowing you to tailor their functionality, models, and configurations to meet your specific requirements. Whether you're building a chatbot, a content creation tool, or any other AI-powered application, you can customize these tools to fit your unique needs. Additionally, Composio.dev provides a flexible platform for integrating and orchestrating various AI tools and services, enabling you to create custom AI solutions that are tailored to your project.

What kind of support and documentation is available for github and langchain_python?

github and langchain_python have comprehensive documentation and a supportive community, making it easy for you to get started and find answers to your questions. Composio.dev also provides extensive resources, including tutorials, guides, and a dedicated support team to assist you throughout your AI development journey. Whether you're a beginner or an experienced developer, you'll have access to the resources you need to make the most of these powerful tools.
+ 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🧪