Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherrypick: try to create all picks and return aggregate error #21888

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions prow/external-plugins/cherrypicker/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ func (s *Server) handlePullRequest(l *logrus.Entry, pre github.PullRequestEvent)
// Handle multiple comments serially. Make sure to filter out
// comments targeting the same branch.
handledBranches := make(map[string]bool)
var errs []error
for requestor, branches := range requestorToComments {
for targetBranch, ic := range branches {
if handledBranches[targetBranch] {
Expand All @@ -369,12 +370,11 @@ func (s *Server) handlePullRequest(l *logrus.Entry, pre github.PullRequestEvent)
l.Debug("Cherrypick request.")
err := s.handle(l, requestor, ic, org, repo, targetBranch, title, body, num)
if err != nil {
l.WithError(err).Error("failed to create cherrypick")
return err
errs = append(errs, fmt.Errorf("failed to create cherrypick: %w", err))
}
}
}
return nil
return utilerrors.NewAggregate(errs)
}

var cherryPickBranchFmt = "cherry-pick-%d-to-%s"
Expand Down