Coder Social home page Coder Social logo

kbenzie / git-issue Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 90 KB

Manage remote git issue trackers.

Home Page: https://kbenzie.github.io/git-issue

License: MIT License

Makefile 0.45% Python 99.55%
command-line-tool git github gitlab gogs issue-tracker

git-issue's People

Contributors

infektor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

git-issue's Issues

Support arbitrary events

From github.py:

TODO: Currently only 'closed' and 'reopned' events are
supported due to limitations of other services, requires
changes in the comment line interface and IssueEvent. GitHub
has a lot of event types.

Add a generic way to represent additional event types so the full context of
issues can be seen with git issue show <number>.

Support CRUD cycle for labels and milestones

Currently labels and milestones do not support the create, read, update, delete
life cycle, this requires visiting the services website. Add support for the
following commands:

  • git issue label {create,edit,show,list,delete}
  • git issue milestone {create,edit,show,list,delete}

Display issue number and URL on completed actions

Currently the {create,edit,close,reopen} commands do not any information on
successfully completion. To find out the issue number of an newly created issue
the user must invoke git issue list. Upon success these commands should output
a message of the form:

<action> issue <number>: <url>

Add colour to <action> as seen in git issue show <number>.

Support --oneline for list command

Similar to git log --oneline it should be possible to display a shorthand list
of issue with git issue list --oneline just displaying issue numbers,
labels/milestones, and titles.

Enable removing labels/milestone

Currently there is not mechanism to remove the milestone or all labels if they
are set. The command line should look something like:

$ git issue edit <number> -l none -s none

Each service will likely have to implement this differently so should special
case receiving 'none' for labels and milestone in their
<Service>Issue.edit() implementation.

Support editing and deleting comments

Currently comments can only be created, add support for editing/delete comments.
Selection of the comment to edit/delete should be performed using pick with a
short preview of the comment.

  • git issue comment <number> {edit,delete}

Gogs issue creation fails when assignee specified

$ git issue create -a benie
Traceback (most recent call last):
  File "/home/benie/.local/bin/git-issue", line 8, in <module>
    sys.exit(main())
  File "/home/benie/.local/lib/python3.8/site-packages/git_issue/cli.py", line 508, in main
    command(get_service(), **args)
  File "/home/benie/.local/lib/python3.8/site-packages/git_issue/cli.py", line 273, in create
    issue = service.create(
  File "/home/benie/.local/lib/python3.8/site-packages/git_issue/gogs.py", line 64, in create
    assignee = _check_assignee_(kwargs.pop('assignee', None))
  File "/home/benie/.local/lib/python3.8/site-packages/git_issue/gogs.py", line 21, in _check_assignee_
    raise ValueError('assignee must be an instance of GogsUser')
ValueError: assignee must be an instance of GogsUser

Support --summary for show command

Similar to git show --summary <ref> if should be possible to display a summary
of an issue with git issue show --summary <number> displaying the same as each
entry of git issue list.

Fix use of arrow's `.get()` method

The following warning is being reported using arrow version 0.14.5 and should be fixed.

warning: The .get() parsing method without a format string will parse more strictly in version 0.15.0.See https://github.com/crsmithdev/arrow/issues/612 for more details.

Can't create issue on GitLab API v4

When attempting to create an issue on GitLab API v4 the following output is
produced and the issue is not created on inspection of the web interface. 200
is a very strange status code for a failure, git-issue expects 201 on
success since it's creating a resource.

$ git issue create
error: 200 OK

GitLab 'none' milestone

When a GitLab issue does not have a milestone this shows up as none in git issue list and git issue show whilst with other services nothing is shown.
This is likely due to GitLab returning the string "none" in the milestone
field of the issue get response.

Commenting on GitLab issues result in exception

Currently GitLabIssueComment.url() is not implemented, this is due to not
knowing what the URL returned should be, otherwise comments are created as
expected but the git issue comment command fails with a NotImplementedError.

Gogs issues fail on additional states

A Gogs issue which was closed by being mentioned in a commit message is not longer able to be displayed giving the following error message.

$ git issue show 3
Traceback (most recent call last):
  File "/Users/benie/.local/bin/git-issue", line 11, in <module>
    load_entry_point('git-issue==0.3.8', 'console_scripts', 'git-issue')()
  File "/Users/benie/.local/lib/python/site-packages/git_issue/cli.py", line 507, in main
    command(get_service(), **args)
  File "/Users/benie/.local/lib/python/site-packages/git_issue/cli.py", line 355, in show
    items += issue.events()
  File "/Users/benie/.local/lib/python/site-packages/git_issue/gogs.py", line 219, in events
    'closed': 'closed'}[state], event))
KeyError: <git_issue.gogs.GogsIssueState object at 0x1114ce510>

Add documentation for --url option

The git issue browse command supports the --url to print the issues URL
instead of opening it in the browser but this option is not documented in the
manpage.

Approaches for adding JIRA support

JIRA handles issue states quite differently, so far all backend support open
and closed states but JIRA can have many different states and possible
different parameters when transitioning between states which may or may not be
required.

One solution could be to add a new command:

$ git issue transition <state>

The transition command, when invoked, would prompt the user to input any
required parameters as defined by the JIRA transition screen associated with the
<state>. This has the downside of loosing out on command line completions for
the parameters.

A second approach could be to shoehorn the state transitions into the git issue {edit,close,reopen} commands. States which can be transitioned to but could be
augmented using choices given to the user with pick as is already done
to disambiguate user searches. This has the downside of not being a one-to-one
match of transitions available for an issue and possibly counter-intuitive
command names.

Third approach would be to assess GitHub projects and GitLab
boards
for any commonalities between the services which might be
more instructive when implementing JIRA support.

Support filters when listing issues

Currently git issue list has a single filter, the issue state. Whilst this is
helpful most API's provide many more options for filtering issues and those
API's which don't filtering can be emulated easily.

Filtering should include:

  • assignee
  • labels
  • milestone

Support editing and deleting comments

It is possible to comment on an issue using:

$ git issue comment <issue>

It is not possible to then edit or delete that comment like:

$ git issue comment <issue> edit <comment>
$ git issue comment <issue> delete <comment>

Support secure methods of storing access tokens

Currently git-issue only supports storing API tokens or passwords in plain
text in .gitconfig files, this depends on the host system being trusted and
secure which is not always the case.

[Mutt][mutt] supports two kinds of config options, key = value which is stored
in plane text, and key = command | which invokes a command to get the value.
This approach is very flexible as it allows the user to choose their preferred
way of storing access tokens.

Add support to git-issue for invoking a command to get the value of
git-config options following the git style for running shell commands:

[issue "Service"]
token = !gpg --decrypt /path/to/encrypted/token

Whilst invoking a command is intended for improving security of token's any
git-issue config option should support the command syntax.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.