Skip to content

bugfix: updated regex and split condition#13

Merged
pjaincertinia2025 merged 3 commits into
mainfrom
enhance-regex-to-fix-extract-repo-name-from-ssh-url
Oct 15, 2025
Merged

bugfix: updated regex and split condition#13
pjaincertinia2025 merged 3 commits into
mainfrom
enhance-regex-to-fix-extract-repo-name-from-ssh-url

Conversation

@adawercertinia
Copy link
Copy Markdown
Collaborator

  • Enhance regex to make case insensitive and supported . in name of repository
  • Updated split condition

Comment thread output/output.go Outdated
func extractRepoNameFromURL(url string) string {
if url != "" {
findRepoNameRegexp := regexp.MustCompile(`[a-z0-9-]+/[a-z0-9-_]+\.git$`)
findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-]+/[a-z0-9-_.]+\.git$`)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-]+/[a-z0-9-_.]+\.git$`)
findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-_.]+/[a-z0-9-_.]+\.git$`)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Regex updated.

@pjaincertinia2025 pjaincertinia2025 merged commit 4a78f54 into main Oct 15, 2025
6 checks passed
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.

5 participants