workflow permissions

This commit is contained in:
Ludovico Magnocavallo
2022-07-30 19:29:50 +02:00
parent fab0566b9d
commit d075e67425
2 changed files with 9 additions and 2 deletions

View File

@@ -90,8 +90,11 @@ def write_doc(path, snippet):
@click.argument('changelog', required=False, type=click.Path(exists=True))
def main(token, changelog=None):
buffer = []
for pr in get_pulls(token=token):
buffer.append(format_pull(pr))
try:
for pr in get_pulls(token=token):
buffer.append(format_pull(pr))
except Exception as e:
raise SystemExit(f'API error: {e}')
buffer = '\n'.join(buffer)
if not changelog:
print(buffer)