CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-towncrier

Building newsfiles for your project.

Overview
Eval results
Files

vcs.mddocs/

VCS Integration

Version control system integration for managing news fragments and staging files.

Capabilities

Fragment Management

Remove news fragment files from the repository after building the changelog.

def remove_files(base_directory: str, fragment_filenames: list[str]) -> None:
    """
    Remove fragment files from the VCS.
    
    Args:
        base_directory: Base directory of the repository
        fragment_filenames: List of fragment filenames to remove
    """

News File Staging

Stage the generated news file in version control.

def stage_newsfile(directory: str, filename: str) -> None:
    """
    Stage the news file in version control.
    
    Args:
        directory: Directory containing the news file
        filename: Name of the news file to stage
    """

Branch Operations

Get information about remote branches and determine default comparison targets.

def get_remote_branches(base_directory: str) -> list[str]:
    """
    Get list of remote branches.
    
    Args:
        base_directory: Base directory of the repository
        
    Returns:
        List of remote branch names
    """

def get_default_compare_branch(
    base_directory: str, 
    branches: Container[str]
) -> str | None:
    """
    Determine the default branch to compare against.
    
    Args:
        base_directory: Base directory of the repository
        branches: Available branch names
        
    Returns:
        Default branch name or None if unable to determine
    """

def list_changed_files_compared_to_branch(
    base_directory: str, 
    compare_with: str, 
    include_staged: bool
) -> list[str]:
    """
    List files changed compared to a branch.
    
    Args:
        base_directory: Base directory of the repository
        compare_with: Branch name to compare against
        include_staged: Whether to include staged files
        
    Returns:
        List of changed file paths
    """

Imports

from towncrier._vcs import (
    remove_files,
    stage_newsfile,
    get_remote_branches,
    get_default_compare_branch,
    list_changed_files_compared_to_branch
)

Install with Tessl CLI

npx tessl i tessl/pypi-towncrier

docs

build.md

check.md

configuration.md

create.md

fragments.md

index.md

project.md

vcs.md

tile.json