Skip to content

fix: include offending branch name in trigger.pipeline validation error message #189

@jamesadevine

Description

@jamesadevine

Problem

When a branch entry in triggers.pipeline.branches contains a newline, the error message does not include which branch triggered the failure. This makes debugging harder for users with multiple branches configured.

Suggested Fix

Include the offending value in the error:

anyhow::bail!(
    "Front matter 'triggers.pipeline.branches' entry {:?} must be single line (no newlines). \
     Multi-line values could inject YAML structure into the generated pipeline.",
    branch,
);

Context

Found during review of #184.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions