npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

supersetbot

v0.5.44

Published

A bot for the Superset GitHub repo

Readme

supersetbot

supersetbot is a utility bot that streamlines GitHub operations, CI/CD workflows, and release management for Apache Superset.

The bot can be used as a local CLI OR, for a subset of fitted use cases, can be invoked directly from GitHub comments using @supersetbot commands.

Because it's its own npm app, it can be tested/deployed/used in isolation from the rest of Superset, and take on some of the complexity from GitHub actions and onto a nifty utility that can be used in different contexts.

Prerequisites

  • Node.js 20 or higher
  • npm or yarn
  • Git
  • GitHub personal access token (for GitHub operations)

Installation

Global Installation

nvm use 20
npm install -g supersetbot

Local Development

git clone https://github.com/apache-superset/supersetbot.git
cd supersetbot
nvm use 20
npm install

Features

Available Commands

supersetbot [options] [command]

Global Options:
  -v, --verbose                      Output extra debugging information
  -r, --repo <repo>                  The GitHub repo to use (ie:"apache/superset")
  -d, --dry-run                      Run the command in dry-run mode
  -a, --actor <actor>                The actor
  -h, --help                         display help for command

Label Management

Add a label to an issue or PR

supersetbot label "v3.0" -i 12345
supersetbot label "enhancement" -i 12345 -r apache/superset

Remove a label from an issue or PR

supersetbot unlabel "needs-review" -i 12345

Add organization label based on author

supersetbot orglabel -i 12345

Release Management

Auto-label a PR with its release version

supersetbot release-label-pr 12345
supersetbot release-label-pr 12345 --exclude-cherries  # Exclude cherry-picked commits

Batch label PRs for a specific release

supersetbot release-label v3.0.0

Auto-label multiple merged PRs

supersetbot release-label-prs --search "merged:>2024-01-01" --pages 5

Python Dependencies

Bump Python dependencies

# Update all dependencies
supersetbot bump-python

# Update specific package
supersetbot bump-python -p pandas

# Update a group of dependencies
supersetbot bump-python -g dev

# Create PRs with limits
supersetbot bump-python --limit 5 --only-base

Docker Operations

Generate Docker build commands

# Build lean image
supersetbot docker --preset lean --platform linux/amd64

# Build for multiple platforms
supersetbot docker --preset dev --platform linux/amd64 linux/arm64

# Build and push
supersetbot docker --preset lean --push --context release --context-ref v3.0.0

Utility Commands

Get version

supersetbot version

GitHub Integration

supersetbot can be invoked directly from GitHub comments in issues and PRs:

@supersetbot label v3.0
@supersetbot orglabel
@supersetbot release-label-pr 12345

The bot will process the command and respond with a comment containing the results.

Architecture

supersetbot follows a modular architecture designed for extensibility and maintainability:

Core Components

  • CLI Interface (src/cli.js): Commander.js-based CLI that defines all available commands
  • Context Manager (src/context.js): Handles execution context (CLI vs GitHub Actions) and manages logging
  • GitHub Client (src/github.js): Octokit-based GitHub API wrapper with rate limiting and throttling
  • Git Operations (src/git.js): Release management and PR analysis using simple-git
  • Docker Builder (src/docker.js): Docker command generation for various build presets
  • Utilities (src/utils.js): Shared helper functions and shell command execution

Key Design Patterns

  • Context-Aware Execution: Commands behave differently based on execution environment
  • Dry-Run Support: All destructive operations support --dry-run for safety
  • Verbose Logging: Detailed debug output available with --verbose flag
  • Error Resilience: Graceful error handling with informative messages

Development

Running Locally

# Run from source
./src/supersetbot [command]

# Run tests
npm test

# Lint code
npm run lint

Environment Variables

  • GITHUB_TOKEN: Required for GitHub API operations
  • GITHUB_REPOSITORY: Default repository (e.g., "apache/superset")
  • GITHUB_ACTOR: The user performing the action
  • GITHUB_ISSUE_NUMBER: Default issue/PR number for commands

Testing

supersetbot uses Jest with ES modules support:

# Run all tests
npm test

# Run specific test file
npm test src/utils.test.js

# Run with coverage
npm test -- --coverage

Test files follow the *.test.js naming convention and are colocated with source files.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linting
  5. Commit your changes
  6. Push to your fork
  7. Open a Pull Request

Code Style

  • ES modules with import/export syntax
  • ESLint with Airbnb configuration
  • Async/await for asynchronous operations
  • Commander.js for CLI structure

License

Licensed under the Apache License, Version 2.0. See the LICENSE file for details.