Skip to content

Improve regex pattern used for Jira issue key detection - #22833

Merged
raycastbot merged 4 commits into
raycast:mainfrom
AlbertoCortina:main
Nov 12, 2025
Merged

raycastbot merged 4 commits into
raycast:mainfrom
AlbertoCortina:main

Conversation

@AlbertoCortina

Copy link
Copy Markdown
Contributor

Description

I adapted the regex expression used to identify if a string is a Jira issue key. For the regex, I took into account the validation message I could see while creating a project

image

@AlbertoCortina AlbertoCortina changed the title Improve regex pattern used for Jira issue key detection #22820 Improve regex pattern used for Jira issue key detection Nov 12, 2025
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: jira-search-self-hosted Issues related to the jira-search-self-hosted extension platform: macOS labels Nov 12, 2025
@raycastbot

ghost commented Nov 12, 2025 •

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution! 🎉

🔔 @emanguy @svenwiegand @koseduhemak @rnprest @LunaticMuch @nick318 @marinsokol you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

Due to our current reduced availability, the initial review may take up to 10 business days.

@AlbertoCortina
AlbertoCortina force-pushed the main branch 3 times, most recently from f9b8297 to 3aba8fd Compare November 12, 2025 07:39
@greptile-apps

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR improves the regex pattern for detecting Jira issue keys in the jira-search-self-hosted extension. The change makes the pattern more restrictive to align with Jira's actual validation requirements: the updated regex requires at least 2 characters for the project key portion, starting with a letter followed by letters or numbers, which matches Jira's project creation validation. The pattern was changed from /^[a-z]+-[0-9]+$/i to /^[A-Z][A-Z0-9]+-\d+$/i and the implementation was optimized by switching from match() to test() method. Comprehensive JSDoc documentation was added to explain the validation rules with clear examples.

Important Files Changed

Filename Score Overview
extensions/jira-search-self-hosted/src/issue.ts 5/5 Improved Jira issue key detection regex with better validation and added comprehensive JSDoc documentation
extensions/jira-search-self-hosted/CHANGELOG.md 5/5 Added changelog entry documenting the improved search functionality for project keys with numbers

Confidence score: 5/5

  • This PR is extremely safe to merge with minimal risk
  • Score reflects a well-targeted bug fix that improves accuracy without breaking existing functionality
  • No files require special attention - both changes are straightforward improvements

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note

Minor feedback and suggestion

@0xdhrv

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Member

note

Thanks @AlbertoCortina for the updates

One minor lint issue exists; could you please take a look?

→ https://github.com/raycast/extensions/actions/runs/19297120047/job/55181786119?pr=22833#step:7:450

@raycast-extensions-bot raycast-extensions-bot Bot added the Approved Approved by a user label Nov 12, 2025
@pernielsentikaer pernielsentikaer self-assigned this Nov 12, 2025
@raycastbot
raycastbot merged commit e657a9a into raycast:main Nov 12, 2025
@github-actions

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@AlbertoCortina).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

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

Labels

Approved Approved by a user extension fix / improvement Label for PRs with extension's fix improvements extension: jira-search-self-hosted Issues related to the jira-search-self-hosted extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants