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

ftv-mergeup

v2.0.1

Published

Automates creating a merge request and notifying teammates

Downloads

9

Readme

FTV-mergeUp tool

This node module allows you to handle all the merge request workflow.

Params :

  • '-t, --title', merge request title (ex: 'Bug fixes')
  • '-P, --upstreamProject', upstream project name (ex: team/project)
  • '-b, --localBranch', local branch name (ex: bugfix)
  • '-B, --upstreamBranch', upstream branch name (ex: dev)
  • '-s, --silent', desactivate hipChat notification

The different steps are :

  • Get config params (upstreamProject, localBranch, upstreamBranch) from your git context. All these params can be overwritten when you launch the command.
  • Call the GitLab API to search for an opened merge request with this title and corresponding to all the given params
  • Create or update the merge request depending on the previous call's answer You can update a merge request by simply running mergeUp, the title is mandatory only for creation and in update if specified
  • Notify to the HipChat room (defined in config.json) with a custom message depending on the case

Subcommands

Init

mergeUp init to set up your conf

  • You can find your gitlabPrivateToken on the account tab of your profile page on GitLab.
  • The gitDefaultUpstreamBranch is often devbut we can't force it for every project as the default value

Verify

mergeUp verify <iid> is used to fetch the merge request branch and create a local environment in order to test it.

Actions :

  • '--validate', accept the merge request
  • '--refuse', add a refuse comment on GitLab
  • '--clean', remove environment

The verify process steps are :

  • Fetch all merge request data
  • Create a local branch based on the one in the pending merge request
  • Checkout on it
  • Done !

You can now launch tests or try whatever you want with the code.

--validate

mergeUp verify <iid> --validate allow you to accept directly from the terminal, after verifying it, the merge request on GitLab and notify the room about it.

--refuse

mergeUp verify <iid> --refuse <message> post the message the as a comment and add a prefix [To Fix] on the title. The room is also notified.

--clean

mergeUp verify [iid] --clean clean the environment created by verify for the given merge request (branch, remote etc.). If no iid is given remove all environments instead.

Fix

mergeUp fix is an override command of the native one, used when the merge request has been refused. It does the same process but have a different notification message and remove the [To Fix] prefix on the merge request title