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 🙏

© 2024 – Pkg Stats / Ryan Hefner

multipull

v2.2.19

Published

Pull multiple git repositories

Downloads

96

Readme

multipull - Manage multiple git repositories

Install

npm i -g multipull

Configure

Add a .multipullrc file in your home directory containing a JSON with the following keys :

  • root : the absolute path where your repositories are located
  • repos : an array of repositories names (will use every folder that have a .git folder in root if not specified)
  • branches : the default branch in the repository if not main

Example:

{
  "root": "/your/workspace/root/path",
  "collaborators": "your,comma,separated,list,of,collaborators",
  "repos": ["an", "array", "of", "repositories", "in", "root"],
  "branches": {
    "my-repo1": "my-default-branch"
  },
  "issueTracker": {
    "issueIdPattern": "[0-9]{9}",
    "urlPrefix": "https://www.pivotaltracker.com/story/show/"
  }
}

Usage

Every command will always display a table summarizing the status at the end.

Any cell that is equal to the default will contain an empty value, and any line that only contains default values will be omitted.

Parameter | Description ------------ | ------------- Repo | Repository's name Current | Current branch (if different from default one) Tracking | Tracking branch (if different from default one) Pushed | When using multipush: displays a confirmation or an reason for not doing so Merged | When using multimerge: displays a confirmation or an reason for not doing so Pull Request | When using multistatus --pr: displays the link of an existing pull request on the current branch Mergeable | Indicate GitHub's mergeable status (i.e no conflict) Build | When using multistatus --ci: displays the build status on this branch (based on GitHub checks) Reviews | Indicate the number of reviews and comment on GitHub's pull request S | Number of stashes ?? | Number of untracked files M | Number of modified files D | Number of deleted files A | Number of added files C | Number of copied files Files | When using multipull indicate the number of updated files Changes | When using multipull indicate the number of changed lines Insertions | When using multipull indicate the number of inserted lines Deletions | When using multipull indicate the number of deleted lines Error | Error message E | Elapsed time

Note the Files section may contain:

  • a (n) suffix is added when native files are updated
  • a (p) suffix is added when a package.json file is updated

Commands overview

Command | Description ------------- | ------------- multicheckout | git checkout <branch> multiexec | run command in each repos multimerge | merge pull request multipr | create pull request multipull | pull from remote branch multipush | push to remote branch multirebase | rebase from remote branch multistatus | summarize repositories' status

Commands description

multicheckout

By default, multicheckout [branch] will run

  • git checkout branch if branch is provided
  • git checkout defaultRepositoryBranch otherwise (where defaultRepositoryBranch is provided in the configuration file)

in all the repositories specified in the configuration.

Notes:

  • if the repository doesn't have such a branch, nothing will happen ;
  • if a conflict/error happen during the checkout in one repository, the checkout of the branch in this repostory will be aborted.

multiexec

multiexec --exec=<command> will run the same command in each repository

multimerge

When on a branch different from the default branch, multimerge will merge any existing pull-request found related to this branch.

multipr

multipr will attempt to create a pull request in all the repositories that are on the same branch as the current repository.

Note that it will abort if the current branch is the default one (eg. main).

Parameter reviewers

A comma separated list of GitHub user ids can be provided to be added at the list of reviewers

eg.: multipr --reviewers=John,Jack

Note: a GitHub team can be assigned by prefixing its slug with team/:

eg.: multipr --reviewers=team/justice-league

Parameter collaborators

A comma separated list of GitHub user ids can be provided to be added at the list of collaborators. When creating a pull request, two ids will be picked randomly and added at the list of reviewers.

eg.: multipr --collaborators=John,Jack

Parameter m

Use this parameter to edit the pull request description

eg.: multipr --m

Parameter approve

Submit an APPROVE review on the current pull request.

multipull

Execute git pull all repositories.

eg. multipull

Notes:

  • will attempt to rebase if need be;
  • abort pulling of a remote branch if it would produce conflicts.

multipush

Execute git push in all repositories.

eg. multipush

Parameter force

Execute git push --force in all repositories.

eg. multipush --force

Notes:

  • will refuse to force-push on default branch;
  • will call git with --set-upstream origin if the current tracking branch is not set.

multirebase

Execute git rebase <orgin branch> in all repositories where the branch is different from the default one.

multistatus

Basic

Displays the status of the current repositories

eg. multistatus

With Pull Request (--pr)

On the repositories that are on a branch different from the default branch, and have an open Github pull request, multistatus --pr will output:

  • the pull request's mergability status (wether it conflicts with the destination branch) ;
  • Github's "checks" status ;
  • the number of "approved", "request for changes" and "comments".

Only Pull Requests URLs (--pr --list)

On the repositories that are on a branch different from the default branch, and have an open Github pull request, multistatus --pr --list will output the urls of each PRs.

Open Pull Requests URLs (--pr --open)

On the repositories that are on a branch different from the default branch, and have an open Github pull request, multistatus --pr --open will open the PRs URLs in the default system browser.

With Continous Integration Report (--ci)

On the repositories that are on a branch different from the default branch, multistatus --ci will output Github's "checks" status