Add Allow Maintainer Edits #509
|
@ -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
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user
pr.Index