support custom pipeline message (#3294)

Signed-off-by: zc <zc2638@qq.com>
pull/3317/head
zc 2023-04-28 21:56:13 +08:00 committed by GitHub
parent e351cf7095
commit bafaa40ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,7 @@ func HandleCreate(
name = chi.URLParam(r, "name")
sha = r.FormValue("commit")
branch = r.FormValue("branch")
message = r.FormValue("message")
user, _ = request.UserFrom(ctx)
)
@ -93,6 +94,9 @@ func HandleCreate(
Sender: user.Login,
Params: map[string]string{},
}
if len(message) > 0 {
hook.Message = message
}
for key, value := range r.URL.Query() {
if key == "access_token" ||