Usage

The hubugs script is the main workhorse of hubugs.

Let’s start with some basic examples:

▶ hubugs list  # List the open bugs for the current project
Id Title
 5 Handle some GitHub markdown extensions [feature]
 6 Sphinx documentation tree [task]
 7 Support per project templates [feature]

3 open bugs found

▶ hubugs search markdown  # Search for bugs matching markdown
Id Title
 5 Handle some GitHub markdown extensions [feature]

1 open bug found matching markdown

▶ hubugs show 6  # Show bug number 6
          Id: 6
       Title: Sphinx documentation tree
      Labels: task
     Created: yesterday by JNRowe
     Updated: yesterday
       State: open
    Comments: 0
Pull request: No

This project deserves some real user documentation, not just a few notes in
`README.rst`.

▶ hubugs comment 6  # Comment on bug 6 using your editor

▶ hubugs comment -m"New comment." 6  # Add comment from command line

Options

--version

show program’s version number and exit

-h, --help

show program’s help message and exit

--pager <pager>

pass output through a pager

--no-pager

do not pass output through pager

-p <project>, --project=<project>

GitHub project to operate on

-u <url>, --host-url=<url>

host to connect to, for GitHub Enterprise support

Note

You can set a default value for the --pager and --host-url options by defining hubugs.pager or hubugs.host-url respectively in your git configuration files. Both global and project local settings are supported, see git-config(1) for more information.

Commands

setup - Generate a new GitHub access token

hubugs.py setup [-h] [--local]
--local

set access token for local repository only

list - List bugs for a project

hubugs list [-h] [-s {open,closed,all}] [-l label]
    [-o {number,updated}]
-s <state>, --state=<state>

state of bugs to operate on

-l <label>, --label=<label>

list bugs with specified label

-o <order>, --order=<order>

sort order for listing bugs

-p <number>, --page <number>

page number

-r, --pull-requests

list only pull requests

search - Search bugs reports in a project

hubugs search [-h] [-s {open,closed,all}]
    [-o {number,updated}]
    term
-s <state>, --state=<state>

state of bugs to operate on

-o <order>, --order=<order>

sort order for listing bugs

show - Show specific bug(s) from a project

hubugs show [-h] [-f] [-p] bugs [bugs …]
-f, --full

show bug including comments

-p, --patch

display patches for pull requests

-o, --patch-only

display only the patch content of pull requests

-b, --browse

open bug in web browser

open - Open a new bug in a project

hubugs open [-h] [-a label] [--stdin] [title] [body]
-a label, --add label

add label to issue

--stdin

read message from standard input

comment - Comment on an existing bug in a project

hubugs comment [-h] [--stdin] [-m MESSAGE] bugs [bugs …]
--stdin

read message from standard input

-m <text>, --message=<text>

comment text

edit - Edit an existing bug in a project

hubugs edit [-h] [--stdin] [title] [body] bugs [bugs …]
--stdin

read message from standard input

close - Close an existing bug in a project

hubugs close [-h] [--stdin] [-m MESSAGE] bugs [bugs …]
--stdin

read message from standard input

-m <text>, --message=<text>

comment text

reopen - Reopen a previously closed bug in a project

reopen [-h] [--stdin] [-m MESSAGE] bugs [bugs …]
--stdin

read message from standard input

-m <text>, --message=<text>

comment text

label - Perform labelling actions on an existing bug in a project

hubugs label [-h] [-a label] [-r label] bugs [bugs …]
-a <label>, --add=<label>

add label to issue

-r <label>, --remove=<label>

remove label from issue

milestone - Add an issue to a milestone

hubugs milestone [-h] milestone [bugs [bugs …]]

milestones - Manage repository milestones

hubugs milestones [-h] [-o {due_date,completeness}] [-s {open,closed}]
    [-c milestone] [-l]
-o <order>, --order=<order>

sort order for listing bugs

-s <state>, --state=<state>

state of bugs to operate on

-c <name>, --create=<name>

create new milestone

-l, --list

list available milestones