Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore missing reference on pr close #288

Closed
wants to merge 2 commits into from

Conversation

wstrm
Copy link
Contributor

@wstrm wstrm commented Oct 5, 2022

What does this change

Ignore "Reference does not exist" error when closing a PR.

What issue does it fix

While closing a bunch of PRs I noticed that the program errored with:

INFO[0003] Closing 91 pull requests                     
INFO[0003] Closing                                       pr="<redacted> #163"
Error: DELETE https://<redacted>/git/refs/heads/<redacted>: 422 Reference does not exist []
Usage:
  multi-gitter close [flags]

Flags:
  -g, --base-url string     Base <...>

Notes for the reviewer

Maybe we should not try to close already closed PRs?

Checklist

  • Made sure the PR follows the CONTRIBUTING.md guidelines
  • Tests if something new is added

@lindell
Copy link
Owner

lindell commented Oct 5, 2022

Which version did you run when this occurred?

It might have been fixed in:
v0.42.2 (bug appeared in v0.42.0)
#268

@wstrm
Copy link
Contributor Author

wstrm commented Oct 5, 2022

I used latest master and tried it built from source. But I think my issue is different in that it's for already closed PRs. So it might make sense to retrieve closed status?

@lindell
Copy link
Owner

lindell commented Oct 5, 2022

Ah, indeed, this fix was only for merged ones.

But the same mapping should be done for scm.PullRequestStatusClosed as was added for merged in #268.

@wstrm
Copy link
Contributor Author

wstrm commented Oct 5, 2022

Okay, I can give adding that a try :)

@lindell
Copy link
Owner

lindell commented Oct 7, 2022

Have you had any chance to look at this and are there any help needed in that case? :)

@lindell
Copy link
Owner

lindell commented Oct 17, 2022

@wstrm Ping again.

Should I take a look at it instead?

@wstrm
Copy link
Contributor Author

wstrm commented Oct 17, 2022

Hello! Sure :)

@lindell
Copy link
Owner

lindell commented Oct 17, 2022

Should be fixed in: #290

@lindell lindell closed this Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants