Skip to content

Project Issues Tracking and Management

Samuel Kerr edited this page Feb 5, 2016 · 2 revisions

Github Issues

We use git-issue here at BMN to add or close issues from the command line.

git-issue

✔ supported, ∅ not supported by this service, ✘ not supported by git-issues (yet)

list issues (bitbucket ✔, github ✔, gitlab ✔) create issue (bitbucket ✔, github ✔, gitlab ✔) close issue (bitbucket ✔, github ✔, gitlab ✔) reopen issue (bitbucket ✔, github ✔, gitlab ✔) delete issue (bitbucket ✔, github ∅, gitlab ∅) integrated cli (needs improvement) Why? There's excellent tools for GitHub out there, but I found integration for BitBucket or Gitlab lacking.

Installation gem install git-issues Usage Setup a cloned repo

$ cd /path/to/your/repo $ git issues You will be asked for your login credentials. Further information is described in section security.

Get issues

$ git issues -- Using: [email protected]:gittalk/git-issues.git 22 | open | Usage instructions 20 | open | Display instructions for setup when the command is run the first time 18 | open | clearly describe OAuth service when requesting the token e.g. Github OAuth Add new issues

The format is add <title> []

$ git issues add "Git issue title" "Git issue descripton" -- Using: [email protected]:gittalk/git-issues.git ++ created issue 24 Closing or deleting issues

Close an issue with close :

$ git issues close 24 Use delete to remove an issue. It is currently only supported by Bitbucket repos.

$ git issues delete 24 Security Your login information will be stored by default in: ~/.git-issues.conf. Make sure to keep this file's permissions limited (e.g. 0600).

If you can, do not use username and password for login. Use OAuth instead. If you use username and password, both will be stored in the configuration file in an unencrypted state, which is highly discouraged.

How to get OAuth tokens:

GitHub: Go to Account Settings, Applications, and click on Create a new Personal Access Token. Enter git-issues as the description. Use this token during first login. OAuth on BitBucket Gitlab: Click on your profile, Profile Settings, Account and use the Private token found here.

An alternative - git-issue (no s)

Installation

$ gem install git-issue

or

$ git clone https://github.com/yuroyoro/git-issue.git $ cd git-issue $ gem install jeweler $ rake install Configuration(Redmine)

set type of issue traking system(redmine or github)

$ git config issue.type redmine set url of issue traking system's api endopoint.

$ git config issue.url http://redmine.example.com set api-key for accessing issue traking system.

$ git config issue.apikey FWeaj3I9laei03A.... set repository name if using github.

$ git config issue.repo gitterb set your account name if using github.

$ git config issue.user yuroyoro Configuration(Github Issues)

set type of issue traking system(redmine or github)

$ git config issue.type github set user and password of github(for authentication)

$ EDITOR=vim pit set github Usage(Redmine)

git issue [ticket_id] []

Commnads: show s show given issue summary. if given no id, geuss id from current branch name. view v view issue in browser. if given no id, geuss id from current branch name. list l listing issues. mine m display issues that assigned to you. commit c commit with filling issue subject to messsage.if given no id, geuss id from current branch name. add a create issue. update u update issue properties. if given no id, geuss id from current branch name. branch b checkout to branch using specified issue id. if branch dose'nt exisits, create it. (ex ticket/id/<issue_id>) publish pub push branch to remote repository and set upstream rebase rb rebase branch onto specific newbase help h show usage. local loc listing local branches tickets project pj listing ticket belongs to sspecified project

Options: -a, --all update all paths in the index file -f, --force force create branch -v, --verbose show issue details -n, --max-count=VALUE maximum number of issues --oneline display short info --raw-id output ticket number only --remote=VALUE on publish, remote repository to push branch --onto=VALUE on rebase, start new branch with HEAD equal to "newbase" --debug debug print -j, --supperss_journals do not show issue journals -r, --supperss_relations do not show issue relations tickets -c, --supperss_changesets do not show issue changesets -q, --query=VALUE filter query of listing tickets --project_id=VALUE use the given value to create subject --description=VALUE use the given value to create subject --subject=VALUE use the given value to create/update subject --ratio=VALUE use the given value to create/update done-ratio(%) --status=VALUE use the given value to create/update issue statues id --priority=VALUE use the given value to create/update issue priority id --tracker=VALUE use the given value to create/update tracker id --assigned_to_id=VALUE use the given value to create/update assigned_to id --category=VALUE use the given value to create/update category id --fixed_version=VALUE use the given value to create/update fixed_version id --custom_fields=VALUE value should be specifies '<custom_fields_id1>:,<custom_fields_id2>:, ...' --notes=VALUE add notes to issue Usage(Github Issues)

git issue [ticket_id] []

Commnads: show s show given issue summary. if given no id, geuss id from current branch name. view v view issue in browser. if given no id, geuss id from current branch name. list l listing issues. mine m display issues that assigned to you. commit c commit with filling issue subject to messsage.if given no id, geuss id from current branch name. add a create issue. update u update issue properties. if given no id, geuss id from current branch name. branch b checkout to branch using specified issue id. if branch dose'nt exisits, create it. (ex ticket/id/<issue_id>) publish pub push branch to remote repository and set upstream rebase rb rebase branch onto specific newbase help h show usage. mention men create a comment to given issue

Options: -a, --all update all paths in the index file -f, --force force create branch -v, --verbose show issue details -n, --max-count=VALUE maximum number of issues --oneline display short info --raw-id output ticket number only --remote=VALUE on publish, remote repository to push branch --onto=VALUE on rebase, start new branch with HEAD equal to "newbase" --debug debug print -s, --supperss_commentsc show issue journals --title=VALUE Title of issue.Use the given value to create/update issue. --body=VALUE Body content of issue.Use the given value to create/update issue. --state=VALUE Use the given value to create/update issue. or query of listing issues.Where 'state' is either 'open' or 'closed' --milestone=VALUE Use the given value to create/update issue. or query of listing issues, (Integer Milestone number) --assignee=VALUE Use the given value to create/update issue. or query of listing issues, (String User login) --mentioned=VALUE Query of listing issues, (String User login) --labels=VALUE Use the given value to create/update issue. or query of listing issues, (String list of comma separated Label names) --sort=VALUE Query of listing issues, (created, updated, comments, default: created) --direction=VALUE Query of listing issues, (asc or desc, default: desc.) --since=VALUE Query of listing issue, (Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ) --password=VALUE For Authorizaion of create/update issue. Github API v3 doesn't supports API token base authorization for now. then, use Basic Authorizaion instead token. --sslnoverify don't verify SSL