Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backport): exclude headref from found target branches
This case is relevant where the target_branches input is used to select the target branches, and the original pull request's headref is part of it. For example, consider selecting all feature branches `feature/*` as target_branches. Glob patterns are not supported yet, but users can find these with an additional step in their workflow: ``` run: | branches=$(git branch --list --all | grep 'origin/feature/' | cut -c 18- ) space_delimited=${branches//$'\n'/ } echo "BRANCHES=${space_delimited}" >> $GITHUB_OUTPUT ``` Note that such a step requires a deep checkout `depth=0`. But when users do this, they might encounter the feature branch they just merged, the merged branch that triggered the backport-action. By excluding it now, we can better support this case. In addition, it will help support glob patterns in the target_branches input in the future. (cherry picked from commit 151736d)
- Loading branch information