mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 18:08:30 +02:00
Fix bug (#793)
Partially fix #791 Reviewed-on: https://gitea.com/gitea/tea/pulls/793 Reviewed-by: hiifong <i@hiif.ong>
This commit is contained in:
@ -6,6 +6,7 @@ package pulls
|
||||
import (
|
||||
stdctx "context"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"code.gitea.io/tea/cmd/flags"
|
||||
"code.gitea.io/tea/modules/context"
|
||||
"code.gitea.io/tea/modules/interact"
|
||||
@ -56,11 +57,16 @@ func runPullsCreate(_ stdctx.Context, cmd *cli.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
var allowMaintainerEdits *bool
|
||||
if ctx.IsSet("allow-maintainer-edits") {
|
||||
allowMaintainerEdits = gitea.OptionalBool(ctx.Bool("allow-maintainer-edits"))
|
||||
}
|
||||
|
||||
return task.CreatePull(
|
||||
ctx,
|
||||
ctx.String("base"),
|
||||
ctx.String("head"),
|
||||
ctx.Bool("allow-maintainer-edits"),
|
||||
allowMaintainerEdits,
|
||||
opts,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user