jirrit

command module
v0.6.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

README

jirrit

Command line parameters

  • -h help message.
  • -ver / -version version info.
  • -v logging enabled and more interactions. Most query actions need logging.
  • -vv verbose messages.
  • -vvv verbose messages with network I/O.
  • -getsvrcfg prints configured servers.
  • -setsvrcfg asks to configure servers.
  • -cfg string provide a config file. It defaults to jirrit.xml under current dir or home dir.
  • -log string provide a log file. It defaults to jirrit.log under current dir.
  • -reverse reverse output results.
  • -r string provide a server's name
  • -a string provide an action's name.
  • -i string provide an issue ID or assignee. Some actions are subjected to a certain issue or issues. Enter it when running or as a command param.
  • -b string provide a branch.
  • -c string provide a component or a comment.
  • -f string provide a file/dir to save attachment as.
  • -hd string provide an new assignee for issue transfer, or revision for cherrypicks.
  • -k string provide a key, a description, a build or a solution.
  • -l string provide a linked issue.
  • -p string provide a project.
  • -s []string provide multiple parts to be used with field configurations, or one complete solution for closure in bugzilla.
  • -w string provide JIRA ID to store. To be used together with "-r".
  • -z int provide max number of buils to show for Jenkins.

-r and -a are meant to be used together to avoid user input.

Config xml

As shown in example.xml, root name is jirrit.
log file name can be configured.
eztoolscfg file name of eztools configuration, for auto update.
appup configuration for auto update. interval defaults to 7 days.
user overall user name.
pass overall password.

server types are JIRA, Gerrit, Bugzilla and Jenkins.
names need to be unique within each type.
url is needed for every server.
pass can be provided, if not same as overall config.
ip is optional for a server for refernce only.
user is optional if a server needs a different user name than the overall configuration.

Three kinds of passwords can be configured.

  • basic is the plain text password, or generated by a Jenkins server.
  • plain is coded text password. Tools such as Postman can show this in the output message.
  • digest is generated by a Gerrit server.
  • token is generated by a Bugzilla server.

For Jira servers, there may be more to config for issue closure with some fields filled.

  • project is the previous X part of an ID X-0, used. This is maintained by the program. Usually, these fields can be seen in an issue's detail.
  • rejectrsn is the field name for reject reasons.
  • testpre is the field name for test condition.
  • teststep is the field name for test steps.
  • testexp is the field name for test expectation.
  • state are state names. Supported attributes as types:
    • not open issues with states other than these will be listed as open issues
    • transition reject transitions with these names as steps are tried in order to reject an issue
    • transition close transitions with these names as steps are tried in order to close an issue

For Bugzilla servers, there may be more to config for state transitions with some fields filled.

  • solution is a set of solution strings. Each will be asked to append more info and the set will be concatenated as one string to server.
  • state are state names. Supported attributes as types:
    • not open issues with states other than these will be listed as open issues
    • transition reject transitions with these names as steps are tried in order to reject an issue. If multiple, comment, if provided, is added during all steps.
    • transition close transitions with these names as steps are tried in order to close an issue. If multiple, comment, if provided, is added during all steps.
    • resolved are possible values for transition.
    • rejected are possible values for transition.

Actions

  • Jira

    • transfer a case to someone
    • move status of a case
    • show details of a case
    • list comments of a case
    • add a comment to a case
    • delete a comment from a case
    • change a comment from a case
    • list my open cases
    • link a case to another
    • reject a case from any known statuses
    • close a case to resolved from any known statuses (change it to resolved)
    • close a case with default design as steps (change it to resolved, adding test condition="none", steps="default design" and expectation="none")
    • close a case with general requirement as steps (change it to resolved, adding test condition="none", steps="general requirement" and expectation="none")
    • list watchers of a case
    • check whether watching a case
    • watch a case
    • unwatch a case
    • add a file to a case
    • list files attached to a case
    • get a file to a case (specify a full path, a file name under current dir, or a dir in existence, without current file under it. If no file name provided, the original file name of the attachment will be taken. If destination file already exists, this will fail.)
    • remove a file attached to a case
  • Gerrit

    • list merged submits of someone
    • list my open submits
    • list sb.'s open submits
    • list all my open revisions/commits
    • list all open submits
    • show details of a submit (by commit ID or change ID)
    • show reviewers of a submit
    • show current revision/commit of a submit
    • rebase a submit
    • merge a submit
    • add scores to a submit (Code-Review +2, Verified +1, and Manual-Testing, or other field as configured, +1)
    • add scores, wait for it to be mergable and merge a submit
    • add scores, wait for it to be mergable and merge sb.'s submits
    • abandon all my open submits
    • abandon a submit
    • cherry pick all my open submits
    • cherry pick a submit
    • revert a submit
    • list files of a submit
    • list files of a submit by revision
    • list config of a project
  • Jenkins

    • list jobs
    • show details of a build
    • get log of a build
    • list builds

Input grammar

  • For gerrit, in most cases, input an ID that can make it distinguished, such as commit.
    Be aware Change IDs are same among cherrypicks.
  • For most prompts, [Enter] without default value as shown is taken as an invalid input and return to previous menu.
  • If previous value is in the format of ".+-[0-9]+", or X-0, to be easier to read, and the new input is just a number, it will be taken as the number replacing the previous number part.
  • In some cases, input support multiple lines. End an input with "" to indicate it is a line of multiple ones and continue inputting.
  • In some cases,
    Input ".+-[0-9]+[,][,][0-9]+", or "X-0,,1", or "0,,1", to be easier to read, to batch process all the ID's between, and including, the two numbers.
    Input "X-0,Y-1,2", to be easier to read, to batch process all the ID's listed, adding previous letter part. ("X-0,Y-1,2" will result in processing X-0, Y-1 and Y-2.)

screenshot

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL