¿Puedes emitir solicitudes de extracción desde la línea de comandos en GitHub?


Parece que tienes que interactuar con github.com para iniciar una solicitud de extracción. ¿Es así?

Author: Mateusz Piotrowski, 2010-10-28

7 answers

ACTUALIZACIÓN : El comando hub ahora es un proyecto oficial de github y también admite la creación de pull requests

ORIGINAL :

Parece una cosa particularmente útil para agregar al comando hub: http://github.com/defunkt/hub o la gema github: http://github.com/defunkt/github-gem

Sugiero presentar un problema con esos proyectos que lo solicitan. Los chicos de Github son muy receptivos.

 85
Author: kanaka,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-28 15:35:48

Git ahora viene con un subcomando 'git request-pull' [-p] <start> <url> [<end>]

Puedes ver los documentos aquí

Puede encontrar esto útil, pero no es exactamente lo mismo que la característica de GitHub.

 47
Author: Zensaburou,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-05-24 01:08:47

Con el contenedor de línea de comandos Hub puede vincularlo a git y luego puede hacer git pull-request

De la página de manual de hub:

   git pull-request [-f] [TITLE|-i ISSUE|ISSUE-URL] [-b BASE] [-h HEAD]
          Opens a pull request on GitHub for the project that the "origin" remote points to. The default head of the pull request is the current branch. Both base and head of the pull request can be explicitly given in one  of  the  following  formats:  "branch",  "owner:branch",
          "owner/repo:branch". This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote. To skip this check, use -f.

          If TITLE is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message.

          If instead of normal TITLE an issue number is given with -i, the pull request will be attached to an existing GitHub issue. Alternatively, instead of title you can paste a full URL to an issue on GitHub.
 26
Author: Flov,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-12 07:44:37

Un hombre busca como...

man git | grep pull | grep request

Da

git request-pull <start> <url> [<end>]

Pero, a pesar del nombre, no estoy seguro de que esto haga lo que quieres.

 17
Author: hobs,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-10-03 21:19:33

Terminé haciendo mi propio, me parece que funciona mejor las otras soluciones que estaban alrededor.

Https://npmjs.org/package/pullr

 5
Author: samccone,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-03-17 23:46:09

Recientemente he creado una herramienta que hace exactamente lo que quieres:

Https://github.com/jd/git-pull-request

Automatiza todo en un solo comando, bifurcando el repositorio, empujando el PR, etc. También es compatible con la actualización de la PR si necesita editar/arreglarlo!

 3
Author: jd_,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-20 08:33:33

He usado esta herramienta antes, aunque parece que primero debe haber un problema abierto, es súper útil y realmente agiliza el flujo de trabajo si usa el seguimiento de problemas de github. git open-pull y luego se envía una solicitud de extracción desde cualquier rama en la que se encuentre o seleccione. https://github.com/jehiah/git-open-pull

EDITAR: Parece que puede crear problemas sobre la marcha, por lo que esta herramienta es una buena solución.

 0
Author: Andruf,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-05-04 15:12:29