def latest_action_run(repo_owner, event):
    """
    Get the newest action run for a certain kind of event.
    """
    resp = get_session().get(
        f"https://api.github.com/repos/{repo_owner}/actions/runs?event={event}"
    )
    resp.raise_for_status()
    return resp.json()["workflow_runs"][0]

    Get the newest action run for a certain kind of event.
    
ci/trigger_action.py