klesh opened a new pull request, #6146:
URL: https://github.com/apache/incubator-devlake/pull/6146

   ### Summary
   
   Previously, the connection/scope/scopeConfig were written at different times 
by multiple people so the code is kind of messy.
   
   This PR tries to unify them in a more readable and maintainable way:
   
   1. introduce `service helper` and `api helper`, the former is designed to 
help with business logic, like loading from the database, creating, updating, 
and validating, while the latter acts as the adapter between Http Requests and 
Services
   2. introduce `model service helper` which implements some basic business 
logic shared by all models so you may nest the helper within your own service 
class and use the functionalities in any way you want including exposing them 
directly or overriding them when needed.
   3. connection / scope / scope helpers are organized in a unified way, all 
are offered both a `service helper` and an `api helper`, the former helper can 
be used in any package as you see fit, while the latter `api helper` should be 
used only in the `api/` package.
   4. this PR only updates part of the `github` plugins as a PoC, I will work 
on other after the PR merge
   
   ### Does this close any open issues?
   Part of #5519
   
   ### Screenshots
   
   Note that there is a API change, @mintsweet 
   <img width="964" alt="sope list" 
src="https://github.com/apache/incubator-devlake/assets/61080/4debf567-51ca-4ced-8529-43c82d0fa5c4";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to