git issue
[-h
]
git issue create
[-m
] [-a
] [-s
] [-l
]
git issue edit
[-m
] [-n
] [-a
] [-s
] [-l
] number
git issue close
[-m
] [-n
] number
git issue reopen
number
git issue comment
[-m
] number
git issue browse
[-u
] number
git issue list
[--oneline
] [{open,closed,all}]
git issue show
[-q
] [--summary
] number
git-issue
provides a command line interface to remote issue trackers allowing
users to manage issues in the same way they manage git(1) repositories. A remote
issue tracker is referred to as service. Multiple service providers can be
supported by git-issue
, see SERVICES for the supported service
list. git-issue
determines which service to use by querying issue.service
.
Authentication with the service is performed using an API token, git-issue
queries issue.<service>.token
to gain access to the service.
git issue create
: Create a new issue, when-m
is not specified an editor will be opened for the user to describe the issue.git issue edit
: Edit an existing issue, when-m
is not specified an editor will be opened for the user to edit the existing issue description.git issue close
: Close an existing open issue, when-n
is not specified an editor will be opened for the user to comment on whey the issue is being closed.git issue reopen
: Reopen an existing closed issued.git issue comment
: Comment on an existing issue.git issue browse
: Open an existing issues URL in a new tab in default browser.git issue list
: List all open, closed, or all existing issues, output is paged using less(1).git issue show
: Show an existing issue, including comments and state changes, output is paged using less(1).
-h
,--help
: Show this manual and exit.-m
message,--message
message: Use the given message as the issue title, editor will not be opened to edit a message, is mutually exclusive with-n
.-n
,--no-message
: Do not open the editor to edit a message, is mutually exclusive with-m
.-a
assignee,--assignee
assignee: Search term for a user to assign the issue to.-s
milestone,--milestone
milestone: Name of the milestone to assign to the issue or none to remove existing milestone.-l
label,--label
label: Name of a label to assign to the issue, can be repeated to assign multiple label's to the issue or none to remove existing labels.- number: The issue number to manage, the actual representation may change dependant on configured service.
- open, closed, all: The current state of issues to list, if the default is open.
--url
: Print the issue URL instead of opening it in the default browser, only available forgit issue browse
.--oneline
: Print each issue on one line, only available forgit issue list
.-q
,--quiet
: Suppress displaying issue events, only available forgit issue show
.--summary
: Print issue summary only, only available forgit issue show
.
GitHub
: To enable this service setissue.service
toGitHub
andissue.GitHub.token
to<username>
:<token>
replacing<username>
with your GitHub login and<token>
with a personal access token.GitLab
: To enable this service setissue.service
toGitLab
andissue.GitLab.token
to<token>
created athttps://your.gitlab.url/profile/account
.Gogs
: To enable this service setissue.service
toGogs
andissue.Gogs.token
to<token>
created athttps://your.gogs.url/user/settings/applications
.
The syntax of editor message is dependant on the service providing the issue
tracker, by default this will be Markdown or some variation of it
i.e. GitHub Flavoured Markdown. git-issue
generally does
not process the text input by the user, with one exception; when editing a
message in the editor the second line in the file will be ignored as a separator
between the title and body of the issue.
git-issue
takes advantage of git-config(1) to store information which it
requires to function. If a git-config(1) entry is prefixed with !
it will be
treated as a shell command, when executed should result in the desired value.
- git config
issue.service
service: Name of the service which provides the remote issue tracker, e.g.Gogs
. - git config
issue.<service>.url
url: HTTP URL of the service providing the remote issue tracker,git-issue
will attempt to deduce this value if it is not set by inspecting the repositories remote URL and is thus not usually required to be manually configured.<service>
must be replaced with name of the configured service, e.g.Gogs
. - git config
issue.<service>.token
token: The user API token for the configured remote issue tracker, this can be usually be acquired through the web interface.<service>
must be replaced with name of the configured service, e.g.Gogs
. - git config
issue.<service>.remote
remote: By defaultgit-issue
usesorigin
when attempting to determine the HTTP URL of a service, iforigin
does not point to the remote issue tracker setting remote will override the default behaviour.<service>
must be replaced with name of the configured service, e.g.Gogs
.
git-issue
attempts to determine which editor to use when editing messages in
the same way as git(1), following are the steps taken to determine which editor
to use.
- git config --get
core.editor
: This is the first choice and is the same editor as used for git-commit(1) messages. EDITOR
: Ifcore.editor
is not set then theEDITOR
environment variable is inspected.- vi:
Finally if neither of the above are set
git-issue
falls back to using the venerable vi(1) editor.
-
0
: Success, no error occurred. -
1
: Failure, a fatal error has occurred. -
130
: Failure, user interrupt has occurred.
Any other error codes are propagated from the underlying command, i.e. git-config(1).
git-issue
provides zsh(1) completions by default, the completions are
installed relative to the command line tool in share/zsh/site-functions
. If
the install went as expected these should be available next time compinit
is
invoked, however if completions are not working check please check that the
_git-issue
file resides in a directory in the fpath
array, refer to
zshbuiltins(1) and zshcompsys(1) for more information.
git-issue
relies on service API tokens to be stored in git-config(1) files,
ensure that these files have appropriate permissions and that the system is
secure (password protected) when not attended to avoid data loss or destructive
activities occurring in your absence.
To ensure that service API tokens are not stored as plane text in git-config(1) files it is highly recommended to store them in a safe place and use a shell command to retrieve the information when required. For example if a Gogs API token is encrypted with gpg(1) the following git-config(1) entry could be used.
[issue "Gogs"]
token = !gpg --decrypt gogs-token.gpg
Gogs
does not reliably support repeatedly editing labels, a warning will be emitted if this is attempted.
Please report any issues on GitHub.
0.4.3 - Silence arrow.get() behaviour change warning.
0.4.2 - Update security considerations.
0.4.1 - Fix issue state check.
0.4.0 - Support git-config(1) shell commands.
0.3.9 - Cleanup and fixes.
0.3.8 - Support arbitrary issue states.
0.3.7 - Support arbitrary issue events.
0.3.6 - Implement GitLab comment URL.
0.3.5 - Fix minor GitLab display bugs.
0.3.4 - Fix editing labels with Gogs.
0.3.3 - Improve error message on authentication failure.
0.3.2 - Fix GitIssueError
bug.
0.3.1 - Fix issue.<service>.https
bug.
0.3.0 - Support GitLab
service.
0.2.8 - Enable removal of labels/milestone.
0.2.7 - Display message on command success.
0.2.6 - Add options for concise output.
0.2.5 - Add support for editing Gogs issue labels.
0.2.4 - Respect issue.<service>.url
when set.
0.2.3 - Move generated documentation to docs.
0.2.2 - Fix pip install & service instantiation.
0.2.1 - Fix zsh(1) completions install location.
0.2.0 - Support GitHub
service.
0.1.3 - Refactor in preparation for additional services.
0.1.2 - Fix install of data files in setup.py.
0.1.1 - Fix bug in git issue comment.
0.1.0 - Support Gogs
service.
Kenneth Benzie
MIT License
Copyright 2017 Kenneth Benzie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
git(1) git-config(1) git-commit(1) gpg(1) less(1) zsh(1) zshbuiltins(1) zshcompsys(1)