Gathering detailed insights and metrics for jira-cmd
Gathering detailed insights and metrics for jira-cmd
Gathering detailed insights and metrics for jira-cmd
Gathering detailed insights and metrics for jira-cmd
jira-client
Wrapper for the JIRA API
jira-prepare-commit-msg
Husky Git hook to add JIRA ticket ID into the commit message
@digitalroute/cz-conventional-changelog-for-jira
Commitizen adapter following the conventional-changelog format and also asking for JIRA issue.
@types/jira-client
TypeScript definitions for jira-client
npm install jira-cmd
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
238 Stars
338 Commits
62 Forks
7 Watching
12 Branches
18 Contributors
Updated on 14 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
4
Compared to previous day
Last week
-52.6%
37
Compared to previous week
Last month
39.3%
195
Compared to previous month
Last year
87.3%
1,045
Compared to previous year
A Jira command line interface based on jilla.
Its got tons of functionalities
Install node.js.
Then, in your shell type:
$ npm install -g jira-cmd
$ jira
Jira URL: https://jira.atlassian.com/
Username: xxxxxx
Password: xxxxxx
Information stored!
This save your credentials (base64 encoded) in your $HOME/.jira
folder.
Usage: jira.js [options] [command]
Commands:
ls [options] List my issues
start <issue> Start working on an issue.
stop <issue> Stop working on an issue.
review <issue> [assignee] Mark issue as being reviewed [by assignee(optional)].
done [options] <issue> Mark issue as finished.
running List issues in progress.
jql [options] <query> Run JQL query
link <from> <to> link issues
search <term> Find issues.
assign <issue> [user] Assign an issue to <user>. Provide only issue# to assign to me
watch <issue> [user] Watch an issue to <user>. Provide only issue# to watch to me
comment <issue> [text] Comment an issue.
show [options] <issue> Show info about an issue
open <issue> Open an issue in a browser
worklog <issue> Show worklog about an issue
worklogadd [options] <issue> <timeSpent> [comment] Log work for an issue
create [project[-issue]] Create an issue or a sub-task
config [options] Change configuration
sprint [options] Works with sprint boards
With no arguments, displays all rapid boards
With -r argument, attempt to find a single rapid board and display its active sprints
With both -r and -s arguments attempt to get a single rapidboard/ sprint and show its issues. If a single sprint board isnt found, show all matching sprint boards
Options:
-h, --help output usage information
-V, --version output the version number
Usage: create [options] [project[-issue]]
Options:
-h, --help output usage information
-p, --project <project> Rapid board on which project is to be created
-P, --priority <priority> priority of the issue
-T --type <type> Issue type
-s --subtask <subtask> Issue subtask
-t --title <title> Issue title
-d --description <description> Issue description
-a --assignee <assignee> Issue assignee
1 "default_create" : { 2 <!-- fields which you want to prompt every time --> 3 <!-- whenever you create a new issue --> 4 "__always_ask" :{ 5 "fields" :{ 6 "description" :{}, <!-- description would be prompted everytime --> 7 "priority": {} <!-- priority would be prompted every time --> 8 } 9 }, 10 <!-- you will do jira new KEY1 to use this template of default values --> 11 "KEY1" : { 12 "project": "YOUR_PROJECT", <!-- mandatory --> 13 "issueType": 3, <!-- mandatory --> 14 "default" : { 15 "components": [{ 16 "id": "15226" 17 }], 18 "customfield_12901" : "infrastructure", 19 "customfield_10008" : "MDO-9584", 20 "customfield_12902": { 21 "id": "11237" 22 }, 23 <!-- in this case, this customfield corresponds to cc--> 24 <!-- , so when creating new jira with this template--> 25 <!-- every iissue would have username prakhar in cc--> 26 "customfield_10901": [{ <!-- how to give usernames --> 27 "name": "prakhar" 28 }] 29 }, 30 "quick" : { <!-- another template shortcut --> 31 32 }, 33 "SOME_ALIAS" :{ <!-- yet another template shortcut --> 34 35 } 36 }, 37}
default_create
config
__always_ask
: it contains the fields which would always be prompted when you create an issue. For eg. in above given json , whenever we'll create a new issue , description and priority would always be asked along with other mandatory fields for the board.default_create
are the shortcut keys which you will refer to while calling jira new keyThis jira edit functionality is in beta phase and only few type of fields are allowed to be edited. currently only items of type strings are supported
1undefined
(0) Summary (1) Issue Type (2) Component/s (3) Dev Estimate (4) Description (5) Fix Version/s (6) Priority (7) Labels (8) Code Reviewer (9) Sprint (10) Epic Link (11) Attachment (12) Depn Team (13) CC (14) Due Date (15) Linked Issues (16) Comment (17) Assignee enter Input 7 labels Enter value testlabel1,testlabel2 Issue edited successfully!
```
to edit jira in non interactive mode, giving field to be edited and its values is possible.
fields{
summary {…}
issuetype {…}
components {…}
customfield_12000 {…}
description {…}
fixVersions {…}
priority {…}
labels {
required false
schema {
type "array"
items "string"
system "labels"
}
name "Labels"
autoCompleteUrl "https://jira.com….0/labels/suggest?query="
operations […]
}
customfield_11600 {…}
customfield_10007 {…}
customfield_10008 {…}
attachment {…}
customfield_11901 {…}
customfield_10901 {…}
duedate {…}
issuelinks {…}
comment {…}
assignee {…}
}
```
*
jira edit JRA-254 "FIELD_NAME::FIELDVALUES"
* Fieldnames can be hard to remember when using on command line, so you can save these field names in ~/.jira/config.json
. Suppose the response of edit meta is
``` json
fields {
summary {…}
issuetype {…}
components {…}
customfield_12000 {…}
description {…}
fixVersions {…}
priority {
required false
schema {
type "priority"
system "priority"
}
name "Priority"
operations […]
allowedValues {
0 {
self "https://jira.com/rest/api/2/priority/1"
iconUrl "https://jira.com…/priorities/critical.svg"
name "Highest"
id "1"
},
1 {
self "https://jira.com/rest/api/2/priority/2"
iconUrl "https://jira.com…cons/priorities/high.svg"
name "High"
id "2"
}
2 {,
self "https://jira.com/rest/api/2/priority/3"
iconUrl "https://jira.com…ns/priorities/medium.svg"
name "Medium"
id "3"
},
3 {
self "https://jira.com/rest/api/2/priority/4"
iconUrl "https://jira.com…icons/priorities/low.svg"
name "Low"
id "4"
},
4 {
self "https://jira.com/rest/api/2/priority/5"
iconUrl "https://jira.com…ns/priorities/lowest.svg"
name "Lowest"
id "5"
}
5 {…}
6 {…}
7 {…}
8 {…}
9 {…}
}
labels {…}
customfield_11600 {…}
customfield_10007 {…}
customfield_10008 {…}
attachment {…}
customfield_11901 {…}
customfield_10901 {…}
duedate {…}
issuelinks {…}
comment {…}
assignee {…}
}
```
1 "edit_meta": { 2 "__default": { <!-- would work like "jira CART-2047 alias_for_high" would change the priority of task to high --> 3 "alias_for_high": { 4 "fields": { 5 "priority": { 6 "id": "2" 7 } 8 } 9 } 10 }, 11 "sprint": { 12 "key": "customfield_10007" 13 }, 14 "alias_for_label": { <!-- would work "jira edit CART-2047 alias_for_label::label1,label2" --> 15 "key": "labels", 16 "default": { 17 "test1": "t1,t2" 18 } 19 } 20 }, 21
edit_meta
, if found it picks the key
field from the alias. and makes a put call corresponding to the actual key that has been stored.
alias_for_label
, then it picks this default key from config.json as though the input was given from commandline. It would act as if the command issued was jira edit JRA-354 "alias_for_label
::t1,t2"There are multiple other jira transitions beside done,invalid,start,stop etc which are directly supported as jira done JRA-123 or jira invalid JRA-786 etc.
Sometimes some jira do not change transition into these states directly due to defined workflow. They can go into certain states only from current state. In these cases or in general you can use jira mark functionality. It works as follows jira mark CART-2047
1$> jira mark JRA-2047 2(71) Blocked 3(91) Invalid 4(141) Done(No Prod Deply) 5(181) Wontfix 6(251) Duplicate 7(291) Partner Issue 8(301) Other tech team issue 9(241) Reopen 10Enter transition 251 11
Above mentioned input would mark the task JRA-2047 as duplicate.
project
and issueType
at the root level inside your KEY or alias you choose, for Eg. KEY1 in our case.get issues for jql eg. jira jql "YOUR_JQL_OR_JQL_SHORTCUT" when using a particular jql frequently , you can save that jql in ~/.jira/config.json,an example jql is saved there with key reported
eg . jira jql reported would run the jql written against reported key [saved by default ] in ~/.jira/config.json
Usage: jql [options] [query]
Options:
-h, --help output usage information
-c, --custom <name> Filter by custom jql saved in jira config
Usage: sprint [options]
Options:
-h, --help output usage information
-r, --rapidboard <name> Rapidboard to show sprints for
-s, --sprint <name> Sprint to show the issues
-a, --add <projIssue> Add project issue to sprint
-i, --sprintId <sprintId> Id of the sprint
-j, --jql <jql> Id of the sprint
customfield_10007
corresponds to sprint. following jira jql -c "cf[10007]=1787 and assignee=aman6.jain and status not in ('invalid','done')" gives the issues which are not done in sprint with id 1787 . now you can use this jql to mark them moved to new sprint as jira sprint -i 1890 -j "cf[10007]=1787 and assignee=aman6.jain and status not in ('invalid','done')" . And all issues would move to sprint with id 1890.if you want to search a text in all the issues
save the username alias/nickname in user_alias block of ~/.jira/config.json .
1 { 2 "user_alias" :{ 3 "nickname1" : "username of user 1", 4 "nickname2" : "username 2" 5 } 6 }
auth : here the basic authentication information is stored. You would need to change it if url of your jira is changed.
1 "auth": { 2 "token": "AUTO_GENERATED_TOKEN_FROM_PASSWORD", 3 "url": "YOUR_JIRA_URL", 4 "user": "YOUR_JIRA_EMAIL" 5 }
custom_jql: here you will store the jql to get the type of issues you frequently want to see and monitor in single command. eg. jira jql reported would give the issues corresponding to jql saved against reported key in custom_jql by default.
1 "custom_jql": { 2 "mpp": "project=MPP and status !=done", 3 "reported": "reporter=currentUser() and status not in ('Done', 'Invalid')", 4 }, 5
default_create : now this is part of the jira new functionality, in which you can configure templates in config.json, so when you create a new jira, default values are picked from templates and other required fields or fields which you have declared mandatory are prompted for your input.
edit_meta
options
list_issues_columns
: definitions of the columns used in displaying the issues with jira ls
or jira list
. Default columns are Key, Priority, Summary and Status. Keys are the column headers. Values are object with:
jsPath
the path in the JSON of an issue (returned by a call to rest/api/2/search?jql=assignee=currentUser()
, example given in Using jira edit functionality)defaultValue
(optional) if the field is not present or its value is equivalent to false (zero, null or ""), the default value will be used insteadisDate
(optional) mark that the value is a date and should be formatted accordinglyisDuration
(optional) mark that the value is a duration (like 2h or 3d) and should be formatted accordinglytruncate
(optional) length that string values should not exceed. If they do they'll be truncated.1 "list_issues_columns": { 2 "Key": { 3 "jsPath": "key" 4 }, 5 "Priority": { 6 "jsPath": "fields.priority.name", 7 "defaultValue": "" 8 }, 9 "Summary": { 10 "jsPath": "fields.summary", 11 "truncate": 50 12 }, 13 "Status": { 14 "jsPath": "fields.status.name" 15 }, 16 "Estimate": { 17 "jsPath": "fields.progress.total", 18 "isDuration": true 19 }, 20 "Logged": { 21 "jsPath": "fields.progress.progress", 22 "isDuration": true 23 }, 24 "Created": { 25 "jsPath": "fields.created", 26 "isDate": true 27 } 28 }
work_hours_in_day
: number of hours in the working days as setup in JIRA.Each command have individual usage help (using --help or -h)
Checkout ~/.jira/config.json
for more options.
Copyright (c) 2013 germanrcuriel@gmail.com
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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
35 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More