Skip to content

Conversation

@adawercertinia
Copy link
Collaborator

  • Updated regex to extract repository name from SSH or HTTPs url.

dsinghcertinia
dsinghcertinia previously approved these changes Jan 7, 2026
ajaincertinia
ajaincertinia previously approved these changes Jan 8, 2026
output/output.go Outdated
func extractRepoNameFromURL(url string) string {
if url != "" {
findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-_.]+/[a-z0-9-_.]+\.git$`)
findRepoNameRegexp := regexp.MustCompile(`(?i)([a-z0-9-_.]+)\.git$`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just for safe side I would suggest to add a / before the regex.

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

gkumarcertinia
gkumarcertinia previously approved these changes Jan 8, 2026
gkumarcertinia
gkumarcertinia previously approved these changes Jan 8, 2026
@pjaincertinia2025 pjaincertinia2025 merged commit fb35d34 into main Jan 8, 2026
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.

6 participants