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

@lizee/gitflub

v1.0.9

Published

CLI used to merge the gitflow functionalities with the github functionalities

Downloads

5

Readme

gitflub

NPM Version NPM Downloads Install Size

gitflub is a CLI used to merge the gitflow workflow with the github functionalities. Its main purpose is to allow the creation of Pull Requests (PR) when we finish a feature, a hotfix or a bugfix. We have some specifications at Lizee that may interfere with a normal git flow process. You can read a more general documentation about our git workflow and our deployment process here (only for Lizee employees) to help you comprehend everything.

Prerequisites

Yarn global

yarn config set prefix ~/.yarn

Add the install location to your PATH, add the following lines to your .zshrc file (or .bashrc) :

export PATH="$(yarn global bin):$PATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

And restart your terminal.

GitHub CLI

You need to install the GitHub CLI to create the Pull Requests from the command line. You will also need to auth yourself on the GitHub CLI (you can check the documentation or this will be explained if you try to create a PR).

Installation

You can install gitflub with npm or yarn :

yarn global add @lizee/gitflub
npm install -g @lizee/gitflub

gitflub init

This command is used to initialize a repo.

gitflub init [-h] [-d]
  • The -h option is used to display help for the command
  • The -d option is used to set the default names for the git flow branches

gitflub feature

gitflub feature start

This command is used to create a new feature.

gitflub feature start <name> [<base>]
  • The name argument is mandatory, it is the name of the feature, that will be prefixed by the feature prefix set during the initialization.
  • The base argument is optional, it is the branch that will be used to start the feature from (default is develop).

gitflub feature publish

This command is used to push the branch on the remote repo.

gitflub feature publish [<name>]
  • The name argument is optional, it is the name of the feature, that will be prefixed by the feature prefix set during the initialization. If omitted, the current branch will be published.

gitflub feature finish

This command is used to push the branch on the remote repo, and create a Pull Request thanks to the GitHub CLI (you need to be connected to the CLI in order to do that).

gitflub feature finish [<name>] [<base>] [--no-pr]
  • The --no-pr option is used to prevent the creation of a PR and just merge locally (like git flow usually does).
  • The name argument is optional, if omitted the current branch will be merged.
  • The base argument is optional, it is the branch that will be used to merge the feature to (default is develop).

gitflub feature list

This command is used to list the feature branches currently available on your local repo.

gitflub feature list

gitflub bugfix

The gitflub bugfix command works exactly like the feature command, except you replace feature by bugfix. It is used to fix non-urgent bugs because these branches will be merged on develop like features.

gitflub bugfix start <name> [<base>]
gitflub bugfix publish [<name>]
gitflub bugfix finish [<name>] [<base>] [--no-pr]
gitflub bugfix list

gitflub hotfix

gitflub hotfix start

This command is used to create a new hotfix.

gitflub hotfix start <version> [<base>]
  • The version argument is mandatory, it is the version of the hotfix, that will be prefixed by the hotfix prefix set during the initialization.
  • The base argument is optional, it is the branch that will be used to start the hotfix from (default is master).

gitflub hotfix publish

This command is used to push the branch on the remote repo.

gitflub hotfix publish [<version>]
  • The version argument is optional, it is the version of the hotfix, that will be prefixed by the hotfix prefix set during the initialization. If omitted, the current branch will be published.

gitflub hotfix finish

This command is used to push the branch on the remote repo, and create a Pull Request thanks to the GitHub CLI (you need to be connected to the CLI in order to do that).

gitflub hotfix finish [<version>] [<base>] [--no-pr]
  • The --no-pr option is used to prevent the creation of a PR and just merge locally (like git flow usually does).
  • The version argument is optional, if omitted the current branch will be merged.
  • The base argument is optional, it is the branch that will be used to merge the hotfix to (default is master).

For the RP team, this will create another PR : from the hotfix branch to the production branch (only if the production branch exists).

gitflub hotfix list

This command is used to list the hotfix branches currently available on your local repo.

gitflub hotfix list

gitflub release

gitflub release start

This command is used to create a new release.

gitflub release start <version> [<base>]
  • The version argument is mandatory, it is the version of the release, that will be prefixed by the release prefix set during the initialization.
  • The base argument is optional, it is the branch that will be used to start the release from (default is develop).

gitflub release publish

This command is used to push the branch on the remote repo.

gitflub release publish [<version>]
  • The version argument is not mandatory, it is the version of the release, that will be prefixed by the release prefix set during the initialization. If omitted, the current branch will be published.

gitflub release finish

This command is used to merge the release to the master and the develop branches. It does not create PRs like the other commands (feature, hotfix, bugfix) !

gitflub release finish [<version>] [<base>] [--pr]
  • The --pr option is used to ask explicitly the creation of a PR and not just merge locally (like git flow usually does).
  • The version argument is optional, if omitted the current branch will be merged.
  • The base argument is optional, it is the branch that will be used to merge the release to (default is develop).

For the RP team, they will handle the PR master -> production after because they need to test on preprod first (deployed when master is pushed).

gitflub release list

This command is used to list the release branches currently available on your local repo.

gitflub release list

Contribution

To help developing this CLI, you can download the code on Github and update it. To test your changes, you can do yarn linkpkg that will link the gitflub command with the current code, and then you can use gitflub like you used to. Once you are done, you can just do a yarn unlink in the repository to cancel the link.