Hi,
Okay! I didn’t understand what you meant by “scans to the proper portfolio”.
The automatic options are to include projects in that Credit
portfolio by name/key regex, or by project tags. So unless all the projects under Debit have a common substring in their names or keys, I don’t think this is going to be automatable natively within SonarQube.
Your best bet is to script this using the Web APIs.
The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.
You may also find this guide helpful.
HTH,
Ann