Skip to content

Commit

Permalink
feat: add notifications command click integration
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Aug 14, 2024
1 parent 4b0de04 commit 399cd28
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions github_overlord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ def transform_forked_repos(repo):
log.info("stale PR check complete")


@click.command()
@click.option(
"--token",
help="GitHub token, can also be set via GITHUB_TOKEN",
default=os.getenv("GITHUB_TOKEN"),
)
# TODO move this into the parent command
@click.option("--dry-run", is_flag=True, help="Run script without merging PRs")
@click.option(
"--only-unread", is_flag=True, help="Only process a single repository", default=True
)
def notifications(token, dry_run, only_unread):
"""
Look at notifications and mark them as read if they are dependabot notifications
Expand Down Expand Up @@ -309,6 +320,7 @@ def is_pull_request_open(notification: Notification) -> bool:

cli.add_command(dependabot)
cli.add_command(keep_alive_prs)
cli.add_command(notifications)

if __name__ == "__main__":
cli()

0 comments on commit 399cd28

Please sign in to comment.