INNER CODE UNIT · Python

categorize_commit

fluxerapp/flutter_client · .github/scripts/append_release_direct_commits.py:167

def categorize_commit(subject: str) -> str | None:
    match = CONVENTIONAL_COMMIT_PATTERN.match(subject)
    if match is None:
        return "other"
    commit_type = match.group("type").lower()
    if commit_type in SKIP_CHANGELOG_TYPES:
        return None
    if commit_type == "feat":
        return "feature"
    if commit_type == "fix":
        return "fix"
    return "other"


def format_commit_line(sha: str, title: str, author: str) -> str:
    repository = os.environ["GITHUB_REPOSITORY"]
    short_sha = sha[:7]
    commit_url = f"https://github.com/{repository}/commit/{sha}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…