@leash/integration-github
v0.1.0
Published
Typed GitHub integration for Leash
Readme
@leash/integration-github
Typed GitHub integration for Leash — auto-generated by
leash-codegen.
Installation
npm install @leash/integration-githubRequires @leash/sdk >= 0.2.0 as a peer dependency.
Usage
import { LeashIntegrations } from '@leash/sdk/integrations'
import { createGithubClient } from '@leash/integration-github'
const leash = new LeashIntegrations({ apiKey: process.env.LEASH_API_KEY! })
const github = createGithubClient(leash)
// Example: call createOrUpdateFile
const result = await github.createOrUpdateFile({ owner: '...', repo: '...', path: '...' })Available Methods
createOrUpdateFile(params)— Create or update a single file in a GitHub repositorysearchRepositories(params)— Search for GitHub repositoriescreateRepository(params)— Create a new GitHub repository in your accountgetFileContents(params)— Get the contents of a file or directory from a GitHub repositorypushFiles(params)— Push multiple files to a GitHub repository in a single commitcreateIssue(params)— Create a new issue in a GitHub repositorycreatePullRequest(params)— Create a new pull request in a GitHub repositoryforkRepository(params)— Fork a GitHub repository to your account or specified organizationcreateBranch(params)— Create a new branch in a GitHub repositorylistCommits(params)— Get list of commits of a branch in a GitHub repositorylistIssues(params)— List issues in a GitHub repository with filtering optionsupdateIssue(params)— Update an existing issue in a GitHub repositoryaddIssueComment(params)— Add a comment to an existing issuesearchCode(params)— Search for code across GitHub repositoriessearchIssues(params)— Search for issues and pull requests across GitHub repositoriessearchUsers(params)— Search for users on GitHubgetIssue(params)— Get details of a specific issue in a GitHub repository.getPullRequest(params)— Get details of a specific pull requestlistPullRequests(params)— List and filter repository pull requestscreatePullRequestReview(params)— Create a review on a pull requestmergePullRequest(params)— Merge a pull requestgetPullRequestFiles(params)— Get the list of files changed in a pull requestgetPullRequestStatus(params)— Get the combined status of all status checks for a pull requestupdatePullRequestBranch(params)— Update a pull request branch with the latest changes from the base branchgetPullRequestComments(params)— Get the review comments on a pull requestgetPullRequestReviews(params)— Get the reviews on a pull request
License
Apache-2.0
