insight-plugin

Introduction
insight-plugin is the insight plugin of devops-pipeflow written in Go.
Prerequisites
Run
version=latest make build
./bin/insight --config-file="$PWD"/config/config.yml
Usage
usage: insight --config-file=CONFIG-FILE [<flags>]
insight plugin
Flags:
--[no-]help Show context-sensitive help (also try --help-long
and --help-man).
--[no-]version Show application version.
--config-file=CONFIG-FILE Config file (.yml)
--log-level="INFO" Log level (DEBUG|INFO|WARN|ERROR)
Settings
insight-plugin parameters can be set in the directory config.
An example of configuration in config.yml:
apiVersion: v1
kind: insight
metadata:
name: insight
spec:
sights:
- name: buildSight
enable: true
- name: codeSight
enable: false
- name: gptSight
enable: false
repo:
url: 127.0.0.1:8080
user: user
pass: pass
review:
url: 127.0.0.1:8081
user: user
pass: pass
gpt:
url: 127.0.0.1:8082
user: user
pass: pass
Output
{
"sights": [
{
"name": "buildSight",
"sight": {
"file": "name",
"line": 1,
"type": "error",
"details": "text"
},
"repo": {
"project": "name",
"branch": "name",
"commit": "hash",
"committer": "name <name@example.com>",
"author": "name <name@example.com>",
"message": "base64",
"date": "2023-01-01T12:34:56+0800"
},
"review": {
"project": "name",
"branch": "name",
"change": 1,
"owner": "name <name@example.com>",
"author": "name <name@example.com>",
"message": "base64",
"date": "2023-01-01T12:34:56+0800"
}
}
]
}
sights.sight.type
: sight type
The sight type in sights.sight.type
should be one of below:
error
warn
info
License
Project License can be found here.
Reference