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

Pick target branch from first commit's suggestedTargetBranches in non-interactive mode #493

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Pick target branch from first commit's suggestedTargetBranches in non-interactive mode #493

merged 2 commits into from
Apr 4, 2024

Conversation

karolkpl
Copy link
Contributor

@karolkpl karolkpl commented Mar 1, 2024

When using non-interactive mode (e.g. using backport-github-action) getTargetBranches() failed to find target branch when there are >1 commit in the PR to backport:

 "error": {
    "name": "BackportError",
    "errorContext": {
      "code": "no-branches-exception"
    }
  },
  "errorMessage": "There are no branches to backport to. Aborting."

Now it picks up target branch from first's commit suggestedTargetBranches. In backport-github-action every commit to backport has the same suggestedTargetBranches based on PR's labels.

Solves sorenlouv/backport-github-action#103

FYI @sorenlouv

@sorenlouv sorenlouv merged commit 35141ba into sorenlouv:main Apr 4, 2024
2 of 3 checks passed
@sorenlouv
Copy link
Owner

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants