Github Bubble
GitHub API integration for repository operations
Quick Start
import { GithubBubble } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new GithubBubble({
operation: 'get_file',
credentials: {
[CredentialType.GITHUB_TOKEN]: process.env.GITHUB_TOKEN as string,
},
}).action();
Operation Details
get_file
- Input Schema
- Output Schema
operation'get_file' required- Get the contents of a file from a GitHub repository
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
pathstring required- Path to the file in the repository (e.g., src/index.ts)
refstring- Git reference (branch, tag, or commit SHA). Defaults to the default branch
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_file' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
namestring- File name
pathstring- Full path to the file in the repository
shastring- Git SHA hash of the file
sizenumber- File size in bytes
urlstring- API URL for this file
html_urlstring- Web URL to view the file on GitHub
git_urlstring- Git URL for the file object
download_urlstring- Direct download URL for the file
type'file' | 'dir' | 'symlink' | 'submodule'- Type of the content
contentstring- Base64 encoded content (for files)
encodingstring- Encoding type (usually base64)
get_directory
- Input Schema
- Output Schema
operation'get_directory' required- Get the contents of a directory from a GitHub repository
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
pathstring- Path to the directory in the repository (empty string for root)
refstring- Git reference (branch, tag, or commit SHA). Defaults to the default branch
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_directory' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
contentsobject[]- Array of directory contents
list_pull_requests
- Input Schema
- Output Schema
operation'list_pull_requests' required- List pull requests in a GitHub repository
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
state'open' | 'closed' | 'all'- Filter by PR state
sort'created' | 'updated' | 'popularity' | 'long-running'- Sort order for results
direction'asc' | 'desc'- Sort direction
per_pagenumber- Number of results per page (1-100)
pagenumber- Page number for pagination
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'list_pull_requests' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
pull_requestsobject[]- Array of pull requests
get_pull_request
- Input Schema
- Output Schema
operation'get_pull_request' required- Get detailed information about a specific pull request
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
pull_numbernumber required- Pull request number
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_pull_request' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
idnumber- Pull request ID
node_idstring- GraphQL node ID
numbernumber- Pull request number
state'open' | 'closed'- Pull request state
titlestring- Pull request title
bodystring- Pull request description
created_atstring- ISO datetime when PR was created
updated_atstring- ISO datetime when PR was last updated
closed_atstring- ISO datetime when PR was closed
merged_atstring- ISO datetime when PR was merged
userobject- Pull request author
html_urlstring- Web URL to view the PR
draftboolean- Whether this is a draft PR
headobject- Source branch information
baseobject- Target branch information
mergedboolean- Whether the PR has been merged (may not be present in list responses)
mergeableboolean- Whether the PR can be merged (may not be present in list responses)
mergeable_statestring- Mergeable state (clean, unstable, dirty, etc.)
commentsnumber- Number of comments
review_commentsnumber- Number of review comments
commitsnumber- Number of commits
additionsnumber- Lines added
deletionsnumber- Lines deleted
changed_filesnumber- Number of files changed
create_pr_comment
- Input Schema
- Output Schema
operation'create_pr_comment' required- Add a comment to a pull request
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
pull_numbernumber required- Pull request number
bodystring required- Comment text content (supports GitHub Markdown)
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'create_pr_comment' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
idnumber- Comment ID
node_idstring- GraphQL node ID
bodystring- Comment text content
userobject- Comment author information
created_atstring- ISO datetime when comment was created
updated_atstring- ISO datetime when comment was last updated
html_urlstring- Web URL to view the comment
list_repositories
- Input Schema
- Output Schema
operation'list_repositories' required- List repositories for the authenticated user
visibility'all' | 'public' | 'private'- Filter by repository visibility
affiliation'owner' | 'collaborator' | 'organization_member'- Filter by user affiliation
sort'created' | 'updated' | 'pushed' | 'full_name'- Sort order for results
direction'asc' | 'desc'- Sort direction
per_pagenumber- Number of results per page (1-100)
pagenumber- Page number for pagination
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'list_repositories' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
repositoriesobject[]- Array of repositories
get_repository
- Input Schema
- Output Schema
operation'get_repository' required- Get detailed information about a specific repository
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_repository' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
idnumber- Repository ID
node_idstring- GraphQL node ID
namestring- Repository name
full_namestring- Full repository name (owner/repo)
privateboolean- Whether the repository is private
ownerobject- Repository owner information
html_urlstring- Repository web URL
descriptionstring- Repository description
forkboolean- Whether this is a fork
created_atstring- ISO datetime when repository was created
updated_atstring- ISO datetime when repository was last updated
pushed_atstring- ISO datetime of last push
sizenumber- Repository size in KB
stargazers_countnumber- Number of stars
watchers_countnumber- Number of watchers
languagestring- Primary programming language
forks_countnumber- Number of forks
open_issues_countnumber- Number of open issues
default_branchstring- Default branch name
visibilitystring- Repository visibility (public, private, internal)
create_issue_comment
- Input Schema
- Output Schema
operation'create_issue_comment' required- Add a comment to an issue
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
issue_numbernumber required- Issue number
bodystring required- Comment text content (supports GitHub Markdown)
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'create_issue_comment' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
idnumber- Comment ID
node_idstring- GraphQL node ID
bodystring- Comment text content
userobject- Comment author information
created_atstring- ISO datetime when comment was created
updated_atstring- ISO datetime when comment was last updated
html_urlstring- Web URL to view the comment
list_issues
- Input Schema
- Output Schema
operation'list_issues' required- List issues in a GitHub repository
ownerstring required- Repository owner (username or organization name)
repostring required- Repository name
state'open' | 'closed' | 'all'- Filter by issue state
labelsstring- Filter by labels (comma-separated list)
sort'created' | 'updated' | 'comments'- Sort order for results
direction'asc' | 'desc'- Sort direction
per_pagenumber- Number of results per page (1-100)
pagenumber- Page number for pagination
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'list_issues' requiredsuccessboolean required- Whether the operation succeeded
errorstring required- Error message if operation failed
issuesobject[]- Array of issues