Skip to content

Commit

Permalink
fix manual webhook (koderover#2802)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zhao <[email protected]>
  • Loading branch information
PetrusZ authored Jul 5, 2023
1 parent 8a967f5 commit 242386f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,12 @@ func UpdateWebhookForWorkflowV4(workflowName string, input *commonmodels.Workflo
return e.ErrUpdateWebhook.AddDesc(errMsg)
}

if !input.IsManual {
if !existHook.IsManual {
if err := deleteGerritWebhook(existHook.MainRepo, workflowName); err != nil {
logger.Errorf("delete gerrit webhook failed: %v", err)
}
}
if !input.IsManual {
if err := createGerritWebhook(input.MainRepo, workflowName); err != nil {
logger.Errorf("create gerrit webhook failed: %v", err)
}
Expand Down

0 comments on commit 242386f

Please sign in to comment.