Command-line API for Atlassian JIRA using the Tomitribe CREST library

Related tags

CLI jamira
Overview

Atlassian JIRA Command-Line (CLI)

Jamira is a command-line API for Atlassian JIRA using the Tomitribe CREST library.

Installation

Jamira can be downloaded as a ready-to-go executable from Maven Central

curl https://repo1.maven.org/maven2/org/tomitribe/jamira/jamira-cli/0.1/jamira-cli-0.1.sh > /usr/local/bin/jamira
chmod 755 /usr/local/bin/jamira

Installation using JBang

Jamira can be installed and run with jbang - it will even setup java for you if you do not have that available.


curl -Ls sh.jbang.dev | bash -s app install jamira@tomitribe/jamira jamira ---

Completion

Additionally, if you want command completion you can add the following to your ~/.bash_profile, ~/.bashrc or similar environment setup scripts:

source "$(jamira _completion -f)"

Setup

Jamira has accounts in a similar way git has remotes. An account can be setup using the account add command

Usage: account add  Name Username Password URI

The Name value should be any short identifier with no spaces and all lowercase. Any other command that has an --account flag can use that identifier to locate the login information and URL of your desired JIRA server.

Example setup:

$ jamira account add apache elmerfudd "GetTh3Rabb1t" https://issues.apache.org/jira

$ jamira account list
  name    username             serverUri
-------- ----------- --------------------------------
 apache   elmerfudd   https://issues.apache.org/jira

Commands

$ jamira
Commands:

   account
   bulk-create
   create
   help
   list

List

$ jamira list
Usage: list [subcommand] [options]

Sub commands:

   components
   favourite-filters
   fields
   groups
   issue-link-types
   issue-types
   priorities
   project-roles
   projects
   resolutions
   statuses
   subtasks
   users
   versions

List Priorities

For example to list all of the priorities setup in the JIRA install:

$ ./jamira-cli/target/jamira list priorities
  id       name                                                     description
------- ---------- --------------------------------------------------------------------------------------------------------------
     1   Blocker    Blocks development and/or testing work, production could not run
 10000   Urgent     This issue should block release until it is resolved, and trigger immediate release once resolved.
     2   Critical   Crashes, loss of data, severe memory leak.
 10001   High
     3   Major      Major loss of function.
 10002   Normal
     4   Minor      Minor loss of function, or other problem where easy workaround is present.
 10003   Low
     5   Trivial    Cosmetic problem like misspelt words or misaligned text.
 10100   P0          Outage blocking development and/or testing work; requires immediate and continuous attention
 10101   P1         Critical bug: data loss, total loss of function, or loss of testing signal due to test failures or flakiness
 10102   P2         Default priority. Will be triaged and planned according to community practices.
 10103   P3         Non-urgent bugs, features, and improvements
 10104   P4          Trivial items, spelling errors, etc.

List Subtasks

To list all of the subtasks for a specific issue

$ jamira list subtasks OPENEJB-142
   issueKey                           summary                          status.name
-------------- ------------------------------------------------------ -------------
 OPENEJB-145    iTest: StatelessRemoteJndiTests                        Closed
 OPENEJB-146    iTest: StatelessLocalJndiTests                         Closed
 OPENEJB-147    iTest: StatelessHomeIntfcTests                         Closed
 OPENEJB-148    iTest: StatelessEjbHomeTests                           Closed
 OPENEJB-149    iTest: StatelessEjbObjectTests                         Closed
 OPENEJB-150    iTest: StatelessEjbLocalHomeTests                      Closed
 OPENEJB-151    iTest: StatelessEjbLocalObjectTests                    Closed
 OPENEJB-152    iTest: StatelessRemoteIntfcTests                       Closed
 OPENEJB-153    iTest: StatelessLocalIntfcTests                        Closed
 OPENEJB-154    iTest: StatelessHomeHandleTests                        Closed

Create

Can create issues, versions and components. For common issue types there are convenience commands; bug, improvement, new-feature, task, subtask.

$ jamira create
Missing sub-command
Usage: create [subcommand] [options]

Sub commands:

   bug
   component
   improvement
   issue
   new-feature
   subtask
   task
   version
   wish

Create Sub-Task

Sub-tasks can be created by simply specifying the parent issue key and supplying a text summary to use for the new issue

$ jamira create subtask
Missing argument: IssueKey

