@gammatech/needs-testing

1.0.4 • Public • Published

@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-testing

Option 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 link

Prerequisites

  1. Node.js 20 or higher (recommended)

  2. GitHub CLI (gh) installed and authenticated

    • The app will automatically use your GitHub CLI credentials if available
    • Run gh auth login to set up GitHub CLI if you haven't done so
  3. Authentication is handled in one of these ways (in order of precedence):

    • GITHUB_TOKEN environment 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_token

Usage

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 dev

The 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/Down arrows: Navigate through PRs
  • Space/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 format

Local Development Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. Run in development mode: npm run dev

How it works

This CLI:

  1. Uses the GitHub CLI (gh) to search for your merged pull requests with the "needs-testing" label
  2. Parses and displays the results in a nice terminal UI using Ink
  3. Provides keyboard-driven interaction to toggle the "needs-testing" label
  4. Uses gh pr edit commands to add or remove labels

License

ISC

Package Sidebar

Install

npm i @gammatech/needs-testing

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

27.9 kB

Total Files

8

Last publish

Collaborators

  • jamison.fox
  • jordangarcia
  • sarafina-smith
  • thatsjonsense
  • stephen-gamma
  • gammajens