Skip to content

Commit ceac7b6

Browse files
author
WingLim
committed
docs: add comment for config params
1 parent 4643a65 commit ceac7b6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

webhook.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,47 @@ func init() {
3636

3737
// WebHook is the module configuration.
3838
type WebHook struct {
39+
// Git repository URL, supported http, https and ssh.
3940
Repository string `json:"repo,omitempty"`
41+
42+
// Path to clone and update repository.
4043
Path string `json:"path,omitempty"`
44+
45+
// Branch to pull.
46+
// Default to `main`.
4147
Branch string `json:"branch,omitempty"`
48+
49+
// Webhook type.
50+
// Default to `github`.
4251
Type string `json:"type,omitempty"`
52+
53+
// Secret to verify webhook request.
4354
Secret string `json:"secret,omitempty"`
55+
56+
// Depth for pull and fetch.
57+
// Default to `0`.
4458
Depth string `json:"depth,omitempty"`
59+
60+
// Enable recurse submodules.
4561
Submodule bool `json:"submodule,omitempty"`
62+
63+
// Command to run when repo initializes or receive a
64+
// correct webhook request.
4665
Command []string `json:"command,omitempty"`
66+
67+
// Path of private key, using to access git with ssh.
4768
Key string `json:"key,omitempty"`
69+
70+
// Password of private key.
4871
KeyPassword string `json:"key_password,omitempty"`
72+
73+
// Username for http auth.
4974
Username string `json:"username,omitempty"`
75+
76+
// Password for http auth.
5077
Password string `json:"password,omitempty"`
78+
79+
// GitHub personal access token.
5180
Token string `json:"token,omitempty"`
5281

5382
hook webhooks.HookService

0 commit comments

Comments
 (0)