batcave: get zodbot to announce commits on the master branch of the dns git repo
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
88d1e79ea4
commit
469a026cb7
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
# But when it breaks, don't yell at him because that's mean.
|
# But when it breaks, don't yell at him because that's mean.
|
||||||
# update hook for FI repos -> zodbot.
|
# update hook for FI repos -> zodbot.
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import shlex
|
import shlex
|
||||||
|
@ -116,7 +117,8 @@ def parse_commit(commit):
|
||||||
|
|
||||||
|
|
||||||
# Get a list of commits to report.
|
# Get a list of commits to report.
|
||||||
if branch == 'main':
|
cwd = os.getcwd()
|
||||||
|
if (cwd.endswith('dns') and branch == 'master') or branch == 'main':
|
||||||
revs = run_command(f"git rev-list ^{old} {new}")["stdout"].split("\n")
|
revs = run_command(f"git rev-list ^{old} {new}")["stdout"].split("\n")
|
||||||
revs = [r for r in revs if r]
|
revs = [r for r in revs if r]
|
||||||
revs.reverse()
|
revs.reverse()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue