Package Exports
- @gammatech/needs-testing
- @gammatech/needs-testing/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gammatech/needs-testing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@gammatech/needs-testing
A CLI tool that helps you find and manage GitHub pull requests with the "needs-testing" label.
Installation
Option 1: Install globally via npm (recommended)
npm install -g @gammatech/needs-testingOption 2: Clone and install locally
# Clone the repository
git clone https://github.com/gamma-app/needs-testing-cli.git
cd needs-testing-cli
# Install dependencies and build
npm install
npm run build
# Link package globally
npm linkPrerequisites
Node.js 20 or higher (recommended)
GitHub CLI (
gh) installed and authenticated- The app will automatically use your GitHub CLI credentials if available
- Run
gh auth loginto set up GitHub CLI if you haven't done so
Authentication is handled in one of these ways (in order of precedence):
GITHUB_TOKENenvironment variable in your shell- GitHub CLI authentication via
gh auth token
# Make sure you're authenticated with GitHub CLI
gh auth status
# If not authenticated, run:
gh auth login
# Or set the GITHUB_TOKEN environment variable
export GITHUB_TOKEN=your_github_personal_access_tokenUsage
Run the CLI:
# Use with default repository (gamma-app/gamma)
# Shows all PRs that need testing
needs-testing
# Show only your PRs that need testing
needs-testing --me
# Specify a different repository
needs-testing --owner <owner> --repo <repo>
# Specify a different repository and only show your PRs
needs-testing --owner <owner> --repo <repo> --me
# Or run the CLI using npx if not installed globally
npx needs-testing
# To run in development mode during development
npm run devThe default repository is set to gamma-app/gamma. Override with the --owner and --repo flags if needed.
By default, the CLI shows PRs from all authors that have the "needs-testing" label. Use the --me flag to filter to only your PRs.
Features
- Lists merged PRs that have the "needs-testing" label
- Navigate the PR list with arrow keys
- Queue changes with optimistic UI updates
- Apply changes in batch with a single command
- Fast workflow for bulk label management
Keyboard Controls
Up/Downarrows: Navigate through PRsSpace/Enter: Toggle the "needs-testing" label (immediately updates UI)Ctrl+S(pressed twice): Save all changes and exit
Development
# Run in development mode with default repo (gamma-app/gamma)
npm run dev
# Run with a specific repository
npm run dev -- --owner <owner> --repo <repo>
# Format code
npm run formatLocal Development Setup
- Clone the repository
- Install dependencies:
npm install - Run in development mode:
npm run dev
How it works
This CLI:
- Uses the GitHub CLI (
gh) to search for your merged pull requests with the "needs-testing" label - Parses and displays the results in a nice terminal UI using Ink
- Provides keyboard-driven interaction to toggle the "needs-testing" label
- Uses
gh pr editcommands to add or remove labels
License
ISC