feat: support excluding task namespaces - #2959
Merged
Merged
Conversation
vmaerten
reviewed
Aug 9, 2026
vmaerten
left a comment
Member
There was a problem hiding this comment.
Thanks for working on this
I know it's not like this in the issue but can you make excludes entries match task names exactly, and require a trailing :* for a namespace? So excludes: [debug] only excludes a task named debug, while excludes: ['debug:*'] excludes everything under it.
Two reasons:
- Everywhere else in Task a task name means exactly that task. A bare name here would silently change behaviour for anyone who has both a
deploytask and adeploy:namespace, which would be misleading for our users. - It also keeps the door open for the glob/regex support if we want to add it later
The rest looks good
Happy to push these changes myself if you prefer.
Contributor
Author
|
Thanks for the feedback and for offering to help! I've applied the requested changes in
The following checks all pass locally:
Please take another look when you have a chance. |
vmaerten
added a commit
that referenced
this pull request
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
includes.excludesentries ending in:*to exclude entire task namespaces.:*.foo:*excludesfoo:child, but not the standalonefootask or tasks in similarly prefixed namespaces such asfoo-other.Testing
go test ./... -run '^TestIncludesWithExclude$' -count=1go test ./taskfile/... -count=1go vet ./...AI Assistance
AI assistance was used to review the changes. During the review, it identified that the
excludesdescription in the public JSON Schema had not been updated to mention namespaces. I reviewed and fixed the inconsistency before submitting this pull request.Fixes #2300