You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1644 documentation was added to warn users against copy/pasting Cc: lines from previous GitGitGadget PRs. The reason for this is that they are "rendered as Markdown", but the rendered versions are not valid.
Instead of just warning users against this, let's help even more by refusing to send such mails and offer guidance how to get out of this situation.
The text was updated successfully, but these errors were encountered:
Let me add a bit of information that should help any volunteer to get started:
This is the mail containing the complaint about the issue, but this is probably a more informative link, as it describes the problem: When copy/pasting Cc: lists from an existing GitGitGadget PR, they are no longer in the correct format; Instead of something like "Cc: Junio C Hamano mailto:gitster@pobox.com" the lines read like "Cc: Junio C Hamano gitster@pobox.com".
Here is the part of the test suite that will need to be imitated to verify that this ticket is addressed properly.
Here is an example how to verify that a specific exception is thrown (which allows us to verify the error message, too).
The error message could be something helpful along the lines of "The line '...' was probably copy/pasted from another PR but is in an incorrect format; It needs to be in the format '...' instead".
An even much, much better idea might be to handle the Markdown-formatted lines gracefully, heeding Postel's law. That is, before even letting the addressparser try to parse the line, try to match the regular expression /^[A-Za-z ]+\s+\[([^ @]+@[^@]+)\]\(mailto:\1\)/. If it matches, use the captured groups, otherwise let addressparser have a crack at it.
We may still want to validate the email addresses in addition to that.
While at it, we could add a doozie on top and run the addresses through git check-mailmap --stdin so that e.g. email addresses copied from old commits are automagically converted to the superseding addresses recorded in Git's own .mailmap.
In #1644 documentation was added to warn users against copy/pasting Cc: lines from previous GitGitGadget PRs. The reason for this is that they are "rendered as Markdown", but the rendered versions are not valid.
Instead of just warning users against this, let's help even more by refusing to send such mails and offer guidance how to get out of this situation.
The text was updated successfully, but these errors were encountered: