kubernetes-sigs / prow

Prow is a Kubernetes based CI/CD system developed to serve the Kubernetes community. This repository contains Prow source code and Hugo sources for Prow documentation site.
https://docs.prow.k8s.io
Apache License 2.0
129 stars 99 forks source link

Fix cherrypicking to multiple branches in a single comment after a PR was merged #305

Closed xrstf closed 3 weeks ago

xrstf commented 1 month ago

Previously, the cherrypicker's handleIssueComment() function would only ever process the first branch.

For unmerged PRs this leads to surprising replies that only acknowledge the first branch. However once a PR is merged, the plugin would correctly detect all cherrypick commands and create all desired PRs.

For merged PRs however there is no PR-merged handling and so all but the first cherrypicks get dropped.

This PR adjusts the issue comment handling to also loop over all desired branches and create all PRs. I added a new unit test to verify that functionality.

netlify[bot] commented 1 month ago

Deploy Preview for k8s-prow ready!

Name Link
Latest commit 754d732be32a2625c446b2cc92767d64a5802e2a
Latest deploy log https://app.netlify.com/sites/k8s-prow/deploys/671fa303f865c900080c0dbb
Deploy Preview https://deploy-preview-305--k8s-prow.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

petr-muller commented 1 month ago

/cc

xrstf commented 3 weeks ago

@petr-muller Addressed all your comments :-)

k8s-ci-robot commented 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller, xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/prow/blob/main/OWNERS)~~ [petr-muller] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment