Add Allow Maintainer Edits #509
|
@ -26,8 +26,7 @@ func PullDetails(pr *gitea.PullRequest, reviews []*gitea.PullReview, ciStatus *g
|
|||
state := formatPRState(pr)
|
||||
|
||||
out := fmt.Sprintf(
|
||||
// TODO: "# #%d %s (%s)\n@%s created %s\t**%s** <- **%s**\n\nAllow maintainer to edit: %v\n\n%s\n\n",
|
||||
"# #%d %s (%s)\n@%s created %s\t**%s** <- **%s**\n\n%s\n\n",
|
||||
"# #%d %s (%s)\n@%s created %s\t**%s** <- **%s**\n\nAllow maintainer to edit: %v\n\n%s\n\n",
|
||||
pr.Index,
|
||||
pr.Title,
|
||||
state,
|
||||
|
@ -35,7 +34,7 @@ func PullDetails(pr *gitea.PullRequest, reviews []*gitea.PullReview, ciStatus *g
|
|||
FormatTime(*pr.Created, false),
|
||||
base,
|
||||
head,
|
||||
// TODO: pr.AllowMaintainerEdit,
|
||||
pr.AllowMaintainerEdit,
|
||||
pr.Body,
|
||||
6543 marked this conversation as resolved
Outdated
|
||||
)
|
||||
|
||||
|
|
|
@ -70,8 +70,7 @@ 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 {
|
||||
if pr.AllowMaintainerEdit != allowMaintainerEdits {
|
||||
pr, _, err = client.EditPullRequest(ctx.Owner, ctx.Repo, pr.Index, gitea.EditPullRequestOption{
|
||||
6543 marked this conversation as resolved
Outdated
6543
commented
pr.Index pr.Index
|
||||
AllowMaintainerEdit: gitea.OptionalBool(allowMaintainerEdits),
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user
just another sdk update ...