feat: add 'exclude' input to filter versions#41
Draft
Koan-Bot wants to merge 1 commit into
Draft
Conversation
happy-barney
reviewed
Mar 8, 2026
| } | ||
|
|
||
| function parse_exclude (exclude) { | ||
| if (!exclude) return []; |
Collaborator
There was a problem hiding this comment.
- function should also silently accept serialized json array
- user may use chain of
perl-versionscall passing result of one as argument of another
- user may use chain of
- consistency:
- use function name
parse_input_version_list - export it and call it same way as
parse_input_version- before callingperl_versions
- use function name
Follow-ups:
targetcan be element of list, for example: list of versions included in target A but not included in target Bincludeinput parameter - when specified, versions are included into filtered list right beforesingle-outis applied
| const excluded = new Set (parse_exclude (exclude).map ((v) => { | ||
| if (v === 'devel') return 'devel'; | ||
| const decoded = decode_version (v); | ||
| return decoded ? `${decoded.major}.${decoded.minor}` : null; |
Collaborator
There was a problem hiding this comment.
Note 1:
Useless L65, that is already done by decode_version.
In fact, maybe we should also move L63 in it.
Note 2:
Please move exclusion into separated function, so this function will in future look like:
versions = perl_versions_target (target);
versions = perl_versions_filter (versions, ...);
versions = perl_versions_exclude (versions, ...);
versions = perl_versions_include (versions, ...);
// hypothetical support for `asc`/`desc` ordering with `devel first` / `devel last`
versions = perl_versions_sort (versions, ...);
return versions;
This was referenced Mar 8, 2026
Add a comma-separated 'exclude' input that removes specific versions from the generated list, eliminating the need for shell-based post-processing workarounds like jq filters. Versions in the exclude list are normalized via decode_version(), supporting formats like '5.32', 'v5.32', and 'devel'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2235f1d to
9d2bbca
Compare
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.
What
Add an
excludeinput that accepts a comma-separated list of versions to remove from the output.Why
Users currently need shell-based post-processing (jq filters) to remove specific versions from the matrix. This is a common need — e.g., skipping a known-broken Perl version on a specific platform.
How
perl_versions()accepts a newexcludestring parameterdecode_version(), so5.32,v5.32, anddevelall workTesting
npm test— 71 tests pass (8 new for exclude)npm run build— dist rebuilt