Skip to content

Commit

Permalink
Small fixes to script
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamboy1 committed Jan 11, 2023
1 parent 0c2867b commit a8cd497
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions parse_dependabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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")
Expand Down

0 comments on commit a8cd497

Please sign in to comment.