Skip to content

Enable Update PR base branch through API #11552

Closed
@blaggacao

Description

@blaggacao

func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) {

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

type EditPullRequestOption struct {
Title string `json:"title"`
Body string `json:"body"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
Milestone int64 `json:"milestone"`
Labels []int64 `json:"labels"`
State *string `json:"state"`
// swagger:strfmt date-time
Deadline *time.Time `json:"due_date"`
RemoveDeadline *bool `json:"unset_due_date"`
}

This is required for full git-town support git-town/git-town#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions