
On Thu, 9 Feb 2017 at 10:15 Nick Coghlan <ncoghlan@gmail.com> wrote:
On 9 February 2017 at 18:59, Zachary Ware <zachary.ware+pydev@gmail.com> wrote:
On Thu, Feb 9, 2017 at 11:52 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
You can't readily do that with "#12345" or even "Issue #12345" because they're too generic.
I don't see how we can say they're too generic for a GreaseMonkey script to match, but not for rewriting history.
Rewriting the history has a lot more context: Senthil *knows* that his script is reading CPython commit messages.
Without the more specific prefix, a GreasemonkeyScript would need to be configured to only run on relevant URLs, which is definitely possible, but would be pretty annoying to set up.
An option that I would be less against would be to, instead of rewriting the actual message, tack '\n\n[bpo-12345]' onto the end of the message. At least that way any misfires would be non-destructive.
That's actually the way hg.python.org injects the links now: https://hg.python.org/cpython/rev/b07d454e45a2
So +1 from me for appending the references to the old messages rather than modifying them in place.
What if we only did it for the beginning of the first line of the commit message and not the whole body? Senthil had a list in one of his emails of all the possible formats and if they were all anchored with "^" in the regex then the chance of a false-positive is essentially 0. That would give us the equivalent of what we have on hg.python.org but in-place and alleviates any worry of GitHub changing how they do things in the future (at least in terms of the line you see in log output). If people don't like that idea the appending works for me if it isn't difficult for Senthil.