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

[Breaking] Use merge method to cherry-pick by default #420

Merged
merged 7 commits into from
May 26, 2024

Conversation

korthout
Copy link
Owner

@korthout korthout commented May 26, 2024

Important

This is a breaking change in behavior. Workflow changes are not required but may be recommended. We will bump the major version in the upcoming release.

This pull request changes the default behavior of the action to determine which commits are cherry-picked.

Previously, the action cherry-picked the commits from the pull request. Specifically, those reachable from the pull request's head and not reachable from the pull request's base.

From now on, the action cherry-picks the commits based on the method used to merge the pull request by default.

  • For "Squash and merge", the action cherry-picks the squashed commit.
  • For "Rebase and merge", the action cherry-picks the rebased commits.
  • For "Merged as a merge commit", the action cherry-picks the commits from the pull request.

This behavior was previously available via the experimental detect_merge_method input, introduced in #399. This experimental input has been deprecated and removed from the documentation. Workflows that specify a value for a deprecated experimental input will see an additional warning in the logs. We recommend that users remove the experimental detect_merge_method input from their workflows.

Users can return to the previous behavior by setting the cherry_picking input to pull_request_head. The new default behavior can be explicitly enabled by setting the cherry_picking input to auto.

This will replace the experimental detect_merge_method input.
The experimental input is replaced with a new non-experimental input
`cherry_picking`. This changes the behavior, as the new input has a
different default behavior.

From now on commits are cherry-picked based on the merge method by
default. It's still possible to cherry-pick the commits from the pull
request itself, by changing the cherry_picking input.
This experimental input is no longer used, as it is replaced by the
non-experimental `cherry_picking` input.

To avoid requiring workflow changes immediately, we can warn users about
their usage of deprecated experimental inputs.
This input is removed and replaced by the non-experimental
`cherry_picking` input.
A breaking changes was made, that requires us to bump the major version.
@korthout korthout merged commit 5ff61e2 into main May 26, 2024
1 check passed
@korthout korthout deleted the korthout-elevate-detect-merge-method-input branch May 26, 2024 11:27
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.

1 participant