You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Fprintf(os.Stderr, "\t-log-level value (default: 'info') Log level [$LOG_LEVEL]\n")
75
-
fmt.Fprintf(os.Stderr, "\t-config value (default: '/etc/git-mirror/config.yaml') Absolute path to the config file. [$GIT_MIRROR_CONFIG]\n")
76
-
fmt.Fprintf(os.Stderr, "\t-watch-config value (default: true) watch config for changes and reload when changes encountered. [$GIT_MIRROR_WATCH_CONFIG]\n")
77
-
fmt.Fprintf(os.Stderr, "\t-http-bind-address value (default: ':9001') The address the web server binds to. [$GIT_MIRROR_HTTP_BIND]\n")
78
-
fmt.Fprintf(os.Stderr, "\t-one-time (default: 'false') Exit after first mirror. [$GIT_MIRROR_ONE_TIME]\n")
79
-
fmt.Fprintf(os.Stderr, "\t-github-webhook-secret (default: '') The Github webhook secret used to validate payload [$GITHUB_WEBHOOK_SECRET]\n")
80
-
fmt.Fprintf(os.Stderr, "\t-github-webhook-path (default: '/github-webhook') The path on which webserver will receive github webhook events [$GITHUB_WEBHOOK_PATH]\n")
74
+
fmt.Fprintf(os.Stderr, "\t-log-level value (default: 'info') Log level [$LOG_LEVEL]\n")
75
+
fmt.Fprintf(os.Stderr, "\t-config value (default: '/etc/git-mirror/config.yaml') Absolute path to the config file. [$GIT_MIRROR_CONFIG]\n")
76
+
fmt.Fprintf(os.Stderr, "\t-watch-config value (default: true) watch config for changes and reload when changes encountered. [$GIT_MIRROR_WATCH_CONFIG]\n")
77
+
fmt.Fprintf(os.Stderr, "\t-http-bind-address value (default: ':9001') The address the web server binds to. [$GIT_MIRROR_HTTP_BIND]\n")
78
+
fmt.Fprintf(os.Stderr, "\t-one-time (default: 'false') Exit after first mirror. [$GIT_MIRROR_ONE_TIME]\n")
79
+
fmt.Fprintf(os.Stderr, "\t-github-webhook-secret (default: '') The Github webhook secret used to validate payload [$GITHUB_WEBHOOK_SECRET]\n")
80
+
fmt.Fprintf(os.Stderr, "\t-github-skip-sig-validation (default: false) If set github webhook signature validation will be skipped [$GITHUB_SKIP_SIG_VALIDATION]\n")
81
+
fmt.Fprintf(os.Stderr, "\t-github-webhook-path (default: '/github-webhook') The path on which webserver will receive github webhook events [$GITHUB_WEBHOOK_PATH]\n")
81
82
82
83
os.Exit(2)
83
84
}
@@ -90,6 +91,7 @@ func main() {
90
91
flagWatchConfig:=flag.Bool("watch-config", envBool("GIT_MIRROR_WATCH_CONFIG", true), "watch config for changes and reload when changes encountered")
91
92
flagHttpBind:=flag.String("http-bind-address", envString("GIT_MIRROR_HTTP_BIND", ":9001"), "The address the web server binds to")
92
93
flagGithubWhSecret:=flag.String("github-webhook-secret", envString("GITHUB_WEBHOOK_SECRET", ""), "The Github webhook secret used to validate payload")
94
+
flagGithubWhSkipValidation:=flag.Bool("github-skip-sig-validation", envBool("GITHUB_SKIP_SIG_VALIDATION", false), "If set github webhook signature validation will be skipped")
93
95
flagGithubWhPath:=flag.String("github-webhook-path", envString("GITHUB_WEBHOOK_PATH", "/github-webhook"), "The path on which webserver will receive github webhook events")
94
96
95
97
flagOneTime:=flag.Bool("one-time", envBool("GIT_MIRROR_ONE_TIME", false), "Exit after first mirror")
0 commit comments