Usage: create subtask [options] IssueKey String

Options:
  --account=<Account>               Shortname of the JIRA server
                                    (default: default)
  --affected-version=<String[]>     The names of the versions affected by the issue
  --assignee=<String>               Username of the person to which the issue should be assigned
  --component=<String[]>            The component names relating to the issue
  --description=<String>            Long description of the issue
  --fix-version=<String[]>          The names of the versions affected by the issue
  --priority=<String>               The name of the priority for the issue
  --reporter=<String>               Username of the person who is the reporter of the issue

For example:

jamira create subtask TOMEE-3002 "Test caching"

Bulk-create

When you have several issues you need to create it’s advised to use the bulk API.

$ jamira bulk-create
Missing sub-command
Usage: bulk-create [subcommand] [options]

Sub commands:

   issues
   subtasks

Bulk-create Subtasks

Subtasks can be created in bulk using the following command. The summary for each subtask is read from the piped input stream. This allows several lines of text to be generated on the command line and each line becomes a subtask.

$ jamira bulk-create subtasks
Missing argument: IssueKey

Usage: bulk-create subtasks [options] IssueKey

Options:
  --account=<Account>               The shortname of the jira install configured via the `setup` command
                                    (default: default)
  --affected-version=<String[]>     The names of the versions affected by the issue
  --assignee=<String>               Username of the person to which the issue should be assigned
  --component=<String[]>            The component names relating to the issue
  --fix-version=<String[]>          The names of the versions affected by the issue
  --priority=<String>               The name of the priority for the issue
  --reporter=<String>               Username of the person who is the reporter of the issue

For example:

$ echo -e "Bulk insert"{1..10}"\n"
Bulk insert1
 Bulk insert2
 Bulk insert3
 Bulk insert4
 Bulk insert5
 Bulk insert6
 Bulk insert7
 Bulk insert8
 Bulk insert9
 Bulk insert10

$ echo -e "Bulk insert"{1..10}"\n" | jamira bulk-create subtasks TOMEE-3002
TOMEE-3021
TOMEE-3022
TOMEE-3023
TOMEE-3024
TOMEE-3025
TOMEE-3026
TOMEE-3027
TOMEE-3028
TOMEE-3029
TOMEE-3030
You might also like...

JLine is a Java library for handling console input.

JLine JLine is a Java library for handling console input. It is similar in functionality to BSD editline and GNU readline but with additional features

Jan 5, 2023

A library for creating interactive console applications in Java

A library for creating interactive console applications in Java

Text-IO Text-IO is a library for creating Java console applications. It can be used in applications that need to read interactive input from the user.

Jan 5, 2023

Java library for creating text-based GUIs

Java library for creating text-based GUIs

Lanterna Lanterna is a Java library allowing you to write easy semi-graphical user interfaces in a text-only environment, very similar to the C librar

Dec 31, 2022

JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. Go check the README.md file to see how to use it.

JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. Go check the README.md file to see how to use it.

JCLR JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. To start using it, go to the

Aug 21, 2021

TransitScheduler - a command line tool that can read .json data formulated for tracking transit patterns to a multithreaded concurrent simulation of passengers boarding and unboarding trains that constantly move to the next station on the line. The trick here, is that two trains cannot occupy the same station at any time.

TransitScheduler - a command line tool that can read .json data formulated for tracking transit patterns to a multithreaded concurrent simulation of passengers boarding and unboarding trains that constantly move to the next station on the line. The trick here, is that two trains cannot occupy the same station at any time.

Dec 2, 2022

A command-line tool to securely encrypt passwords and notes using AES encryption.

Treasury A command-line tool to securely encrypt passwords and notes using AES encryption. Installation Usage Technology Built solely in Java Picocli

Oct 17, 2022

AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate

AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate

A command line tool to translate JSON files using AWS Translate.

May 30, 2022

Annotation/Reflection Based Bukkit Command API. Containing many features such as help-service, command providers, tab completion, and many more!

CommandAPI Annotation/Reflection Based Command API that just does what you want it to do without any problems. Importing Maven repository id

Jun 13, 2022

Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

Nov 26, 2022

A command line parser generator

jbock is a command line parser that works similar to airline and picocli. While most of these other tools scan for annotations at runtime, jbock is an

Dec 13, 2022

Command line parsing framework for Java

JCommander This is an annotation based parameter parsing framework for Java 8. Here is a quick example: public class JCommanderTest { @Parameter

Dec 29, 2022

The SDKMAN! Command Line Interface

SDKMAN! CLI The Software Development Kit Manager Command Line Interface SDKMAN is a tool for managing parallel Versions of multiple Software Developme

Jan 4, 2023

Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

Jan 6, 2023

A command line client for Kafka Connect

kcctl -- A CLI for Apache Kafka Connect This project is a command-line client for Kafka Connect. Relying on the idioms and semantics of kubectl, it al

Dec 19, 2022

A command line client for Kafka Connect

A command line client for Kafka Connect

🧸 kcctl – Your Cuddly CLI for Apache Kafka Connect This project is a command-line client for Kafka Connect. Relying on the idioms and semantics of ku

Dec 19, 2022

Command-line and graphical implementations of 2048 game and solvers.

2048 This is a simple 2048 game implemented both as a command-line interface and a graphical Java applet, with a couple of basic auto-solving algorith

Sep 25, 2022
Comments
  • Adjust default SocketTimeOut to allow large bulk processing to complete

    Adjust default SocketTimeOut to allow large bulk processing to complete

    What does this PR do?

    Atlassian has hard-coded a 20 second socket timeout in their HttpClientOptions and do not allow the user to specify / modify them during the creatioin of the REST client.

    This PR override sthe default SocketTimeOut with 60 minutes to allow bulk processing to complete without a SocketTimeoutException by making the client factory configurable (allow custom http client options)

    opened by rzo1 0
  • add jbang catalog and docs

    add jbang catalog and docs

    I spotted the shaded jar so made a jbang catalog that will pick up the LATEST (wether local snapshot or latest in maven repo).

    You can change it to RELEASE if you want snapshots to be ignored, of set it to specific version number dependent on what you want jbang jamira@tomitribe/jamira to do.

    btw. you can also instead put the alias in a repo called tomitribe/jbang-catalog and then it would just be jbang jamira@tomitribe

    opened by maxandersen 0
  • PoC: Running Jamira as native binary via Quarkus and GraalVM

    PoC: Running Jamira as native binary via Quarkus and GraalVM

    Hey @dblevins, as discussed here's a quick stab at running Jamira as a native binary, via Quarkus and GraalVM. You could do this solely with GraalVM of course, but Quarkus takes care of a lot of the required configuration already, so it was much easier for me to do it that way. This is really just a quick draft / proof-of-concept, but it shows what's doable.

    jamira_native

    opened by gunnarmorling 1
Owner
Tomitribe
Experts of Tomcat and Java EE - Champion of Open Source Software!
Tomitribe
AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate

A command line tool to translate JSON files using AWS Translate.

Marc Guillem 0 May 30, 2022
Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

null 847 Nov 26, 2022
A command line parser generator

jbock is a command line parser that works similar to airline and picocli. While most of these other tools scan for annotations at runtime, jbock is an

H90 73 Dec 13, 2022
Command line parsing framework for Java

JCommander This is an annotation based parameter parsing framework for Java 8. Here is a quick example: public class JCommanderTest { @Parameter

Cedric Beust 1.8k Dec 29, 2022
DeV Tools - Swiss Army Knife of command line utilities

dvt aims to bundle all small utilities used by developers (typically a mix of cli and online tools) into one binary that you can simply use in the console. No need for complex pipe-ing, copy-pasting on different sites or keep installing cli utilities for every need.

Madalin Ilie 13 Sep 15, 2022
Wrapper around ping command for Windows and MacOS

Wrapper around ping command for Windows and MacOS. Extended with functionality to intercept results provided by the ping command output (latency, ttl and etc.)

Vladislav Kozlov 1 Jan 6, 2022
Annotation-based command framework for Minestom

Minestand Annotation-based command framework for Minestom Advantages over other frameworks Minestand works by converting your classes into Minestom co

null 6 Aug 27, 2022
Several implementations of a text table, originally using ASCII and UTF-8 characters for borders.

ASCII Table ASCII table - A simple tool to format tables with various row/column options for indentation, indentation character, alignment, padding (l

Sven van der Meer 415 Dec 26, 2022
Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.

Description Jansi is a small java library that allows you to use ANSI escape codes to format your console output which works even on Windows. It also

FuseSource 955 Dec 28, 2022