-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Labels
needs/areaIssue or PR needs to be labeled to indicate what parts of the code base are affectedIssue or PR needs to be labeled to indicate what parts of the code base are affectedneeds/kindIssue or PR needs to be labeled to clarify its natureIssue or PR needs to be labeled to clarify its natureneeds/priorityPriority has not yet been determined; a good signal that maintainers aren't fully committedPriority has not yet been determined; a good signal that maintainers aren't fully committed
Description
Description:
When using git-open-pr with generateTargetBranch: true, many temporary branches are created.
Currently, GitLab's project-level setting "Delete source branch by default" doesn't apply when PRs are created via API.
Proposed Solution:
Add a removeSourceBranch parameter to git-open-pr:
- uses: git-open-pr
config:
sourceBranch: ${{ outputs.push.branch }}
targetBranch: main
removeSourceBranch: true # ← NEW parameterThis would pass remove_source_branch: true to the GitLab/GitHub API when creating the MR/PR.
Use Case:
Avoiding branch explosion when using generateTargetBranch: true for promotion workflows.
API Support:
- GitLab API: https://docs.gitlab.com/ee/api/merge_requests.html#create-mr (
remove_source_branch) - GitHub API: Doesn't directly support this, but can use
auto_mergeworkaround
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs/areaIssue or PR needs to be labeled to indicate what parts of the code base are affectedIssue or PR needs to be labeled to indicate what parts of the code base are affectedneeds/kindIssue or PR needs to be labeled to clarify its natureIssue or PR needs to be labeled to clarify its natureneeds/priorityPriority has not yet been determined; a good signal that maintainers aren't fully committedPriority has not yet been determined; a good signal that maintainers aren't fully committed