You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-12 22:21:40 +02:00
Dedup code and migrate away from deprecated funcs (#1141)
Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@ -17,7 +17,7 @@ package coding
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
@ -94,7 +94,7 @@ type MergeRequestHook struct {
|
||||
}
|
||||
|
||||
func parseHook(r *http.Request) (*model.Repo, *model.Build, error) {
|
||||
raw, err := ioutil.ReadAll(r.Body)
|
||||
raw, err := io.ReadAll(r.Body)
|
||||
defer r.Body.Close()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
Reference in New Issue
Block a user