Skip to content

Make the mailing list -> PR comment syncing bidirectional #154

Open

Description

@dscho

This will be a very, very tricky thing to implement, with a very real possibility of frequent failures.

We recently saw a couple contributors reply directly in the PR to mails that had been mirrored from the Git mailing list (as PR comments). This does not currently work because the good people on the Git mailing list do not pay attention to GitGitGadget PRs.

To help that, try to figure out which mail to reply to, and send the comment (editing the comment to include a note that it was sent with a link to the mailing list archive).

To figure out what mail to reply to, in the first run, we should look for a quoted link to the mailing list archive (which includes the Message-ID): every PR comment that was mirrored from a corresponding mail on the Git mailing list starts with a link "On the Git mailing list" with a URL to the archive at https://public-inbox.org/git/.

If there is no such quoted link, we could see whether the comment to send contains some quoted text, and if it does not, bail out by adding another comment stating that GitGitGadget could not figure out what mail this reply was for, and please do include the quoted link at the beginning if you want it to be mirrored.

Activity

  1. gitster commented on May 6, 2020

    @gitster
    Contributor

    git/git#775 is another example that the contributor found it more convenient to reply in the webform. The comment by the contributor quotes "On the Git mailing list" (which points to a specific article in the lore archive in the entry added by GGG) but the message-id seems to be redacted---does GGG see the original message-id of the message, or does it only see the redacted form? The solution outlined by the original issue may not work in this case.

  2. dscho commented on May 7, 2020

    @dscho
    MemberAuthor

    Indeed. Even if it might be possible sometimes to figure out which comment/mail to respond to, in general it won't (e.g. when not quoting anything at all).

    In that case, we probably need GitGitGadget to respond with some guidance ("please keep the link to the original mail in the quoted part").

    That all sounds quite involved, which is why I did not dare trying to tackle this ticket so far.

  3. webstech commented on Sep 29, 2020

    @webstech
    Contributor

    Mumbling out loud. There appear to be two different situations.

    1. User replying to a GitHub email
    2. user adding a PR comment as a reply to a so-and-so@said.this comment by GGG.

    In both cases, GGG will now need to process all PR comments. Not suggesting changes to relieve the poster of reposting/mailing.

    1. If it is easily determined this is an email reply (it probably is), a reminder comment can be posted. May still need to verify a /submit was done.
    2. For this case, there is a need to avoid pre-submit comments. Following the comment chain, if they are not all GGG comments up to the last /submit, the non-GGG comment needs a reminder comment. This would be limited to comments by the PR owner.

    The suggested change is not to 'fix' things but simply remind someone they may not have notified everyone they think they were.

    Is this enough? To put it another way, is this enough for now until we decide the original suggestions about sending emails are needed in the future?

  4. dscho commented on Sep 29, 2020

    @dscho
    MemberAuthor

    Hmm. This would certainly side-step the technical difficulties, but could get pretty annoying pretty quickly, I think: I sometimes post on PRs because it's much more convenient for me. OTOH we could exclude me (and gitgitgadget) from that.

  5. jonas2515 commented on Nov 8, 2023

    @jonas2515

    It seems that the main issue here is actually that github's PR ui is not centered around replies to comments, and I guess that can only be worked around by introducing some syntax for that. What sounds doable to me as a compromise would be something like this as comment on the PR:

    /reply https://github.com/git/git/pull/775#issuecomment-622511614
    
    Thanks I'll look into it!
    

    and that would turn into this on the mailing list:

    From: Jonas Dreßler <verdre@v0yd.nl>
    
    Thanks I'll look into it!
    

    for quote replies, there could be

    /replyquoting https://github.com/git/git/pull/775#issuecomment-622511614
    
    > I do not do P4, so asking those who touched the program in the past
    > year and half for opinions.
    
    Thanks I'll look into it!
    

    and that would turn into

    From: Jonas Dreßler <verdre@v0yd.nl>
    
    Junio C Hamano <gitster@pobox.com> writes:
    
    > I do not do P4, so asking those who touched the program in the past
    > year and half for opinions.
    
    Thanks I'll look into it!
    
  6. dscho commented on Nov 8, 2023

    @dscho
    MemberAuthor

    @jonas2515 that would work, on a technical level.

    It would deviate from the design goals of GitGitGadget, though, which are to make it as painless to use as possible (after all, the entire purpose of GitGitGadget is to avoid the pain and suffering that comes with having to contribute Git commits to a mailing list).

    Maybe you can think of a heuristic that would work in most cases where it detects (correctly!) which mail to reply to. And also detects what email address to use to Cc: the person sending the reply.

  7. jonas2515 commented on Nov 8, 2023

    @jonas2515

    Tbh I don't really see how specifying which comment you want to reply to is a lot more paintful than having to do /submit everytime you push to the PR, a certain level of pain is to be expected if you want to interact with email after all.

    The questions of CCing the person sending the reply is tricky, but maybe that's also not necessary if all communication can be done on the github PR? Thinking about it, maybe it's for the best if gitgitgadget wouldn't expose the email of anyone contributing on Github to the mailing list, to not create an incentive for people on the mailing list to reply/write to that persons private email instead of the generated gitgitgadget one.

    Fwiw, context is that gitgitgadget looks quite promising for BlueZ and its migration from mailing lists to github, see bluez/bluez#648.

  8. dscho commented on Nov 10, 2023

    @dscho
    MemberAuthor

    I don't really see how specifying which comment you want to reply to is a lot more paintful than having to do /submit everytime you push to the PR

    /replyquoting https://github.com/git/git/pull/775#issuecomment-622511614 is a lot more complex and error-prone than /submit.

  9. dscho commented on Jul 6, 2024

    @dscho
    MemberAuthor

    I ran into this again today. Here are some thoughts how we might move forward with this ticket:

    • Often, it is not possible to determine which mail the user is replying to. This is partially a consequence of the relative ease of PR comments vs emailing the reply.
    • I do love the ease of PR comments, and I am concerned about the cost of the obstacle that is the Git mailing list (which many claim improves the quality of the contributions, which I consider magical thinking: just because somebody is determined enough to overcome the many requirements to enter the Git project at all does not imply that their contributions will be more in line with what the Git reviewers consider high quality, and vice versa: just because someone is an excellent C programmer does not imply that they are willing to jump the hurdles put in front of them if they want to contribute to Git).
    • A quite manual solution to this here ticket would be to introduce the command /send-reply <URL-to-comment> [<message-ID-or-link-to-mail>].
    • The implementation of this command would be quite easy: all the building blocks, including the allow list (to determine both who can invoke the /send-reply command as well as what comment authors are allowed to be handled in this way), are already in place.
    • One caveat is that the mail would need to be in a form that links back to the original comment, and the automation that handles new mails will need to be taught not to mirror them to PR comments.
    • It would probably be a good idea for GitGitGadget to edit the original PR comment, adding a link to the mail that was sent (and maybe even a link to the workflow run that sent it).
    • From there, we could start figuring out clear indicators in a PR comment that determine conclusively which email to reply to, and make the process less manual by sending the mails automatically whenever that automatic determination successfully found such an In-Reply-To: information.
  10. dscho commented on Nov 26, 2026

    @dscho
    MemberAuthor

    Interesting, strongly related PR: #2426. It introduces a /reply <message-id> <body> command.

    I could see this easily evolving into something where a PR comment that has been posted by the PR author and which quotes something could maybe use a heuristic to maybe send a reply. It would have to be a relatively robust heuristic, erring in not sending anything rather than potentially sending a bogus email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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