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:
committed by
GitHub
parent
aa5d3c1f52
commit
4ae623cd65
25
cmd/main.go
25
cmd/main.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user