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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pull-request

v3.0.0

Published

Fork, Commit and Pull Request via the GitHub API

Downloads

1,303

Readme

pull-request

All the tools you need to commit to GitHub repos via the API and create pull requests

Supports:

  • exists: check if a repository already exists so you don't try and fork again
  • fork: fork a repository so you get a copy to edit
  • branch: create a new branch in a repository to edit
  • commit: commit changes to files within a branch
  • pull: create a pull request to have a human merge those changes

Build Status Dependency Status NPM version

Installation

npm install pull-request

API

pr.exists(user, repo, options, callback)

Returns true if github.com/:user/:repo exists, and false if requesting that url returns an error.

pr.fork(user, repo, options, callback)

Forks the repo github.com/:user/:repo to the authenticated user and waits until the fork operation completes. To fork to an organization, just add an organization string to the options object.

N.B. forking will currently appear successful even if the target repo already exists. This functionality should not be relied upon and is subject to change without necessarily updating the MAJOR version.

options:

See github-basic and note that auth is required

pr.branch(user, repo, from, to, options, callback)

Creates a new branch in github.com/:user/:repo using from as the source branch and to as the new branch name.

pr.commit(user, repo, commit, options, callback)

Commits a set of changes to github.com/:user/:repo. It only supports updating text files.

commit:

An object with:

property | type | default | description ---------|---------------------|--------------|---------------------------- branch | String | 'master' | The branch to commit to message | String | required | The commit message updates | Array<FileUpdate> | required | The actual changes to make

FileUpdate:

An object with:

property | type | default | description ---------|----------|--------------|---------------------------- path | String | required | The file path within the repo (e.g. test/index.js) content | String | required | The new content of the file mode | String | '100644' | The mode to commit the file with (you probably don't want to change this) type | String | 'blob' | The type of entry to create (you probably don't want to change this)

options:

See github-basic and note that auth is required

Additionally the force object defaults to false and will force push the change if set to true. You almost certainly don't want to do this.

pr.pull(from, to, message, options, callback)

Creates a pull request from from to to.

from:

An object with:

property | type | default | description ---------|----------|--------------|---------------------------- user | String | required | The source user repo | String | required | The source repository branch | String | 'master' | The source branch

to:

An object with:

property | type | default | description ---------|----------|--------------|---------------------------- user | String | required | The destination user repo | String | required | The destination repository branch | String | 'master' | The destination branch

message:

Either:

property | type | default | description ---------|----------|--------------|---------------------------- title | String | required | The title of the pull request body | String | '' | The body of the pull request

or:

property | type | default | description ---------|----------|--------------|---------------------------- issue | Number | required | An issue number to convert into a pull request

options:

See github-basic and note that auth is required

Promises

All APIs return promises if callback is ommitted.

License

MIT