aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/hook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/structs/hook.go b/modules/structs/hook.go
index a10dd4281c..45ae94f985 100644
--- a/modules/structs/hook.go
+++ b/modules/structs/hook.go
@@ -338,7 +338,7 @@ func ParsePushHook(raw []byte) (*PushPayload, error) {
// Branch returns branch name from a payload
func (p *PushPayload) Branch() string {
- return strings.Replace(p.Ref, "refs/heads/", "", -1)
+ return strings.ReplaceAll(p.Ref, "refs/heads/", "")
}
// .___