Skip to main content

Jira Issues Auto Verification

Project description

jiav

This repository is a Proof of Concept.

Limitations And Words Of Caution

This tool is only tested against self-hosted (data center version) Jira.
I have no access to a cloud Jira instance.

Since this tool executes commands locally, we should avoid trusting public comments as much as possible.
It will default to scanning only private comments (regardless of the visibility group). It is possible to read from public comments if you understand the potential risk, this might cause to your systems.

The output of verification steps is also not uploaded as attachments by default because it is impossible to limit attachments' visibility, refer to JRASERVER-3893. It is possible to attach the output if you understand the potential risk, this might expose sensitive information.

General

jiav flow

Jira Issues Auto Verification.
This tool aims to provide an auto-verification framework for Jira issues.
Users provide a YAML-formatted comment in Jira issues, and the tool will execute it. On successful execution, the issue will move to the desired status.

Example of a manifest:

---
jiav:
  verified_status: "Done" # Status has to be present in the project workflow
  verification_steps:
    - name: Check line exists in file
      backend: line
      path: /path/to/file
      line: hello_world

jiav allows developers to build custom backends; refer to the documentation guide.
An example of a backends shipped externally:

  • jiav-backend-ansible this is a risky backend since it allows users to run arbitrary code. Be cautious when enabling it.
  • jiav-backend-command This is a risky backend since it allows users to run arbitrary code. Be cautious when enabling it.

Requirements

jiav requires Python >= 3.8.

Documentation

Visit https://jiav.readthedocs.io.

Installation

Install from remote:

pip3 install jiav

Install from the local repository:

pip3 install .

Usage

After installing this tool jiav command is available.

There are several sub-commands available, to view them execute jiav:

usage: jiav [-v | --version] [-d | --debug] <command> [<args>]

Global flags
  -v --version  prints version
  -d --debug   show debug

Available commands
  verify        Verifies issues
  list-backends    List available backends
  validate-manifest  Validate jiav manifest

Verify

Attempt to verify issues from a list of issues:

jiav --debug verify --jira='<JIRA_URL>' --access-token='<ACCESS_TOKEN>' --issue='<KEY-1>' --issue='<KEY-2>'

Attempt to verify issues from a JQL and output the result in JSON format:

jiav --debug verify --jira='<JIRA_URL>' --access-token='<ACCESS_TOKEN>' --query='issue = "KEY-1"' --format='json'

List backends

List installed backends:

jiav list-backends

Validate manifest

Validate jiav manifest from a file:

jiav —debug validate-manifest —from-file=/path/to/file

Contributing

All contributions are welcome!

To install in development mode, use poetry:

pip3 install poetry
poetry install --with=main,dev

If proposing new pull requests, please ensure that new/existing tests are passing:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jiav-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jiav-0.1.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file jiav-0.1.1.tar.gz.

File metadata

  • Download URL: jiav-0.1.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.9 Darwin/22.3.0

File hashes

Hashes for jiav-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5b3ae8dd2824b32a56ddbcf4bca7f6d5d3d6cba9a50791e017ac40e192ab76c8
MD5 1343251af551e74d4bd31103483a29bd
BLAKE2b-256 b5f770d3e77c4f464324f9f35ad4d7d43429347f08bb29990277dc38027a48ce

See more details on using hashes here.

File details

Details for the file jiav-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jiav-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.9 Darwin/22.3.0

File hashes

Hashes for jiav-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98fff5e4eb63de44056b69cdcd2f8c7bd522d16e0ebb05d946ec55ee28a57ca3
MD5 9c92c1b8a19fcfd9365dd8b76b6a805b
BLAKE2b-256 be178024277f9d2d304734a5aec19baf2e2ac9342d5c4bb9052dfe1088e017d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page