Skip to content

Commit

Permalink
Merge pull request #9252 from pllim/rm-issue2pr
Browse files Browse the repository at this point in the history
DOC: Remove issue2pr section
  • Loading branch information
pllim authored and bsipocz committed Sep 26, 2019
1 parent 777b0e3 commit 57a5a95
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions docs/development/workflow/additional_git_topics.rst
Expand Up @@ -279,44 +279,6 @@ and the history looks now like this::
If it went wrong, recovery is again possible as explained :ref:`above
<recovering-from-mess-up>`.

Converting a GitHub issue to a pull request
===========================================

Sometimes you have a branch in your own GitHub repository designed to
fix one particular issue. If that issue is listed on GitHub, a natural
way to address it is to convert the issue to a pull request by
attaching code containing the fix for the issue. This can currently only be
done using the GitHub API (there's no button or anything on the web
site that does it, at least as of 2/6/2012). There are two options to do this,
both of which only work if you own the repository or have the ability to commit
directly to it (for Astropy, that means being an Astropy maintainer):

* You can use the script at https://gist.github.com/1750715, which will
do this for you automatically |emdash| just download the script and run it as
a python command-line script, using the ``python issue2pr.py --help``
option to determine the precise usage.

* You can use the ``hub`` command-line utility provided `here
<https://github.com/github/hub>`_ by GitHub. Once installed, you can
attach a branch to a pull request by doing::

hub pull-request -i <ID> -b astropy:master -h <USER>:<BRANCH>

where ``<ID>`` is the ID of the issue, ``<USER>`` is the username, and
``<BRANCH>`` is the name of the branch you want to attach to the
issue. For example::

hub pull-request -i 42 -b astropy:master -h galahad:feature

will attach the ``feature`` branch from ``galahad``'s Astropy
repository to issue 42.

The ``hub`` command can do a lot more to interact with GitHub, so be
sure to read their documentation. For example, you can fetch all
branches of a repository for a given user by doing::

hub fetch <USER>

.. _merge-commits-and-cherry-picks:

Merge commits and cherry picks
Expand Down

0 comments on commit 57a5a95

Please sign in to comment.