Skip to content

Conversation

@YourMCGeek
Copy link
Contributor

Description

Made https:// an optional group for matching to continue even if it's not present (e.g #23602). This change was made on both newMatch and newMatchGitHub as these are the most common formats for issues I've seen

Screencast

Checklist

Made https:// an optional group for matching to continue even if it's not present
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 22, 2025

Greptile Summary

This PR improves the issue bot's regex patterns by making https:// optional when matching extension URLs. This allows the bot to recognize extension links that are provided without the protocol prefix (e.g., raycast.com/owner/extension or github.com/raycast/extensions/tree/main/extensions/my-ext).

Key changes:

  • Updated newMatch regex to accept both https://raycast.com/... and raycast.com/...
  • Updated newMatchGitHub regex to accept both https://github.com/... and github.com/...
  • Both patterns maintain backward compatibility with existing URLs that include https://

The change is well-implemented with the (?:https:\/\/)? non-capturing optional group, which correctly handles all variations including those with www. subdomain. Testing confirms the regex properly rejects invalid patterns (wrong protocols, malformed URLs) while accepting the intended formats.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a simple and well-implemented regex modification that makes the protocol prefix optional. It maintains backward compatibility with all existing URLs, handles edge cases correctly (rejects invalid protocols and malformed URLs), and directly addresses the reported issue where extension URLs without https:// were not being recognized.
  • No files require special attention

Important Files Changed

Filename Overview
scripts/bots/issue-bot.ts Made https:// optional in extension URL regex patterns to support URLs without protocol prefix

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. scripts/bots/issue-bot.ts, line 20 (link)

    logic: Inconsistency: newMatchGitHub uses a capturing group (https:\/\/)? while newMatch on line 18 uses a non-capturing group (?:https:\/\/)?. This creates an off-by-one error in capture groups.

    When the regex matches, line 63 expects the extension folder in capture group 1, but if https:// is present, it becomes capture group 2.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@YourMCGeek
Copy link
Contributor Author

YourMCGeek commented Dec 22, 2025

Just fixed the regex, oops! greptile check again if you don't mind.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 22, 2025

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@raycastbot
Copy link
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Jan 6, 2026
@0xdhrv
Copy link
Contributor

0xdhrv commented Jan 6, 2026

@pernielsentikaer

This looks good

Matcher Regex101
newMatch https://regex101.com/r/m22JR3/1
newGitHubMatch https://regex101.com/r/YQklKH/1

Copy link
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

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

Looks good to me, checking with @pernielsentikaer for another view

@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Jan 6, 2026
@0xdhrv 0xdhrv merged commit e2576a8 into raycast:main Jan 6, 2026
7 checks passed
@YourMCGeek YourMCGeek deleted the patch-1 branch January 6, 2026 12:12
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.

4 participants