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

Repos

Delete A File

The text explains deleting a file in a repository, mentioning how `committer` or `author` details can be specified but default to the user. It advises against using this method with "Create or
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_FILE])

List Repository Contributors

The GitHub API endpoint shows repo contributors in descending commit order. It may show outdated info due to caching. Only the top 500 contributors are linked to user accounts; others are anon
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_CONTRIBUTORS])

Repo S List Contributors

The GitHub API endpoint shows repo contributors in descending commit order. It may show outdated info due to caching. Only the top 500 contributors are linked to user accounts; others are anon
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_LIST_CONTRIBUTORS])

List Deployments

Simple filtering of deployments is available via query parameters:
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPLOYMENTS])

Create A Deployment

GitHub's deployment feature offers versatile verification across environments like 'production' and 'staging', with parameters like `ref`, `environment`, and `task`, ensuring safety and tracea
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_DEPLOYMENT])

Get A Deployment

This endpoint details a repository's specific deployment, including URL, SHA, environment, creator, timestamps, and more, essential for deploying refs, as per GitHub API docs.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DEPLOYMENT])

Delete A Deployment

To delete a deployment, it must be inactive in multi-deployment repos. Make a deployment inactive by replacement or marking it non-successful. Use `repo` or `repo_deployment` scope tokens. Ref
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_DEPLOYMENT])

List Deployment Statuses

Users with pull access can view deployment statuses for a deployment:
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPLOYMENT_STATUSES])

Create A Deployment Status

Users with `push` access can create deployment statuses for a given deployment. OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_DEPLOYMENT_STATUS])

Get A Deployment Status

Users with pull access can view a deployment status for a deployment:
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DEPLOYMENT_STATUS])

Create A Repository Dispatch Event

Trigger the `repository_dispatch` event on GitHub to start workflows or webhooks with external activity. Configure your GitHub or App to respond to this event. Use the `client_payload` for ext
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_REPOSITORY_DISPATCH_EVENT])

List Environments

Lists the environments for a repository. Anyone with read access to the repository can use this endpoint. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use thi
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ENVIRONMENTS])

Get An Environment

For deploying, refer to deployment branch policy details at a specified link. This is accessible to those with repository read access. Private repository access requires OAuth or personal toke
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ENVIRONMENT])

Create Or Update An Environment

Create/update environments with protection rules and requirements for reviewers, branch name patterns, and secrets. Use `repo` scope for OAuth/personal tokens. See GitHub docs on environments,
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_OR_UPDATE_AN_ENVIRONMENT])

Delete An Environment

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

List Deployment Branch Policies

Lists the deployment branch policies for an environment. Anyone with read access to the repository can use this endpoint. OAuth app tokens and personal access tokens (classic) need the `repo`
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPLOYMENT_BRANCH_POLICIES])

Create A Deployment Branch Policy

Creates a deployment branch or tag policy for an environment. 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_CREATE_A_DEPLOYMENT_BRANCH_POLICY])

Get A Deployment Branch Policy

Gets a deployment branch or tag policy for an environment. Anyone with read access to the repository can use this endpoint. OAuth app tokens and personal access tokens (classic) need the `repo
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DEPLOYMENT_BRANCH_POLICY])

Update A Deployment Branch Policy

Updates a deployment branch or tag policy for an environment. 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_UPDATE_A_DEPLOYMENT_BRANCH_POLICY])

Delete A Deployment Branch Policy

Deletes a deployment branch or tag policy for an environment. 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_A_DEPLOYMENT_BRANCH_POLICY])

Get All Deployment Protection Rules For An Environment

This endpoint fetches enabled custom deployment protection rules for environments, needing 'repo' scope for private repositories. It's open to those with read access and includes more informat
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_ALL_DEPLOYMENT_PROTECTION_RULES_FOR_AN_ENVIRONMENT])

Create A Custom Deployment Protection Rule On An Environment

Enable a custom deployment protection rule for an environment; requires admin or owner permissions. See [GET /apps/{app_slug}] documentation for details. OAuth app tokens and personal access t
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_CUSTOM_DEPLOYMENT_PROTECTION_RULE_ON_AN_ENVIRONMENT])

List Environment Custom Deployment Rules

This endpoint fetches custom deployment protection rules for an environment, needing `repo` scope for private repositories through OAuth or tokens. Details are in GitHub documentation.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ENVIRONMENT_CUSTOM_DEPLOYMENT_RULES])

Get A Custom Deployment Protection Rule

This endpoint retrieves an enabled custom deployment protection rule for an environment accessible to anyone with repository read access. It requires `repo` scope for private repositories when
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_CUSTOM_DEPLOYMENT_PROTECTION_RULE])

Disable A Custom Protection Rule For An Environment

Disables a custom deployment protection rule for an environment. Requires admin or owner permissions and OAuth app or personal access tokens with 'repo' scope.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DISABLE_A_CUSTOM_PROTECTION_RULE_FOR_AN_ENVIRONMENT])

List Forks

This endpoint displays GitHub repo forks by 'owner/repo', sorted by 'newest', 'oldest', 'stargazers', 'watchers'; defaults to 'newest'. Supports pagination ('per_page', 'page'; default 30 resu
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_FORKS])

Create A Fork

Create a fork for the user; it's asynchronous so wait a bit. If over 5 mins, contact GitHub Support. Needs GitHub App installed on both source and destination accounts with necessary access.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_FORK])

Repo S Create Fork

Create a fork for the user; it's asynchronous so wait a bit. If over 5 mins, contact GitHub Support. Needs GitHub App installed on both source and destination accounts with necessary access.<<
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REPO_S_CREATE_FORK])

Dependabot

List Dependabot Alerts For A Repository

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `publ
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPENDABOT_ALERTS_FOR_A_REPOSITORY])

