git-log-issue-finder

module
v0.0.0-...-bf9f4d5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT

README

Git Log Issue Finder (GLIF)

This small program is used to extract a list of Jira issues from the output of a git log. This require an already checked-out repository.

Version: 2.0.2

Content:

  1. Usage
  2. Pipeline Configuration
  3. Task Configuration
  4. Contact

Usage

While this program was designed with the idea of integrating it to a Concourse pipeline it can also be used a stand-alone command-line tool.

Let's start by looking at the '--help' command:

$> glif --help
  -force-fetch
        Force a 'git fetch' operation on the specified repository
  -repl
        Enter the Read-Eval-Print-Loop
  -script string
        The glif script file to execute
  -semver-latest
        script.DiffLatestSemver
  -semver-latest-builds
        script.DiffLatestSemverWithLatestBuilds
  -semver-latest-rcs
        script.DiffLatestSemverWithLatestRCs
  -tickets string
        The Jira tickets regex used to search the repo's log (default "*")

$> 

While the help command does not specify it, it's useful to note that every parameter can specified with one or two hyphen.

The 'script' parameter

This parameter is simple in itself as it's only a path to the script to be interpreted by glif. You can read the documentation of the glif scripts here glif doc and you can see examples here examples. In the examples you will also find more details about semver-latest, semver-latest-builds and semver-latest-rcs.

The 'tickets' parameter

The tickets parameter can be specified in the command line or it can be specified within the glif script. It represents the name of the Jira issues to match.

The following example assumes that you are working within the directory of your git repository. The most basic usage requires two (2) parameters; here's an example with the output:

$> glif --tickets="ABC,XYZ" --semver-latest
[ABC-001, ABC-007, XYZ-9246, ABC-045, ABC-0245, XYZ-007]
$> 

Pipeline Configuration

Now, here's an example of a Concourse job that uses git-log-issue-finder

jobs:
  - name: find-jira /* You can use whatever name you like */
    serial: true
    public: false
    plan: 
      - in_parallel:
        - get: <GIT_REPOSITORY_RESOURCE>
          /* Add 'passed' and/or 'trigger' configuration if needed */
      - task: git-log-issue-finder
        file: <PATH_TO_YML_TASK_CONFIGURATION>  

Task Configuration

To properly configure git-log-issue-finder, it should be done as a task and not directly as a pipeline resource.

Here's what the task's yaml file should look like

#TODO

...

And now here's what the shell script should look like:

#!/bin/bash

set -e

# TODO

Contact

If you have any questions/comments please send them at: turns.coffee.into.scripts@gmail.com.

You may also submit pull-requests on github at: https://github.com/TurnsCoffeeIntoScripts/git-log-issue-finder to the branch 'master'.

Directories

Path Synopsis
cmd
pkg
configuration
Package configuration is where all program's input flags are specified.
Package configuration is where all program's input flags are specified.
helpers
Package helpers provides simple helper to deal with various nil events and slice objects
Package helpers provides simple helper to deal with various nil events and slice objects
interpreter/ast
Package ast defines the various building blocks of the interpreter's abstract syntax tree (ast)
Package ast defines the various building blocks of the interpreter's abstract syntax tree (ast)
interpreter/evaluator
Package evaluator contains the evaluating functions to process the different ast.Node
Package evaluator contains the evaluating functions to process the different ast.Node
interpreter/gitoken
Package gitoken (Glif Interpreter TOKEN) defines the list of recognized tokens
Package gitoken (Glif Interpreter TOKEN) defines the list of recognized tokens
interpreter/lexer
Package lexer contains the definition of the lexer element of the glif interpreter
Package lexer contains the definition of the lexer element of the glif interpreter
interpreter/object
Package object contains the various implementations of the object.Object interface List of the supported object
Package object contains the various implementations of the object.Object interface List of the supported object
interpreter/parser
Package parser contains the definition of the parser element of the glif interpreter.
Package parser contains the definition of the parser element of the glif interpreter.
interpreter/repl
Package repl is for the read-eval-print-loop
Package repl is for the read-eval-print-loop
scl
Package scl is an abstraction layer on top of the go-git library.
Package scl is an abstraction layer on top of the go-git library.
script
Package script contains the preedefined scripts that are binded to the input flags
Package script contains the preedefined scripts that are binded to the input flags
version
Package version specifies the version informations
Package version specifies the version informations

Jump to

Keyboard shortcuts

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