action_utils.get_team_approval_status module

Determine if a PR has approvals from specific teams

action_utils.get_team_approval_status.parse_args()

Parse commandline args

action_utils.get_team_approval_status.pr_has_appropriate_reviews(client: github.MainClass.Github, org_str: str, repo: str, pr_num: int, team_names: list[str]) bool

Given a repository, PR number, and list of teams, determine if the given PR has at least one approval from each of the listed teams

Parameters:
  • client – Authenticated Github client

  • org – The GitHub organization to inspect

  • repo – The GitHub repo to inspect

  • pr_num – The Pull Request number in the given repo

  • team_names – The list of teams that are required to be approvers

Returns:

True if the PR has appropriate reviews, False if not

action_utils.get_team_approval_status.team_member_has_approved_pr(team: github.Team.Team, pull: github.PullRequest.PullRequest) bool

Determine if a member of the given team as approved the given pull request

Parameters:
  • team – The Team in question

  • pull – The PullRequest in question

Returns:

True if a member of the given team has approved the PR, False if not