Skip to content

fix(ubi): filter versions with tag_regex before trimming v prefixes#6421

Merged
jdx merged 2 commits intojdx:mainfrom
risu729:tag_regex_before_v_trim
Sep 25, 2025
Merged

fix(ubi): filter versions with tag_regex before trimming v prefixes#6421
jdx merged 2 commits intojdx:mainfrom
risu729:tag_regex_before_v_trim

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Sep 25, 2025

Allows filtering tags with v prefixes.

Copilot AI review requested due to automatic review settings September 25, 2025 19:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the order of operations in the UBI backend by filtering versions with tag_regex before trimming 'v' prefixes. This ensures that version filtering is performed on the original tag names before any string manipulation occurs.

  • Moved the tag_regex filtering logic to execute before trimming 'v' prefixes
  • Added debug logging to show which versions are filtered by tag_regex

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +91 to +93
let result = re.is_match(v);
debug!("filter {v} by tag_regex {re}: {result}");
result
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temporary result variable is unnecessary. Consider returning re.is_match(v) directly and moving the debug logging to a separate line for clarity.

Suggested change
let result = re.is_match(v);
debug!("filter {v} by tag_regex {re}: {result}");
result
debug!("filter {v} by tag_regex {re}: {}", re.is_match(v));
re.is_match(v)

Copilot uses AI. Check for mistakes.
@jdx jdx merged commit d67ea6f into jdx:main Sep 25, 2025
17 checks passed
@jdx jdx mentioned this pull request Sep 25, 2025
@risu729 risu729 deleted the tag_regex_before_v_trim branch September 26, 2025 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants