-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Gitlab retriever #696
Add Gitlab retriever #696
Conversation
✅ Deploy Preview for go-feature-flag-doc-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
@@ Coverage Diff @@
## main #696 +/- ##
==========================================
+ Coverage 88.94% 89.04% +0.10%
==========================================
Files 58 59 +1
Lines 2713 2775 +62
==========================================
+ Hits 2413 2471 +58
- Misses 245 248 +3
- Partials 55 56 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ruairi-wmf thanks a lot for your pull request this is an awesome addition to GO Feature Flag.
I have looked at your PR and I have a few things that are not working.
I saw that you are not using the GitLab API to retrieve the files but the public raw access from the website.
From my early investigation, I think it could be great to use the API instead.
This API can help us doing what we want to do: https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository
I've done a quick CURL to test it and it seems to work perfectly.
curl --header "PRIVATE-TOKEN: <GITLAB TOKEN>" "https://gitlab.com/api/v4/projects/<REPOSITORY SLUG url encoded>/repository/files/<PATH OF YOUR file url encoded>/raw?ref=main"
A point of attention is to be sure that you URL encode both the repository slug and the path of your file.
- If your slug is
thomas.poignant/test-go-feature-flag-provider
is should bethomas.poignant%2Ftest-go-feature-flag-provider
in the URL. - If your path is
testdata/flags.yaml
it should betestdata%2Fflags.yaml
in the URL.
Thanks Thomas, I'll work on this tonight. Cheers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey thanks again for the changes, I have left some new comments.
If you need any help or more information let me know.
Hey @ruairi-wmf I have used your PR to finish it with my remarks. |
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Changes include
Closes issue(s)
Resolve #695
Checklist
README.md
and/website/docs
)