This API method, together with it's implementation in https://gitea.com/gitea/go-sdk should implement mutating the base
branch just as available on the UI, based on adding this field into the following struct
https://github.com/go-gitea/gitea/blob/88fe7b5a720365e5c8f0a347730f895263465311/modules/structs/pull.go#L82-L93
This is required for full git-town support https://github.com/git-town/git-town/issues/1451 since git town extensively uses branch hierarchy: if the an ancestor get's merged, all it's children branches must be reassigned to the ancestor's target merge branch.
@blaggacao If I can remember correctly UI dont support this
and why exactly do you need this?
you can Create/Update/Close/Merge a Pull via API ...
I just checked, in UI you can do this.
The use case is the following:
As colleague B, I want to complement colleague A with a sub-feature on his feature branch fbA
, so I'm working on sub-feature-branch sfbB
based off fbA
.
Since, I'm a good dev citizen in my team, I opened a WIP branch early on with the intent to merge into fbA
, so everybody could ealy track changes and advancements.
Now, colleague A's feature branch fbA
was accepted into master, but my lower priority sfbB
didn't make it in time and I'm still developing.
Result: my target branch is gone, therefore my PR would need to be retargeted to master
.
Note: nesting is not limited to just one level, if it's a big feature in the making.
git town
has first class API support in github for this workflow. In big teams, such as where git town is used, this is a not so uncommon occurrence.
@kevgo did I miss something?
I'm in the process of adding gitea support to git town
to close the gap for self-hosters, like me.
@blaggacao sorry didnt noticed this feature exist, since it exist on UI it is relatifely easy to do so via API
@blaggacao -> #11666
Another use case is described here: developing a complex feature as a series of branches, each one implementing one change and potentially being reviewed by different people.
@6543 Thanks for the quick effort
@kevgo Thanks for the good read
@6543 Once this is closed, should I open a follow up issue in https://gitea.com/gitea/go-sdk ?
https://github.com/git-town/git-town/pull/1518 has been merged, gitea is no supported in git town, still awaiting to get this closed asap!
https://gitea.com/gitea/go-sdk/pulls/353 has been merged too! Nice
So we are waiting for https://github.com/go-gitea/gitea/pull/11666 ... :hourglass:
Wondeful, and thank you for retargeting to 1.12.0 !
Most helpful comment
So we are waiting for https://github.com/go-gitea/gitea/pull/11666 ... :hourglass: