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

Also use a reaction for confirmation when the PR ends up in the merge queue #278

Open
isomorpheme opened this issue Oct 9, 2024 · 1 comment

Comments

@isomorpheme
Copy link

isomorpheme commented Oct 9, 2024

In #272 I decided to send a reaction only if the PR in question is the first to be merged, so that we do still provide the position in the merge queue otherwise. But it's annoying that this still leads to an unnecessary ping:

Screenshot: I run a merge command, and OpsBotPrime responds by @-ing me and reporting the position in the merge queue is 2.

It would be better if Hoff just reacts with 👍 in this case as well, and in addition sends a message just stating the position in the queue ("Waiting for rebase behind N pull requests...").

The check for the queue position happens here:

hoff/src/Logic.hs

Lines 1189 to 1195 in 43b6787

case (queuePosition, source) of
(0, Just reactable) -> ReactionFeedback reactable GithubApi.PlusOne
_ ->
CommentFeedback $
format
"Pull request approved for {}{} by @{}{}, {}."
[approvalCommand, priorityMsg, approvedBy, retriedByMsg, queuePositionMsg]

The Feedback type would probably have to be modified to allow a reaction and a comment, or something else in the logic loop would have to change so that we also go back and send a comment in a separate step.

@isomorpheme
Copy link
Author

in addition sends a message just stating the position in the queue ("Waiting for rebase behind N pull requests...").

This might not even be necessary, since (I think) you'll get a speculative rebase in that case, which already results in a message indicating position:

hoff/src/Logic.hs

Line 1208 in 5fcf08e

"Speculatively rebased as {} behind {} other {}, waiting for CI …"

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

No branches or pull requests

1 participant