Skip to content

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

@isomorpheme

Description

@isomorpheme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions