JiraTools
Some simple API functions and command-line tools for interacting with JIRA.
Setup
All the tools and functions here need your specific information from a jira.config file in your home directory, so you have to do this setup before anything can be used:
run jira-example-config --install to install an example config file (you can run it without --install to see the contents of what would be installed. (If you already have a jira.config in your home directory, this script will not overwrite it.)
Fill out the values in the config file with your appropriate data (see the comments in that file for guidance).
Command-Line Tools
jira-example-config can install an example config file for you, see above.
jira-make-linked-issue makes a new JIRA issue that is linked to an exisiting issue; the new issue’s fields can be set from defaults in your jira.config or those values can be overridden on the command line. See --help on this command for all the command line options, and the comments in jira.config for setting the defaults.
jira-add-comment adds a comment to a JIRA issue. The jira.config file is needed to authenticate to JIRA. No other data from the jira.config file is used by this commmand. See --help on this command for details. You can also use - as your comment and jira-add-comment will read the comment from stdin instead. Note that if you use - interactively, you cannot edit your comment before it is posted.
jira-search-issues searches JIRA using your JQL query. The jira.config file is needed to authenticate to JIRA. You may set a default integer max_results value as MAX_RESULT_COUNT in jira.config, or set a value of -1 for no max by default. See --help on this command for details.
jira-link-issues creates a link between two issues. The jira.config is needed to authenticate to JIRA.
jira-update-assignee changes the assignee of the JIRA to the provided user.
Error Logging Tools
These functions are designed to be used within Python code to assist with various error commenting logic.
jiratools.error_logging.add_jira_error_comment can take an error and add a formatted comment to a relevant JIRA issue
jiratools.error_logging.add_jira_comment_with_table can add a comment with a formatted data table to a jira issue
jiratools.error_logging.update_jira_for_errors can check found errors against a list of JIRA issues and add comments to any JIRA issues where a match is found.
Formatting Tools
These functions are designed to be used within Python code to assist with comment formatting logic.
jiratools.formatting.format_autoupdate_jira_msg takes a message body and add relevant title/header data
jiratools.formatting.format_as_jira_table takes headers and table rows and formats a JIRA-style table
Examples
jira-add-comment JIRA-1234 "Work in Progress. PR delayed by network problems." – Add the comment to JIRA-1234 using the user/password from your jira.config Note that the comment has to be just one command line argument surrounded by quotes if it contains spaces, etc.
jira-make-linked-issue JIRA-1234 – will create a JIRA in your TEST_PROJECT to test JIRA-1234, and link the two, assigning it to you and adding any watchers specified in your default watchers list.
jira-make-linked-issue JIRA-1234 --project OTHER – will create a test JIRA as above, but in OTHER
jira-make-linked-issue JIRA-1234 --user bobm5523 – will create the JIRA as above, but assign to bobm5523
jira-make-linked-issue JIRA-1234 -w sall9987 -w benj4444 – will create the JIRA and assign sall9987 and benj4444 as watchers instead of your default watcher list
jira-search-issues "project=ABC AND summary ~ client" – will print a list of links and titles for issues in project ABC that include the word “client” in the summary.
jira-link-issues ABC-123 XYZ-456 – will create a link such that ABC-123 relates to XYZ-456
Metadata
Release files for jiratools 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jiratools-2.1.0.tar.gz | 10.4 kB | Without provenance | Details for jiratools-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jiratools-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for jiratools-2.1.0-py3-none-any.whl |
Total release size: 20.6 kB
Release files / jiratools-2.1.0.tar.gz
| Download URL | jiratools-2.1.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd5a9011003462b59df08bd8664a013759e88fcd9a82aa03bfcc4f6e43af18e
|
|
BLAKE2b-256 checksum How to use checksums |
622fd49a513da3bd5c3a3a6a9c340777f0dfc027cb82448b301ce0e97f2c57bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.6.7 Linux/4.15.0-1077-gcp
|
Release files / jiratools-2.1.0-py3-none-any.whl
| Download URL | jiratools-2.1.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df77a34b162a12d012bf860355c73faeb797bbc7dc612f2da573099fe0f8eab9
|
|
BLAKE2b-256 checksum How to use checksums |
e81c7f2d85015b53d8f062e1443906529a25a3aab581ea663fde9068a0854f9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.6.7 Linux/4.15.0-1077-gcp
|
Security for jiratools 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.