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: return open PRs only #268

Merged
merged 2 commits into from
Aug 7, 2022
Merged

Conversation

johanneswuerbach
Copy link
Contributor

What does this change

Once a change was partially merged, no further merge operations were possible as mutli-gitter tried to merge already merged PRs and GitHub returned.

PUT https://api.github.com/repos/XYZ/pulls/40/merge: 405 Pull Request is not mergeable []

Instead of returning all PRs for a branch, return only open PRs as there is currently no way to interact with 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 Aug 5, 2022

Thanks for the PR! You are right that MG for GitHub give this error since the graphql rewrite for PRs. But the query itself seems to be correct since it's used for both the status and merge commands.

But from the error you described, I can see that the mapping to the "merged" status was missed:
60bbbdf#diff-306f5e07e3d5522cd6066012a3c6a077dd2b03d1cf23b58af3466bd02e60b4af

Which means it instead get "success" status and it then not filtered out from being merged again.

@lindell
Copy link
Owner

lindell commented Aug 5, 2022

Changed the pr to reflect this. Could you please confirm this is working as intended for you @johanneswuerbach 😄

@johanneswuerbach
Copy link
Contributor Author

Yes, its working for me 🙇

@lindell lindell merged commit 0474040 into lindell:master Aug 7, 2022
@lindell
Copy link
Owner

lindell commented Aug 7, 2022

Perfect 👍 Thanks again for the find 😄

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2022

Included in release v0.42.2 🎉

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