Implement PR closing and reopening #304
Merged
6543
merged 4 commits from YakoYakoYokuYoku/tea:pull-close-open
into master
4 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'YakoYakoYokuYoku/tea:pull-close-open'
Deleting a branch is permanent. It CANNOT be undone. 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 4 months ago// Copyright 2018 The Gitea Authors. All rights reserved.
2020
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
4 months ago@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
)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
4 months agoOh, 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
4 months agoSince 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 4 months agoa2e8b47c57
into master 4 months agoa2e8b47c57
.