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