Code Monkey home page Code Monkey logo

gr's Introduction

gr

Gerrit's command line tool

It's like gh (GitHub's CLI) but for Gerrit

gr screenshot

Installation

pip3 install gr-cli

Auth

Authentication done by HTTP credentials: https://gerrit.cloudlinux.com/settings/#HTTPCredentials

At first launch, gr will ask for username and password that you generated at gerrit and write to ~/.config/gr/conf.py. That's plain python file and you can use it however you want, e.g.:

import os

pswd = os.popen("pass show cl/gr-cli | head -n 1").read().strip()
user = os.popen("pass show cl/gr-cli | grep username").read().strip().split(" ")[-1]

AUTH = (user, pswd)

Usage

> gr ch --help
Usage: main.py ch [OPTIONS] COMMAND [ARGS]...

  Manage pull requests

Options:
  --help  Show this message and exit.

Commands:
  abandon        Abandon change by ID
  add-reviewers  Abandon change by ID
  checkout       Checkout change to new branch
  comment        Comment change by ID
  comments       List change comments by ID
  create         Create change from current branch
  diff           Show diff by change ID
  list           List all changes
  merge          Submit change by ID
  rebase         Rebase change to target branch by ID
  review         Review change by ID
  status         List all CHanges
  view           View change details

Example

git checkout -b test-gr
echo Changes > file.txt
git add file.txt
git commit -m 'New very important patch'

# push current branch to remote and create PR
gr ch create

gr ch list

gr ch merge [change-id]

gr's People

Contributors

paul-nameless avatar

Stargazers

Ari Archer avatar

Watchers

James Cloos avatar  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.