Prevent bot from interpreting unknown actions
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
parent
e28e524456
commit
ae55eaf97c
|
@ -59,6 +59,10 @@ func (w *CommentWebhook) Validate() error {
|
|||
return fmt.Errorf("ignore hook for non-bot action comment")
|
||||
}
|
||||
|
||||
if w.Comment.Body != string(actions.ActionReview) {
|
||||
return fmt.Errorf("ignore hook for unknown bot action")
|
||||
}
|
||||
|
||||
w.ConfiguredProject = settings.Projects[pIdx]
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue