cmd/hook: fixed typo (#4280)
parent
5f058c3f07
commit
44a6b63316
|
@ -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), "")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue