Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Command "merge-with-parent" should merge with destination branch on PR when available #27

Open
dsayling opened this issue Feb 5, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dsayling
Copy link

dsayling commented Feb 5, 2021

https://circleci.com/developer/orbs/orb/circleci/build-tools#commands-merge-with-parent

Currently, the command only supports merging with the parent branch (based on the history of the current branch) or a branch specified by the existing parameter. However, this is not ideal when a PR is trying to merge to an indirect parent branch.

This could be implemented by adding an additional parameter, like apply_pr_dest that will attempt to find the destination branch in the PR via the GitHub API and then do the appropriate pull/merge. In the event the flag is set and no destination branch is available (e.g. there's not a PR implying the destination branch) we could use the existing mechanism to find the parent branch.

@gmemstr gmemstr added the enhancement New feature or request label Feb 12, 2021
@gmemstr
Copy link
Contributor

gmemstr commented Feb 16, 2021

This might prove a little limiting/brittle using the GitHub API (what if the project is from Bitbucket?). While I agree this is something we should look into building, I'm not sure what the best approach would be short of building in queries for both provider APIs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants