git 我可以从命令行向 github 添加问题吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11002908/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:03:31  来源:igfitidea点击:

Can I add issues to github from the command line?

gitgithubcommand-line-interfacegithub-issues

提问by Jonathan

I'm new to git and I'd like to be able to map plans and progress for my project through github.

我是 git 的新手,我希望能够通过 github 映射我的项目的计划和进度。

The problem is, that requires lots of clicking around with a browser on github.com, and I'd like to be able to automate the task somewhat by using a command line program.

问题是,这需要使用 github.com 上的浏览​​器进行大量点击,我希望能够通过使用命令行程序来自动执行该任务。

Is there a command line interface for github?

github 有命令行界面吗?

采纳答案by Norman Joyner

You could check out this clifor the Github issues API. Note this is specific to Github Issues only.

您可以查看此 cli以了解 Github 问题 API。请注意,这仅针对 Github 问题。

Hope this helps.

希望这可以帮助。

[edit] The original answer mentioned thisapplication which doesn't function anymore and recommends ghi.

[编辑] 最初的答案提到了这个不再起作用的应用程序并推荐ghi.

回答by bdukes

There's a ghigemthat you can use to manage issues.

有一个ghi宝石,你可以用它来管理的问题。

The most commonly used ghi commands are:
   list        List your issues (or a repository's)
   show        Show an issue's details
   open        Open (or reopen) an issue
   close       Close an issue
   edit        Modify an existing issue
   comment     Leave a comment on an issue
   label       Create, list, modify, or delete labels
   assign      Assign an issue to yourself (or someone else)
   milestone   Manage project milestones
The most commonly used ghi commands are:
   list        List your issues (or a repository's)
   show        Show an issue's details
   open        Open (or reopen) an issue
   close       Close an issue
   edit        Modify an existing issue
   comment     Leave a comment on an issue
   label       Create, list, modify, or delete labels
   assign      Assign an issue to yourself (or someone else)
   milestone   Manage project milestones

回答by Xavier Guihot

With Github's new official CLI(command line interface):

使用 Github 新的官方CLI(命令行界面):

gh issue create --title "How to create an issue?" --body "I need a github CLI"

See additional details and optionsand installation instructions.

请参阅其他详细信息和选项以及安装说明

回答by Piotr Murach

There is a github_cligem that I'm working on that provides command line access to the entire GitHub API v3. Please give it a try and report any issue/thoughts/feature requests.

我正在开发一个github_cligem,它提供对整个 GitHub API v3 的命令行访问。请尝试并报告任何问题/想法/功能请求。

回答by forloop

NodeGH- Github command line tools. Let's you create new issue, comment, open or close. You can find all the commands available at their Github repo.

NodeGH- Github 命令行工具。让您创建新问题、评论、打开或关闭。你可以在他们的Github repo 中找到所有可用的命令。

回答by alpha_989

You have 3 options:

您有 3 个选择:

  1. Use the official command line interface supported by github:

    Tutorial: http://pythonhosted.org/hub/

    Github repo: https://github.com/github/hub(~12k stars)

  2. Use the NodeH interface:

    Tutorial: http://nodegh.io/

    Github repo: https://github.com/node-gh/gh

  3. Use the ghi interface:

    Tutorial and Github repo: https://github.com/stephencelis/ghi/

  1. 使用github支持的官方命令行界面:

    教程:http: //pythonhosted.org/hub/

    Github 存储库:https: //github.com/github/hub(~12k 星)

  2. 使用 NodeH 接口

    教程:http: //nodegh.io/

    Github 仓库:https: //github.com/node-gh/gh

  3. 使用ghi接口:

    教程和 Github 仓库:https: //github.com/stephencelis/ghi/

All 3 look cool. The hubapp looks like it has the most stars and is officially supported by github. So its most likely to be maintained for the long term. So, if I were looking for a solution that would be supported for a long term, I would go with option#1: hub

所有 3 看起来都很酷。该hub应用程序看起来拥有最多的星星,并得到了 github 的官方支持。所以它最有可能长期维护。所以,如果我正在寻找一个可以长期支持的解决方案,我会选择选项#1:hub