Add Filtering, HealthCheck, Better Tests (#350)

feat: add filtering when choosing merge requests (#346)
feat: Add healthcheck (#345)
refactor: Move to gomock (#349)
feat: Makes the remote of the plugin configurable (#348)

This is a #MINOR release.
This commit is contained in:
Harrison (Harry) Cramer
2024-08-23 14:01:59 -04:00
committed by GitHub
parent aa5d3c1f52
commit 4ae623cd65
61 changed files with 2174 additions and 1082 deletions

View File

@@ -1,11 +1,36 @@
package main
import (
"encoding/json"
"log"
"os"
)
type PluginOptions struct {
GitlabUrl string `json:"gitlab_url"`
Port int `json:"port"`
AuthToken string `json:"auth_token"`
LogPath string `json:"log_path"`
Debug struct {
Request bool `json:"go_request"`
Response bool `json:"go_response"`
} `json:"debug"`
ConnectionSettings struct {
Insecure bool `json:"insecure"`
Remote string `json:"remote"`
} `json:"connection_settings"`
}
var pluginOptions PluginOptions
func main() {
log.SetFlags(0)
err := json.Unmarshal([]byte(os.Args[1]), &pluginOptions)
if err != nil {
log.Fatalf("Failure parsing plugin settings: %v", err)
}
gitInfo, err := extractGitInfo(RefreshProjectInfo, GetProjectUrlFromNativeGitCmd, GetCurrentBranchNameFromNativeGitCmd)
if err != nil {
log.Fatalf("Failure initializing plugin: %v", err)