Coder Social home page Coder Social logo

one2merge's Introduction

one2merge Build Status ReportCard

One2merge is a tool for running easy code reviews in GitHub. The original idea came from Christof Damian's plus-pull. During Gopher Gala 2016 I decided to join with a rewrite of this in Go.

Installation

go get github.com/ifosch/one2merge

Configuration

For using One2merge, you will need to get a GitHub API token. One2merge uses a configuration file, by default located at $HOME/.one2merge.yaml. If you want to set this file to other location, name, or accepted format, you can use the option --config with an argument specifying the filename. Accepted formats for the configuration file are:

An example YAML file would have this format:

authorization:
   token: MYNICEANDSHINYGITHUBAPITOKEN
repositories:
   mycoolapp:
       username: cooldeveloper
       status: true
       required: 3
       allowed:
        - reviewer1
        - reviewer2
        - reviewern
   myevencoolapi:
       username: cooldeveloper
       status: true
       required: 2
       allowed:
        - reviewer1
        - reviewern

where:

  • authorization contains:
    • token: corresponds to user's GitHub API token. This key can be also given throught O2M_TOKEN environment variable.
  • repositories consists on a set of subsets defined by the repository name in GitHub, and containing a set of keys with different meanings:
    • username: Would correspond to the username holding the repository to be checked.
    • status: Defining whether the repository is, or is not, enabled for checking.
    • required: Corresponds to the number of approvals required to go on with the merge, in case nothing else blocks it.
    • allowed: Are the login names of the reviewers.

You can get One2merge's configuration by invoking the command configure:

  $ one2merge configure
  Using config file: /home/user/.one2merge.yaml
  - cooldeveloper / mycoolapp ENABLED +1:3
  - cooldeveloper / myevencoolapi ENABLED +1:2

Usage

You can use One2merge basic functionality by simply invoking it directly:

  $ one2merge
  Using config file: /home/user/.one2merge.yaml
  + cooldeveloper/mycoolapp
  + cooldeveloper/mycoolapi
    - 47 NOP   (Changes CI badge location on README.md) score 1 of 3 required

Where it first reports the configuration file used, if any. Then, it prints a list of the repos, with a list of the PRs pending to merge. For each PR, it shows:

  • Pull request identifier
  • Operation done, i.d. NOP if it doesn't satisfies requirements to be done, MERGED, if it was merged.
  • Pull Request title, between brackets.
  • Score from the approvals in the pull request comments.
  • How many approvals were required.

one2merge's People

Contributors

ifosch avatar alvarocabanas avatar

Watchers

James Cloos avatar  avatar

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.