INNER CODE UNIT · Python

gh_get_changed_files

bitwarden/android · .github/scripts/label-pr.py:65

def gh_get_changed_files(pr_number: str) -> list[str]:
    """Get list of changed files in a pull request."""
    try:
        result = subprocess.run(
            ["gh", "pr", "diff", pr_number, "--name-only"],
            capture_output=True,
            text=True,
            check=True
        )
        changed_files = result.stdout.strip().split("\n")
        return list(filter(None, changed_files))
    except subprocess.CalledProcessError as e:
        print(f"::error::Error getting changed files: {e}")
        return []

def gh_get_pr_title(pr_number: str) -> str:
    """Get the title of a pull request."""
    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…