Remove Repositories::TreeFinder inheritance
What does this MR do and why?
Repositories::TreeFinder
was previously inheriting from GitRefFinder
, however, on inspection of the logic I found that the inherited logic is never used except for the attr_accessor
s and the initializer
Describe in detail what your merge request does and why.
- Removes parent class
GitRefFinder
fromRepositories::TreeFinder
- Adds
attr_accessor
for:params
- Delegates
repository
touser_project
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Make the FlightJS/flight project public
project = Project.find_by_full_path('flightjs/flight') project.id => 6 # if this is not 6 you will need to update the curl command below project.update visibility_level: Project::PUBLIC
- Query the api endpoint for listing repo trees
curl http://gdk.test:3000/api/v4/projects/6/repository/tree curl http://gdk.test:3000/api/v4/projects/6/repository/tree?recursive=true curl http://gdk.test:3000/api/v4/projects/6/repository/tree?recursive=true&path=doc curl http://gdk.test:3000/api/v4/projects/6/repository/tree?ref=trigger-hook
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Joe Woodward