Skip to content

fix: use \w+ instead of \w{1,} in Label Missing Jira Info description regex#855

Open
nivSwisa1 wants to merge 1 commit into
mainfrom
fix-jira-description-regex-w-plus
Open

fix: use \w+ instead of \w{1,} in Label Missing Jira Info description regex#855
nivSwisa1 wants to merge 1 commit into
mainfrom
fix-jira-description-regex-w-plus

Conversation

@nivSwisa1
Copy link
Copy Markdown
Collaborator

@nivSwisa1 nivSwisa1 commented May 14, 2026

Summary

  • Replaces \w{1,} with \w+ in the description regex example. Same regex semantically; sidesteps a YAML/template serialization issue in the pipeline.

The pipeline's buildCMYaml post-process regex /'(\{\{[^}]+\}\})'/ is meant to strip the single-quotes that js-yaml adds around any template containing {. With \w{1,} the cleanup fails because [^}]+ stops at the inner } of {1,}. The engine then receives a quoted string instead of a template expression, emits "expected a boolean or a numeric value under if", and the check returns "true" (string) instead of true (boolean), breaking the missing-jira label rule.

Verified against niv-organization/swell-essentials#194 on dev-01: with \w{1,} the description check returned a string + syntax warning; with \w+ it round-trips cleanly.

Test plan

  • Confirm same matches: \w+\w{1,} for any string
  • Reproduce on dev-01 pipeline before fix (syntax warning emitted)
  • Confirm cmBuilder snapshot updated in pipeline PR linear-b/gitstream-sls-pipeline#2829

✨ PR Description

Purpose: Fix regex pattern in Jira ticket detection to use standard quantifier syntax for better compatibility and clarity.

Main changes:

  • Changed \w{1,} to \w+ in description regex pattern for matching Jira project keys

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Equivalent regex, but the braces in \w{1,} trip up js-yaml in the
gitstream pipeline's CM serialization (single-quotes the template, which
the post-process cleanup regex then can't unwrap), causing the rules
engine to see a string instead of a boolean. \w+ is the same pattern
with no `{` `}`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@orca-security-us orca-security-us Bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed OSS Licenses high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copy link
Copy Markdown

@linearb linearb Bot left a comment

Choose a reason for hiding this comment

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

✨ PR Review

LGTM

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

linearb[bot]
linearb Bot previously approved these changes May 14, 2026
Copy link
Copy Markdown
Collaborator

@MishaKav MishaKav left a comment

Choose a reason for hiding this comment

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

LG

@linearb linearb Bot dismissed their stale review May 14, 2026 15:01

Review dismissed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants