Skip to content

feature: skip mode — emit unmatched steps as skipped instead of omitting them #172

@JonCubed

Description

@JonCubed

Problem

When a watch path doesn't match, the plugin omits the step entirely from the generated pipeline. This breaks dependency chains. If a downstream step has depends_on targeting a group or step key that was omitted, the build will fail or stall waiting for a step that was never created.

Suggestion

Add an opt-in mode where unmatched steps are emitted with skip: "No changes detected" rather than being omitted. A skipped step in Buildkite is treated as completed, so depends_on references resolve correctly.

This could be configured at the plugin level (suggested names: skip_on_no_changes or always_emit):

- monorepo-diff#v1.x.x:
    diff: "git diff --name-only HEAD~1"
    skip_on_no_changes: true
    watch:
      - path: services/
        config:
          group: Test Group
          key: group:test
          steps:
            - command: echo deploy

When skip_on_no_changes is true and the path doesn't match, the generated pipeline would include:

steps:
  - group: Test Group
    key: group:test
    skip: "No changes detected"
    steps:
      - command: echo deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions