Implement PR closing and reopening #304
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#304
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "YakoYakoYokuYoku/tea:pull-close-open"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #301.
Try to not get a(See the upstream403
as response, this likely means that the user is closing/reopening the PR as a repo owner instead of doing it as the PR owner as it should be expected.gitea
issue.)Implement PR closing and reopeningto WIP: Implement PR closing and reopening@ -0,0 +1,25 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
2020
@ -24,2 +24,2 @@
Usage: "List, create, checkout and clean pull requests",
Description: `List, create, checkout and clean pull requests`,
Usage: "List, create, checkout, close, clean and reopen pull requests",
Description: `List, create, checkout, close, clean and reopen pull requests`,
This is becoming a bit long. Maybe
Manage & checkout pull requests
?@YakoYakoYokuYoku can you apply changes of #291 to your pull ?
4a496c2108
to3c0a2acba2
@YakoYakoYokuYoku
In my tests it works. You could show a more descriptive error in case it fails, though I think it's fine as it is.
I think this should be in another PR, as this requires detection what the current PR is. This is a feature that is generally neat to have (such as in
tea open pull
)@ -0,0 +20,4 @@
func editPullState(ctx *cli.Context, opts gitea.EditPullRequestOption) error {
login, owner, repo := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
if ctx.Args().Len() == 0 {
log.Fatal(ctx.Command.ArgsUsage)
pull review commands will ned this too - something teaContext should ;)
@YakoYakoYokuYoku I agree with moving this into it's own pull
@YakoYakoYokuYoku if you need help to apply latest changes to your pull - just ask
I wasn't having any issues with merging commits, I was taking my time setting up my local Gitea instance for testing with this PR.
Testing revealed that I can close a PR, if I have permissions in the repo to do so. I suppose that this PR is for closing PRs as the repo owner, not the PR owner ?.
3c0a2acba2
to5810292885
Oh, now I get it & can reproduce. That's indeed an (upstream API) issue:
You should certainly be allowed to close your own PR.
I think we can merge this anyway and fix it upstream
https://github.com/go-gitea/gitea/issues/14025
5810292885
toed9f5bbd4c
Since the PR
403
issue is not a blocker for this PR I also agree for merging.WIP: Implement PR closing and reopeningto Implement PR closing and reopening