Skip to main content

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

operation 'get_file' required
Get the contents of a file from a GitHub repository
owner string required
Repository owner (username or organization name)
repo string required
Repository name
path string required
Path to the file in the repository (e.g., src/index.ts)
ref string
Git reference (branch, tag, or commit SHA). Defaults to the default branch
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_directory

operation 'get_directory' required
Get the contents of a directory from a GitHub repository
owner string required
Repository owner (username or organization name)
repo string required
Repository name
path string
Path to the directory in the repository (empty string for root)
ref string
Git reference (branch, tag, or commit SHA). Defaults to the default branch
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

list_pull_requests

operation 'list_pull_requests' required
List pull requests in a GitHub repository
owner string required
Repository owner (username or organization name)
repo string 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_page number
Number of results per page (1-100)
page number
Page number for pagination
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_pull_request

operation 'get_pull_request' required
Get detailed information about a specific pull request
owner string required
Repository owner (username or organization name)
repo string required
Repository name
pull_number number required
Pull request number
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

create_pr_comment

operation 'create_pr_comment' required
Add a comment to a pull request
owner string required
Repository owner (username or organization name)
repo string required
Repository name
pull_number number required
Pull request number
body string required
Comment text content (supports GitHub Markdown)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

list_repositories

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_page number
Number of results per page (1-100)
page number
Page number for pagination
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_repository

operation 'get_repository' required
Get detailed information about a specific repository
owner string required
Repository owner (username or organization name)
repo string required
Repository name
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

create_issue_comment

operation 'create_issue_comment' required
Add a comment to an issue
owner string required
Repository owner (username or organization name)
repo string required
Repository name
issue_number number required
Issue number
body string required
Comment text content (supports GitHub Markdown)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

list_issues

operation 'list_issues' required
List issues in a GitHub repository
owner string required
Repository owner (username or organization name)
repo string required
Repository name
state 'open' | 'closed' | 'all'
Filter by issue state
labels string
Filter by labels (comma-separated list)
sort 'created' | 'updated' | 'comments'
Sort order for results
direction 'asc' | 'desc'
Sort direction
per_page number
Number of results per page (1-100)
page number
Page number for pagination
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)