ciabot/bugzilla/base.py         |    8 ++------
 ciabot/libreoffice-bugzilla2.py |   25 ++++++++++++-------------
 2 files changed, 14 insertions(+), 19 deletions(-)

New commits:
commit fb1f2fee35b1ed9dd24a6f3cefe431cdd8e14dea
Author:     Thorsten Behrens <t...@documentfoundation.org>
AuthorDate: Tue Jun 18 18:12:52 2019 +0200
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Tue Jun 18 18:14:12 2019 +0200

    Sync ciabot with in-production copy

diff --git a/ciabot/bugzilla/base.py b/ciabot/bugzilla/base.py
index d9b4e28..81dffb4 100644
--- a/ciabot/bugzilla/base.py
+++ b/ciabot/bugzilla/base.py
@@ -253,10 +253,6 @@ class RequestsTransport(Transport):
         # xmlrpclib fails to escape \r
         request_body = request_body.replace(b'\r', b'&#xd;')
 
-        # Needed for python-requests < 2.0 with python3, otherwise we get
-        # Content-Type error later for the POST request
-        request_body = request_body.decode('utf-8')
-
         return self._request_helper(url, request_body)
 
 
@@ -944,8 +940,8 @@ class BugzillaBase(object):
         if self._supports_getbug_extra_fields:
             getbugdata["extra_fields"] = extra_fields
 
-        log.debug("Calling Bug.get_bugs with: %s", getbugdata)
-        r = self._proxy.Bug.get_bugs(getbugdata)
+        log.debug("Calling Bug.get with: %s", getbugdata)
+        r = self._proxy.Bug.get(getbugdata)
 
         if self.bz_ver_major >= 4:
             bugdict = dict([(b['id'], b) for b in r['bugs']])
diff --git a/ciabot/libreoffice-bugzilla2.py b/ciabot/libreoffice-bugzilla2.py
index 626a7d6..17c88f0 100644
--- a/ciabot/libreoffice-bugzilla2.py
+++ b/ciabot/libreoffice-bugzilla2.py
@@ -37,8 +37,8 @@ import bugzilla
 from bugzilla import Bugzilla
 from bugzilla.base import _BugzillaToken
 
-master_target = "6.1.0"
-bug_regex = "(?:tdf|fdo)#(\d+)"
+master_target = "6.4.0"
+bug_regex = "\\b(?:bug|fdo|tdf|lo)[#:]?(\\d+)\\b"
 dry_run = False
 
 class FreedesktopBZ:
@@ -48,7 +48,7 @@ class FreedesktopBZ:
 
     def connect(self):
         config = ConfigParser.ConfigParser()
-        config.read('/home/ciabot/prod/config.cfg')
+        config.read('/srv/home/ciabot/prod/config.cfg')
         url = config.get('bugzilla', 'url')
         user = config.get('bugzilla', 'user')
         password = config.get('bugzilla', 'password')
@@ -75,10 +75,8 @@ class FreedesktopBZ:
                 new_whiteboard = old_whiteboard + "target:" + new_version
                 bug.setwhiteboard(new_whiteboard)
 
-        cgiturl = "http://cgit.freedesktop.org/libreoffice/%s/commit/?id=%s"; 
%(repo_name, commit.hexsha)
-        if branch is not None and branch != "master":
-            cgiturl = cgiturl + "&h=" + branch
-        else:
+        cgiturl = "https://git.libreoffice.org/%s/+/%s%%5E%%21"; % (repo_name, 
commit.hexsha)
+        if branch is None:
             branch = "master"
 
         comment_msg = """%s committed a patch related to this issue.
@@ -94,9 +92,9 @@ It has been pushed to "%s":
 It will be available in %s.
 
 The patch should be included in the daily builds available at
-http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
+https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
 information about daily builds can be found at:
-http://wiki.documentfoundation.org/Testing_Daily_Builds
+https://wiki.documentfoundation.org/Testing_Daily_Builds
 
 Affected users are encouraged to test the fix and report feedback.""" 
%(new_version)
 
@@ -167,7 +165,8 @@ def get_commit(repo, commit_id):
     commit = repo.commit(commit_id)
     return commit
 
-def find_bugid(commit):
+def find_bugid(repo, commit_id):
+    commit = get_commit(repo, commit_id)
     summary_line = commit.summary
     regex = re.compile(bug_regex)
     m = regex.findall(summary_line)
@@ -179,7 +178,7 @@ def find_bugid(commit):
 
 def read_repo(repo_name):
     config = ConfigParser.ConfigParser()
-    config.read('/home/ciabot/prod/config.cfg')
+    config.read('/srv/home/ciabot/prod/config.cfg')
     path = config.get(repo_name, 'location')
     repo = git.repo.base.Repo(path)
     return repo
@@ -219,9 +218,9 @@ def main(argv):
 
     target_version = find_target_version(repo, branch)
 
-    commit = get_commit(repo, commit_id)
+    bug_ids = find_bugid(repo, commit_id)
 
-    bug_ids = find_bugid(commit)
+    commit = get_commit(repo, commit_id)
 
     if target_version is None:
         print("missing target version")
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to