Skip to content

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Jul 2, 2025

Description:

One Enterprise customer Gists were not being detected correctly. This PR fixes the gist detection logic.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@kashifkhan0771 kashifkhan0771 requested review from a team as code owners July 2, 2025 11:02
func isGistUrl(urlParts []string) bool {
return strings.EqualFold(urlParts[0], "gist.github.com") || (len(urlParts) == 4 && strings.EqualFold(urlParts[1], "gist"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the len(urlParts) == 4 condition since it was overly restrictive and failed to match enterprise gist URLs with different path structures.

@kashifkhan0771 kashifkhan0771 merged commit b630944 into trufflesecurity:main Jul 4, 2025
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the fix/oss-241 branch July 4, 2025 06:29
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.

2 participants