Get A Dependabot Alert

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `publ
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DEPENDABOT_ALERT])

Update A Dependabot Alert

Access to security alerts for a repository requires authenticated user access and specific token scopes (`security_events` or `public_repo` for public repositories). For more, see GitHub docs
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_DEPENDABOT_ALERT])

List Repository Secrets Without Decrypting

Lists all secrets available in a repository without revealing their encrypted values. 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_LIST_REPOSITORY_SECRETS_WITHOUT_DECRYPTING])

Retrieve Repo Public Key For Encryption

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

Get Repository Secret Securely

Gets a single repository 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_REPOSITORY_SECRET_SECURELY])

Create Or Update Repo Secret With Encrypted Value

This text explains how to create or update a repository secret with an encrypted value using LibSodium. It highlights that OAuth app and personal access tokens require the `repo` scope. For en
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_OR_UPDATE_REPO_SECRET_WITH_ENCRYPTED_VALUE])

Delete Dependebot Secret By Name

Deletes a 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_DEPENDEBOT_SECRET_BY_NAME])

Dependency-graph

Get A Diff Of The Dependencies Between Commits

Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DIFF_OF_THE_DEPENDENCIES_BETWEEN_COMMITS])

Export A Software Bill Of Materials Sbom For A Repository

Exports the software bill of materials (SBOM) for a repository in SPDX JSON format.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_EXPORT_A_SOFTWARE_BILL_OF_MATERIALS_SBOM_FOR_A_REPOSITORY])

Create A Snapshot Of Dependencies For A Repository

Create a new snapshot of a repository's dependencies. The authenticated user must have access to the repository. OAuth app tokens and personal access tokens (classic) need the `repo` scope to
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_SNAPSHOT_OF_DEPENDENCIES_FOR_A_REPOSITORY])

Actions

List Environment Secrets

This endpoint allows users with collaborator access to list all secrets in an environment, without showing their encrypted values. OAuth app and personal access tokens with `repo` scope are re
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ENVIRONMENT_SECRETS])

Get An Environment Public Key

To encrypt environment secrets, acquire the environment's public key. Encryption is essential for secret creation or update. Read access to the repository is needed, with private repositories
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ENVIRONMENT_PUBLIC_KEY])

Get An Environment Secret

This API endpoint allows authenticated collaborators with `repo` scope via OAuth or personal access tokens to get a single repository environment secret without decrypting it.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ENVIRONMENT_SECRET])

Create Or Update An Environment Secret

This text explains how to create or update encrypted environment secrets with LibSodium for GitHub's REST API, requiring collaborator access and `repo` scope on tokens.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_OR_UPDATE_AN_ENVIRONMENT_SECRET])

Delete An Environment Secret

Deletes a secret in an environment using the secret name. Authenticated users must have collaborator access to a repository to create, update, or read secrets. OAuth tokens and personal access
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_ENVIRONMENT_SECRET])

List Environment Variables

Lists all environment variables. Authenticated users must have collaborator access to a repository to create, update, or read variables. OAuth app tokens and personal access tokens (classic) n
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ENVIRONMENT_VARIABLES])

Create An Environment Variable

To reference an environment variable in GitHub Actions, users need collaborator access. OAuth and classic personal access tokens require the `repo` scope for creation, updating, or reading var
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_AN_ENVIRONMENT_VARIABLE])

Get An Environment Variable

Gets a specific variable in an environment. Authenticated users must have collaborator access to a repository to create, update, or read variables. OAuth tokens and personal access tokens (cla
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ENVIRONMENT_VARIABLE])

Update An Environment Variable

To create, update, or read environment variables in a GitHub Actions workflow, authenticated collaborators need `repo` scope on OAuth or classic tokens.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_AN_ENVIRONMENT_VARIABLE])

Delete An Environment Variable

Authenticated users need collaborator access to delete an environment variable by its name. OAuth and classic personal access tokens require the `repo` scope for this action.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_ENVIRONMENT_VARIABLE])

Activity

List Repository Events

**Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_EVENTS])

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🧪