aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-10-11 11:58:05 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-10-11 11:58:05 -0400
commit9c090f5e26e5de9c71962280e0aff52616bcad2d (patch)
tree3dd6e690005671af73ea4f7c183d07a282331918
parentad2d0689184cd24caf51ca51f01719a24d274d9b (diff)
downloadkorg-helpers-9c090f5e26e5de9c71962280e0aff52616bcad2d.tar.gz
A couple of hotfixes
- don't crash when pagedata is None (no more results) - fix regex used to recognize pull request merges Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgit-patchwork-bot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-patchwork-bot.py b/git-patchwork-bot.py
index 4d33abc..e8d930e 100755
--- a/git-patchwork-bot.py
+++ b/git-patchwork-bot.py
@@ -270,7 +270,7 @@ def get_patchwork_pull_requests_by_project(rm, project, fromstate):
logger.debug('Processing page %s', page)
pagedata = rm.get_patch_list(params)
- if len(pagedata) < REST_PER_PAGE:
+ if not pagedata or len(pagedata) < REST_PER_PAGE:
more = False
if not pagedata:
@@ -1099,7 +1099,7 @@ def pwrun(repo, cmdconfig, nomail, dryrun):
revs = dict()
for rev, logline, pwhash in hashpairs:
if have_prs and pwhash is None:
- matches = re.search(r'Merge\s(\S+)\s[\'"](\S+)[\'"]\sof\s(.*)$', logline)
+ matches = re.search(r'Merge\s(\S+)\s[\'\"](\S+)[\'\"]\sof\s(\w+://\S+)', logline)
if not matches:
continue
m_obj = matches.group(1)