aboutsummaryrefslogtreecommitdiff
path: root/cmd/hook.go
diff options
context:
space:
mode:
authorDanny Althoff <fibrefox@dynamicfiles.de>2017-03-12 18:43:05 +0100
committer无闻 <u@gogs.io>2017-03-12 13:43:05 -0400
commit44a6b6331630d301a4c97719b108846e5d6173cf (patch)
treea8c57ce0037f47a30cc94d99cad9e4b408f18622 /cmd/hook.go
parent5f058c3f071b5a754bdd5b556b49d678bf1477f1 (diff)
cmd/hook: fixed typo (#4280)
Diffstat (limited to 'cmd/hook.go')
-rw-r--r--cmd/hook.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/hook.go b/cmd/hook.go
index d395eb6a..c8448d5f 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -101,7 +101,7 @@ func runHookPreReceive(c *cli.Context) error {
}
// Whitelist users can bypass require pull request check
- bypassRequirePullReuqest := false
+ bypassRequirePullRequest := false
// Check if user is in whitelist when enabled
userID := com.StrTo(os.Getenv(http.ENV_AUTH_USER_ID)).MustInt64()
@@ -110,11 +110,11 @@ func runHookPreReceive(c *cli.Context) error {
fail(fmt.Sprintf("Branch '%s' is protected and you are not in the push whitelist", branchName), "")
}
- bypassRequirePullReuqest = true
+ bypassRequirePullRequest = true
}
// Check if branch allows direct push
- if !bypassRequirePullReuqest && protectBranch.RequirePullRequest {
+ if !bypassRequirePullRequest && protectBranch.RequirePullRequest {
fail(fmt.Sprintf("Branch '%s' is protected and commits must be merged through pull request", branchName), "")
}