Add Allow Maintainer Edits #509

Merged
6543 merged 12 commits from 6543/tea:add_allow-maintainer-edits into main 2022-09-27 15:36:36 +00:00
Showing only changes of commit f64cdbef60 - Show all commits

View File

@ -70,9 +70,10 @@ func CreatePull(ctx *context.TeaContext, base, head string, allowMaintainerEdits
return fmt.Errorf("could not create PR from %s to %s:%s: %s", head, ctx.Owner, base, err)
}
// TODO: if pr.AllowMaintainerEdit != allowMaintainerEdits {
if allowMaintainerEdits {
6543 marked this conversation as resolved Outdated
Outdated
Review

pr.Index

pr.Index
pr, _, err = client.EditPullRequest(ctx.Owner, ctx.Repo, pr.ID, gitea.EditPullRequestOption{
AllowMaintainerEdit: gitea.OptionalBool(true),
pr, _, err = client.EditPullRequest(ctx.Owner, ctx.Repo, pr.Index, gitea.EditPullRequestOption{
AllowMaintainerEdit: gitea.OptionalBool(allowMaintainerEdits),
})
if err != nil {
return fmt.Errorf("could not enable maintainer edit on pull: %v", err)