Skip to content

madrisan/jira-create-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create new Jira issues at command-line

Release Status Codacy Badge Code Climate Total alerts Language grade: Python

A Python script for creating new Jira issues (a task by default) at command-line.

System Requirements

This script requires Python 3 and the jira-python library to be installed.

Configuration

First the configuration file needs to be customized.

config:
  jira_ca_bundle: /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
  jira_default_assignee: me
  jira_default_project_id: 00001
  jira_password: 'TXlQQHNzdzByZA=='
  jira_server: https://jira.example.com
  jira_user: jira_login_name
  user_issue_type:
    infra:
      labels:
        - "Infrastructure"
    ci:
      jira_project_id: 00002
      labels:
        - "CI"
        - "Development"

The password must is masked using a standard base64 encoding:

$ python3
Python 3.7.6 (default, Jan 30 2020, 09:44:41)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import base64
>>> print(base64.b64encode("MyP@ssw0rd".encode("utf-8")))
b'TXlQQHNzdzByZA=='
>>> exit()

Usage

Here's an example of usage of the front-end script.

./jira_new_issue.py \
    --issue-type "ci" \
    --assignee "another.user" \
    --summary "This ia a new jira task" \
    --description "A longer description follows here..."

Optionally the command-line option --in-progress can be added, to switch the issue to the status In Progress.

Other scripts

  • jira_projects.py: print the list of the Jira Projects in tabular form (requires python3-tabulate).

About

Create new Jira issues at command-line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages