Skip to content

Update recipe 4#20

Open
olliestrachan-cs wants to merge 1 commit intocloudsmith-io:mainfrom
olliestrachan-cs:patch-1
Open

Update recipe 4#20
olliestrachan-cs wants to merge 1 commit intocloudsmith-io:mainfrom
olliestrachan-cs:patch-1

Conversation

@olliestrachan-cs
Copy link
Copy Markdown

re_match has been deprecated in favour of regex.match

re_match has been deprecated in favour of regex.match
Copilot AI review requested due to automatic review settings March 5, 2026 16:43
Copy link
Copy Markdown
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

Updates recipe 4 policy to use regex.match instead of the deprecated re_match.

Changes:

  • Replaced deprecated re_match(...) usage with regex.match(...) in recipe-4/policy.rego.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread recipe-4/policy.rego
reason contains msg if {
pkg := input.v0["package"]
re_match(".*(debug|test|tmp).*", pkg.filename)
regex.match(".*(debug|test|tmp).*", pkg.filename)
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The added line appears to have accidentally included the diff line label (9 |) as part of the code (as shown in the hunk). If that 9 | is actually present in the file, it will cause a Rego parse error. Ensure the line is only regex.match(\".*(debug|test|tmp).*\", pkg.filename) with the expected indentation, without any | or line-number artifacts.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants