feat: Added gitlab as vcsprovider in codereference#7201
Open
SahilJat wants to merge 1 commit intoFlagsmith:mainfrom
Open
feat: Added gitlab as vcsprovider in codereference#7201SahilJat wants to merge 1 commit intoFlagsmith:mainfrom
SahilJat wants to merge 1 commit intoFlagsmith:mainfrom
Conversation
|
@SahilJat is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
a2ebc9d to
a97f79b
Compare
LiveReview Pre-Commit Check: skipped LiveReview Pre-Commit Check: skipped
20b6998 to
90133a2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7201 +/- ##
==========================================
- Coverage 98.35% 98.28% -0.08%
==========================================
Files 1348 1349 +1
Lines 50691 50603 -88
==========================================
- Hits 49859 49736 -123
- Misses 832 867 +35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7134
Please describe.
Types: Added
GITLABtoVCSProviderand included vcs_provider inCodeReferencesRepositoryCount.Models: Added
vcs_providertoFeatureFlagCodeReferencesScanwith a default of "github". Generated the corresponding migration.Services: Updated
_get_permalink()to handle GitLab's specific file permalink format(/-/blob/{revision}/{file_path}#L{line_number}).Serializers: Exposed vcs_provider in the upload serializer and the count serializer.
Views: Updated the Feature list API (code_references_counts) to expose the vcs_provider.
How did you test this code?
Please describe.
Added unit tests for _get_permalink() covering both public and self-hosted GitLab URLs (with and without trailing slashes).
Added view tests for the POST .../code-references/ endpoint to verify it accepts "gitlab", rejects invalid providers, and defaults to "github".
Added view tests for the Detail view to verify GitLab scans return the correct /-/blob/ permalinks.
Updated feature list API tests to assert vcs_provider is present in code_references_counts.