def set_commit_status( self, commit: str, state: Union[CommitStatus, str], target_url: str, description: str, context: str, trim: bool = False, ): """ Create a status on a commit :param commit: The SHA of the commit. :param state: The state of the status. :param target_url: The target URL to associate with this status. :param description: A short description of the status :param context: A label to differentiate this status from the status of other systems. :param trim: bool Whether to trim the description in order to avoid throwing github.GithubException :return: """ return GithubCommitFlag.set( project=self, commit=commit, state=state, target_url=target_url, description=description, context=context, trim=trim, )
def get_commit_statuses(self, commit: str) -> List[CommitFlag]: """ Get status of the commit. :param commit: str :return: [CommitFlag] """ return GithubCommitFlag.get(project=self, commit=commit)