Giter VIP home page Giter VIP logo

mergify's Introduction

Mergify

A very simple cli to check merge requests on Gitlab.

npm Build Status Coverage Status Known Vulnerabilities

Install

yarn global add @pindakaasman/mergify

Usage

Just grab up the help menu by using mergify --help and you will be presented with the help dialog.

  Usage: mergify [options]

  Options:

    -V, --version   output the version number
    -a --assigned   Get all open merge request assigned to you
    -s --submitted  Get all open merge request submitted to you
    -c --configure  Setup or update required config
    -v --verify     Verify your config is correct
    -h, --help      output usage information

Configure

To complete setup you will need to run the configure command to provide access to the Gitlab API.

mergify --configure

Finding your userid

You Gitlab userid is not your username!

You can find your userid by going to the profile page. It will be located on the right.

Example of userid

Getting a Gitlab access token

Complete documentation on how to get a private token can be found at Gitlab.

You will need to go to you access tokens page and provide at least api access.

See Screenshot for an example of access token creation :

screen shot 2018-04-20 at 1 09 40 pm

mergify's People

Contributors

dependabot[bot] avatar jlengrand avatar ramongebben avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gitter-badger

mergify's Issues

No default command

Once configured, if I simply run mergify, nothing happens.
It would be great to have a default.

Add some merge review utilities

Maybe a tad out of scope at the moment, but it would be nice to have some small utils to actually review merge requests.

For example, one thing that I usually do when reviewing is git reset HEAD^ or using the commit hash of the first commit in the MR when there are several commits (and I have to do a git log and it's sometimes annoying). That way I can see all the changes inline in my IDE for instance, which is better IMO than looking at diffs and truncated files on Gitlab.

Something to think about. The other enhancements proposed until now should have priority I think.

Support for several gitlab instances

I actually use 3 different gitlab instances :

  • .com for open source / personal work
  • local instance at my day job
  • local instance at another job

It would be great to be able to select profiles, or at least use several instances at once in Mergify.

Right now I can only see the merge requests for one instance :).

Confusion between commands and flags

At the moment, the project uses flags(options) to issues commands mergify -v, ...

Flags should be more used for options (for example to disable certificates verification, . . .).

Commands seem more relevant for things like submitted / review, . . .

For exampple, something like

$ mergify configure -s sounds more logical than mergify -sc.

In addition, commands could have autocompletion.

Configure failing if no .config file already present

If I try to configure mergify, I am constantly getting:

screen shot 2018-04-19 at 9 27 32 am

I looked into the doFetch class and it looks like both private_token and domain_name are not known to the function.

If I understand the code correctly, I think I know what is happening

Basically, we are trying to read the config before it is written, which explains why I am getting errors.

Show pipeline status of jobs tied to each merge requests

The message could look something like this:
The addition here is the passed status between the status of the MR and if it doesn't have conflicts.

[open|passed|can be merged]
  !82: Integration feedback into design
    Assignee: alxbrg
    Author: RamonGebben
    Source: foobar_design
    Target: master

    https://gitlab.com/Sensorfact/frontend/nucleus/merge_requests/82

Mergify not working behind a proxy

Not something you might want to fix now, but I just wanted to let you know that mergify does not work if you are behind a proxy at the moment :).
(Even with HTTP_PROXY and other variables set).

Verify if token and userID are valid after `configure`

Right now token that don't have API access get accepted and the program crashes.

  • Program should not crash on Unauthorised but should show nice error
  • README should be updated explaining that private token should have API access
  • Add --verify command to verify at any time
  • Maybe fetch username and let user confirm that this is her username.

Add "approved" command

To see all merge requests authored by you and which are approved when approval status is a thing. When it's not we'll have to look for the "๐Ÿ‘ "

Add config/init command

Because the installation requires some skippable steps I'd like to add a --configure command.
This command would prompt the user to input:

  • Gitlab URL
  • Private token
  • User ID
  • other stuff we might need in the future

I think creating a .config when it doesn't exist would suffice and JSON should be the format.

Configure fails when running against an instance with a self-signed certificate

This is what I get when I try to configure my work gitlab. I get certificate issues

[jlengrand@rn07t1c18:~/IdeaProjects/mergify]$ node index.js -c
? What is your Gitlab User ID? 6011
? What private token shall we use? [hidden]
? On what domain is your Gitlab instance? gitlab.company.net

๐Ÿ™€  Oh no, could not complete verify. Please review your config
{ FetchError: request to https://gitlab.company.net/api/v4/users/6011 failed, reason: unable to verify the first certificate
    at ClientRequest.<anonymous> (/Users/jlengrand/IdeaProjects/mergify/node_modules/node-fetch/lib/index.js:1393:11)
    at ClientRequest.emit (events.js:180:13)
    at TLSSocket.socketErrorListener (_http_client.js:395:9)
    at TLSSocket.emit (events.js:180:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:178:19)
  message: 'request to https://gitlab.company.net/api/v4/users/6011 failed, reason: unable to verify the first certificate',
  type: 'system',
  errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }

So it looks like at the moment I can't use mergify at work. I'll look into that too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.