• This repository has been archived on 21/Apr/2021
  • Stars
    star
    254
  • Rank 160,264 (Top 4 %)
  • Language
    Emacs Lisp
  • Created almost 13 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Magit plugin for dealing with GitHub pull requests

magit-gh-pulls

magit-gh-pulls is a Magit extension that allows you to conveniently manipulate Githubโ€™s pull requests from Emacs.

Installation

magit-gh-pulls is available on MELPA. To install it do the following:

M-x package-install RET magit-gh-pulls RET

Now that the package is installed you have to put the following code to your init.el:

(require 'magit-gh-pulls)
(add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls)

Usage

Existing Pull Requests

In magit-status window press # g to refresh the list of pull requests. magit-gh-pulls automatically infers credentials from the URL of the repository. You can also explicitly specify which Github project to fetch PRs from by executing this in your shell:

git config magit.gh-pulls-repo <user>/<repo> # your github repository

If there are some PRs available, a new section will appear called Pull Requests. Each item in this section has the following form:

[pull-request-number@branch-name] Pull request name

Highlighting the desired PR and pressing # f will fetch the commits associated with the PR. You can then press TAB to reveal the list of commits which comes with this PR. They are real git commits that you can view, apply, cherry-pick etc.

From this point magit-gh-pulls offers you two options:

  • press # b on the PR to create a topic branch for this PR. After testing the PR you can merge it back into your branch using Magit.
  • press # m to merge the PR on top of the currently checked out branch. This is convenient if pull request can be merged by fast-forwarding and no testing is needed (or you can test from your branch directly). A nice benefit of this approach over merging from Github interface is that in case of FF no merge commit is produced by default, so history stays nice and linear. If you still want the merge commit, enable -c option while in magit-gh-pulls menu.
Creating Pull Requests

In magit-status press # c to create a new pull request. You will be asked for the base commit and the head commit for the pull-request. A PR editor will open where you can customize the title and the body of the pull request. Finally, pressing C-c C-c will connect to GitHub to create the pull request. If -w option is enabled, the new pull request will be opened on github.com in the browser.

Hint: install markdown-mode to automatically use it in PR editor.

The base and head of the pull request must already be present on Github. If you havenโ€™t yet pushed your local commits, magit-gh-pulls will suggest to push them first.

Miscellaneous
  • # o Will open the selected a pull request in your default browser on GitHub.
  • j q will jump to the Pull Requests section in the magit-status window.

License

Copyright ยฉ 2011-2016 Yann Hodique, Alexander Yakushev and contributors. Distributed under the GNU General Public License ver. 2. See the header of the source file.

More Repositories

1

gh.el

GitHub API library for Emacs
Emacs Lisp
270
star
2

pcache

persistent caching for Emacs
Emacs Lisp
75
star
3

org-s5

S5 presentations from org-mode files
Emacs Lisp
57
star
4

logito

tiny logging framework for Emacs
Emacs Lisp
31
star
5

mocker.el

a simple mocking framework for Emacs
Emacs Lisp
30
star
6

cifs_k8s_plugin

Kubernetes cifs volume plugin
Shell
24
star
7

go-emacs

experimental Emacs modules in Go
C
24
star
8

topgit

TopGit - A different patch queue manager
Shell
13
star
9

vmw.vco

Python bindings for VMware Orchestrator
Python
13
star
10

dotemacs

my emacs config
Emacs Lisp
12
star
11

codex

CL-like namespaces for Elisp
Emacs Lisp
10
star
12

marshal.el

Emacs Lisp
9
star
13

dotfiles

My collection of dotfiles (emacs, screen, zsh, ...)
Emacs Lisp
9
star
14

tabulated-list.el

generic major mode for tabulated lists. (emacs 24 backport)
Emacs Lisp
9
star
15

el-x

Emacs lisp extensions
Emacs Lisp
9
star
16

erbot

ErBot (cvs import from savannah)
Emacs Lisp
8
star
17

globalplatform

C
6
star
18

vsce-publish-action

Dockerfile
5
star
19

twistthemilk

Twist the Milk, a python/twisted API for Remember the Milk
Python
4
star
20

virtualenv-emacs

some tools that might be useful for developing emacs extensions
Emacs Lisp
4
star
21

foundation-toolkit

Foundation ToolKit written with Greasemonkey/Gears
Python
4
star
22

dw-bibtex

Dokuwiki plugin for BibTeX support
PHP
4
star
23

octopus

Chat server written in C++/Qt
C++
3
star
24

emacs-ci

Continous Integration proposal for Emacs packages
Python
2
star
25

awesome-configs

personal fork of http://git.sysphere.org/awesome-configs
Lua
2
star
26

docker-coreos-autofs

autofs installer for coreos
C
2
star
27

lisposd

libxosd bindings for guile
C
2
star
28

gh-token

Github OAuth token helper
Python
2
star
29

vmw.zsi

Python
2
star
30

go-inotify

Go
2
star
31

lispy

Small Emacs client for <Mtp> Chat !
Emacs Lisp
2
star
32

qnet

client for octopus
C++
1
star
33

sigma.github.com

github homepage
1
star
34

go-circuit

Some helpers for managing the Novation Circuit groovebox
Go
1
star
35

cyvix

Cython-based wrapper for VMware VIX
C
1
star
36

simple-amb

reimplementation of polvi/simple-amb
Shell
1
star
37

pywebsvcs

personal hacks of the pywebsvcs project
Python
1
star
38

vco-gae

Python
1
star
39

dynamic-etcd-amb

reimplementation of polvi/synamic-etcd-amb (needs privileged container)
Shell
1
star
40

docker-aiccu

Shell
1
star
41

pysigbot

a Google Appengine Jabber/Wave bot that pilots 3rd party services
Python
1
star