Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Remove issue2pr section #9252

Merged
merged 1 commit into from Sep 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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://github.com/astropy/astropy-procedures/blob/master/issue2pr.py, 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