Allow repositories to ignore specific injected workflows #50

Open
opened 2026-11-20 18:51:43 +00:00 by martin · 2 comments
Owner

Goal

Let a repository opt out of individual workflows injected by the global extension, without changing shared rules or disabling an entire rule.

Motivation

Personal/backstage matches the bun-astro rule and receives bun-verify, bun-push, and bun-deploy, but it is not an Astro app and bun-deploy opens a deployment PR. The label-based match_not_labels mechanism can exclude a whole rule, but it requires a shared configuration change and cannot keep one workflow from a rule while dropping another. A repository-local list of workflow names is more precise and keeps the decision in the repository.

Proposed behavior

Extend the existing root-level woodpecker.toml:

labels = ["destination:cluster"]
ignored_workflows = ["bun-verify", "bun-push", "bun-deploy"]
  • Names match Configuration.name (the [workflows.*] key in the extension configuration).
  • The filter applies to workflows injected by a matching rule.
  • Always-injected workflows from endpoints.routes[].workflows stay unconditional, matching the current documented behavior.
  • Workflows already present in the repository's own pipeline are unaffected; the extension cannot remove them. If a local workflow has the same name, it still runs.
  • Unknown names are ignored, optionally logged, and do not fail the request.
  • Exact names only; no globs in the first version.
  • The file is read at the pipeline revision, like labels.

Acceptance criteria

  • woodpecker.toml accepts an optional ignored_workflows list of strings.
  • Matching rule-injected workflows are omitted from the endpoint response.
  • Always-injected workflows remain unconditional.
  • Incoming repository workflows pass through unchanged.
  • Unknown names do not fail the request.
  • Unit and integration tests cover rule-injected, always-injected, unknown-name, and local-workflow cases.
  • README documentation is updated.
  • A Personal/backstage pipeline can drop bun-verify, bun-push, and bun-deploy while keeping flake-check and renovate-lint.
## Goal Let a repository opt out of individual workflows injected by the global extension, without changing shared rules or disabling an entire rule. ## Motivation `Personal/backstage` matches the `bun-astro` rule and receives `bun-verify`, `bun-push`, and `bun-deploy`, but it is not an Astro app and `bun-deploy` opens a deployment PR. The label-based `match_not_labels` mechanism can exclude a whole rule, but it requires a shared configuration change and cannot keep one workflow from a rule while dropping another. A repository-local list of workflow names is more precise and keeps the decision in the repository. ## Proposed behavior Extend the existing root-level `woodpecker.toml`: ```toml labels = ["destination:cluster"] ignored_workflows = ["bun-verify", "bun-push", "bun-deploy"] ``` - Names match `Configuration.name` (the `[workflows.*]` key in the extension configuration). - The filter applies to workflows injected by a matching rule. - Always-injected workflows from `endpoints.routes[].workflows` stay unconditional, matching the current documented behavior. - Workflows already present in the repository's own pipeline are unaffected; the extension cannot remove them. If a local workflow has the same name, it still runs. - Unknown names are ignored, optionally logged, and do not fail the request. - Exact names only; no globs in the first version. - The file is read at the pipeline revision, like labels. ## Acceptance criteria - [ ] `woodpecker.toml` accepts an optional `ignored_workflows` list of strings. - [ ] Matching rule-injected workflows are omitted from the endpoint response. - [ ] Always-injected workflows remain unconditional. - [ ] Incoming repository workflows pass through unchanged. - [ ] Unknown names do not fail the request. - [ ] Unit and integration tests cover rule-injected, always-injected, unknown-name, and local-workflow cases. - [ ] README documentation is updated. - [ ] A `Personal/backstage` pipeline can drop `bun-verify`, `bun-push`, and `bun-deploy` while keeping `flake-check` and `renovate-lint`. ## Related - Builds on the local config introduced in #24. - Personal/backstage#44 and Personal/nixos-configuration#68 currently plan the label-based workaround; if this feature lands first, those can be simplified or closed.
Author
Owner

Chosen path: implement this feature and release it. Personal/backstage#44 will use ignored_workflows to drop bun-verify, bun-push, and bun-deploy; Personal/nixos-configuration#68 is now scoped to bumping and deploying the extension after this ships. The label-based match_not_labels approach is dropped.

Chosen path: implement this feature and release it. Personal/backstage#44 will use `ignored_workflows` to drop `bun-verify`, `bun-push`, and `bun-deploy`; Personal/nixos-configuration#68 is now scoped to bumping and deploying the extension after this ships. The label-based `match_not_labels` approach is dropped.
Author
Owner

Backstage no longer plans to use this feature for the bun-astro false positive. The chosen fix is to narrow the shared rule so it requires an Astro config (Personal/nixos-configuration#68). Personal/backstage#44 is closed as superseded. This issue remains a useful general enhancement, but it no longer blocks Personal/backstage#20 or #42.

Backstage no longer plans to use this feature for the `bun-astro` false positive. The chosen fix is to narrow the shared rule so it requires an Astro config (Personal/nixos-configuration#68). Personal/backstage#44 is closed as superseded. This issue remains a useful general enhancement, but it no longer blocks Personal/backstage#20 or #42.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Personal/woodpecker-extension#50
No description provided.