Use Github with OpenAI 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
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

Issues

List Issue Events For A Repository

Lists events for a repository.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ISSUE_EVENTS_FOR_A_REPOSITORY])

Issues List Events For Repo

Lists events for a repository.<<DEPRECATED use list_issue_events_for_a_repository>>
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ISSUES_LIST_EVENTS_FOR_REPO])

Get An Issue Event

Gets a single event by the event id.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ISSUE_EVENT])

Get An Issue

GitHub API marks issue transfers with `301`, restricts access with `404`, signals deletions with `410`, and tracks updates via the `issues` webhook. PRs are tagged as issues with a `pull_reque
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_AN_ISSUE])

Issues Get

GitHub API marks issue transfers with `301`, restricts access with `404`, signals deletions with `410`, and tracks updates via the `issues` webhook. PRs are tagged as issues with a `pull_reque
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ISSUES_GET])

Update An Issue

Issue owners and users with push access can edit issues. The endpoint supports different media types for markdown formatting, including raw, text, HTML representations, and a combination of al
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_AN_ISSUE])

Add Assignees To An Issue

Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ADD_ASSIGNEES_TO_AN_ISSUE])

Remove Assignees From An Issue

Removes one or more assignees from an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_ASSIGNEES_FROM_AN_ISSUE])

Check If A User Can Be Assigned To A Issue

Checks if a user has permission to be assigned to a specific issue. If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. Otherwise a `404` status c
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CHECK_IF_A_USER_CAN_BE_ASSIGNED_TO_A_ISSUE])

List Issue Comments

The REST API enables listing comments on issues & pull requests, distinguishing between them. Comments are ID-sorted. It supports various response formats like markdown, text, HTML, or mixed.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ISSUE_COMMENTS])

Create An Issue Comment

The REST API allows creating comments on issues and PRs, noting that all PRs are issues, but not vice versa. It can trigger notifications and may face rate limits. Supports various media types
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_AN_ISSUE_COMMENT])

Issues Create Comment

The REST API allows creating comments on issues and PRs, noting that all PRs are issues, but not vice versa. It can trigger notifications and may face rate limits. Supports various media types
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ISSUES_CREATE_COMMENT])

List Issue Events

Lists all events for an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_ISSUE_EVENTS])

List Labels For An Issue

Lists all labels for an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_LABELS_FOR_AN_ISSUE])

Add Labels To An Issue

Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_ADD_LABELS_TO_AN_ISSUE])

Set Labels For An Issue

Removes any previous labels and sets the new labels for an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SET_LABELS_FOR_AN_ISSUE])

Remove All Labels From An Issue

Removes all labels from an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_ALL_LABELS_FROM_AN_ISSUE])

Remove A Label From An Issue

Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_REMOVE_A_LABEL_FROM_AN_ISSUE])

Lock An Issue

Users with push access can lock conversations in issues or pull requests. Without parameters, set `Content-Length` to zero. More info at GitHub's REST API guide.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LOCK_AN_ISSUE])

Unlock An Issue

Users with push access can unlock an issue's conversation.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UNLOCK_AN_ISSUE])

List Timeline Events For An Issue

List all timeline events for an issue.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_TIMELINE_EVENTS_FOR_AN_ISSUE])

List Labels For A Repository

Lists all labels for a repository.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_LABELS_FOR_A_REPOSITORY])

Create A Label

Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_LABEL])

Get A Label

Gets a label using the given name.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_LABEL])

Update A Label

Updates a label using the given label name.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_LABEL])

Delete A Label

Deletes a label using the given label name.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_LABEL])

List Milestones

Lists milestones for a repository.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_MILESTONES])

Create A Milestone

Creates a milestone.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_MILESTONE])

Get A Milestone

Gets a milestone using the given milestone number.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_MILESTONE])

Update A Milestone

Update a milestone in a GitHub repo by specifying its number. Supports changing its title, state, description, and due date. Refer to [GitHub Docs](https://docs.github.com/rest/issues/milestones#u
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_A_MILESTONE])

Delete A Milestone

Deletes a milestone using the given milestone number.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_MILESTONE])

List Labels For Issues In A Milestone

Lists labels for issues in a milestone.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_LABELS_FOR_ISSUES_IN_A_MILESTONE])

Reactions

List Reactions For An Issue

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

Create Reaction For An Issue

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

Delete An Issue Reaction

**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. Delete a reaction to an [issue
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_AN_ISSUE_REACTION])

Repos

List Deploy Keys

This GitHub endpoint lists a repository's deploy keys, identified by `owner` and `repo`, with pagination supported through `per_page` and `page`. It provides key details like id, content, and
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_DEPLOY_KEYS])

Create A Deploy Key

You can create a read-only deploy key.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_DEPLOY_KEY])

Get A Deploy Key

Get details of a GitHub repository deploy key by supplying owner, repo, and key ID. Documentation available at GitHub's REST API page. Supports JSON format for key data and metadata.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_DEPLOY_KEY])

Delete A Deploy Key

Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_DEPLOY_KEY])

List Repository Languages

Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_LANGUAGES])

Sync A Fork Branch With The Upstream Repository

Sync a branch of a forked repository to keep it up-to-date with the upstream repository.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_SYNC_A_FORK_BRANCH_WITH_THE_UPSTREAM_REPOSITORY])

Merge A Branch

GitHub's endpoint merges a branch by requiring the repo's owner, name, and JSON details (base, head, optional message). It returns status 201 with commit info on success, or errors for issues
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_MERGE_A_BRANCH])

Get A Github Pages Site

Gets information about a GitHub Pages site. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_A_GITHUB_PAGES_SITE])

Create A Github Pages Site

Summary: Configures a GitHub Pages site, requiring the user to be a repository admin, maintainer, or have specific permission. OAuth app and classic personal access tokens need the `repo` scop
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_CREATE_A_GITHUB_PAGES_SITE])

Update Information About A Github Pages Site

Updates GitHub Pages site info require the user to be an admin, maintainer, or have specific permission, with OAuth or personal access tokens needing 'repo' scope.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_UPDATE_INFORMATION_ABOUT_A_GITHUB_PAGES_SITE])

Delete A Github Pages Site

This text explains how to delete a GitHub Pages site, requiring the user to be a repository admin, maintainer, or have specific permissions. OAuth or personal access tokens with 'repo' scope a
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_DELETE_A_GITHUB_PAGES_SITE])

List Github Pages Builds

Lists builts of a GitHub Pages site. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_GITHUB_PAGES_BUILDS])

Licenses

Get The License For A Repository

This method fetches a repository's license content, if detected. It supports custom media types for returning the license either as raw text or HTML. More details on media types at GitHub's do
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_GET_THE_LICENSE_FOR_A_REPOSITORY])

Activity

List Repository Notifications For The Authenticated User

Lists all notifications for the current user in the specified repository.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_LIST_REPOSITORY_NOTIFICATIONS_FOR_THE_AUTHENTICATED_USER])

Mark Repository Notifications As Read

Marks repository notifications as "read" for a user. A `202 Accepted` status signals the start of marking notifications. To check remaining unread notifications, use the List repository notifi
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.GITHUB_MARK_REPOSITORY_NOTIFICATIONS_AS_READ])

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 openAI_python?

When using Github and openAI_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 openAI_python?

Integrating Github with openAI_python is super easy with Composio.dev! You can use the Composio.dev API to call functions from both Github and openAI_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 openAI_python?

Both Github and openAI_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 openAI_python?

Github and openAI_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 openAI_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 openAI_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 openAI_python?

Github and openAI_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 openAI_python?

Github and openAI_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 openAI_python for my specific needs?

Absolutely! Github and openAI_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 openAI_python?

Github and openAI_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🧪