From a8cd49742aee49bc8ec92ea01d3f6b714e630715 Mon Sep 17 00:00:00 2001 From: Philip Dolbel Date: Thu, 12 Jan 2023 12:14:13 +1300 Subject: [PATCH] Small fixes to script --- parse_dependabot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/parse_dependabot.py b/parse_dependabot.py index 6a131faa..ad1e5035 100755 --- a/parse_dependabot.py +++ b/parse_dependabot.py @@ -9,7 +9,12 @@ print("Please supply the ref as the first parameter") sys.exit(1) -proc = subprocess.run(f'git log {sys.argv[1]}..HEAD --author="dependabot\[bot\]" --grep="^Bump" --oneline --no-decorate', shell=True, stdout=subprocess.PIPE, text=True) +proc = subprocess.run( + f'git log {sys.argv[1]}..HEAD --author="dependabot" --grep="^Bump" --oneline --no-decorate', + shell=True, + stdout=subprocess.PIPE, + text=True +) lines = sorted(proc.stdout.splitlines()) warnings = [] @@ -19,8 +24,9 @@ for (line, match) in map(lambda line: (line, p.search(line)), lines): if not match: warnings.append(line) + continue - name, old, new = match.group(1,2,3) + name, old, new = match.group(1, 2, 3) output.append(f"- Update {name} from {old} to {new}.") print(*sorted(set(output)), sep="\n")