Ori.livneh has submitted this change and it was merged.

Change subject: Don't auto-link SHA1s and Gerrit change IDs
......................................................................


Don't auto-link SHA1s and Gerrit change IDs

This reverts commit b1c3632609174f334df99b1be0f876e5a5400c06.
Regexp was wrong, and it is better to do this in Lua anyhow, and thus
preserve the portability of the message for non-wikitext media.

Marked as 1.7.5.

Change-Id: Ia6d1519c802b3ef00746decb60320c93daff4a18
---
M adminlog.py
M debian/changelog
2 files changed, 7 insertions(+), 8 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/adminlog.py b/adminlog.py
index 93e5727..4944d6b 100644
--- a/adminlog.py
+++ b/adminlog.py
@@ -1,14 +1,9 @@
 import mwclient
 import datetime
-import re
 
 months = ["January", "February", "March", "April", "May", "June", "July",
                        "August", "September",
                        "October", "November", "December"]
-
-# Matches full and partial SHA1s, provided they contain at least one digit and
-# do not start with 'dbN' (to avoid matching 'db1047').
-sha1_re = re.compile(r'\b(?!db\d)[A-F0-9]+[0-9]+[A-F0-9]+\b', re.I | re.M)
 
 
 def log(config, message, project, author):
@@ -31,9 +26,7 @@
        position = 0
        # Um, check the date
        now = datetime.datetime.utcnow()
-       wikitext_message = sha1_re.sub(r'{{Gerrit|\g<0>}}', message)
-       logline = "* %02d:%02d %s: %s" % (now.hour, now.minute, author,
-                       wikitext_message)
+       logline = "* %02d:%02d %s: %s" % (now.hour, now.minute, author, message)
        month = str(now.month)
        day = str(now.day)
        # Try extracting latest date header
diff --git a/debian/changelog b/debian/changelog
index cb092e9..6a2c1a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+adminbot (1.7.5) precise-wikimedia; urgency=low
+
+  * Don't auto-link SHA1s and Gerrit change IDs
+
+ -- Ori Livneh <[email protected]>  Fri, 15 Nov 2013 00:13:15 +0000
+
 adminbot (1.7.4) precise-wikimedia; urgency=low
 
   [ Ori Livneh ]

-- 
To view, visit https://gerrit.wikimedia.org/r/95571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6d1519c802b3ef00746decb60320c93daff4a18
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/adminbot
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to