Closed felixlut closed 1 year ago
You have successfully added a new CodeQL configuration .github/workflows/codeql-analysis.yml:analyze/language:go
. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.
When you create a Portfolio in
TAGS
,REGEX
orREST
mode without specifying abranch
, the Portfolio should pick the default branch (or as SonarQube calls it, "Main Branch") of the Project. When setting the mode via the API, an optional parameterbranch
can be used for this purpose. If it's left unset, then the Portfolio will pick the default branch of the project, but setting it to""
does not yield the same result as one might expect.This PR fixes that by only appending the
branch
parameter when it is actually set in theTerraform
resource.Calling the API, we can see that this Portfolio, which does not pick up the default branch of its projects, and was created with the provider without setting the![bild](https://user-images.githubusercontent.com/34520175/229276921-df3bbee7-dcf7-457a-af1b-4942329ca743.png)
branch
in the resource, still setbranch
to""
via theapi/views/show?key=on-prem
endpoint:With this update, the resulting Portfolio looks like this instead:![bild](https://user-images.githubusercontent.com/34520175/229277193-3552597c-7167-4cd3-a224-f8118209d0e9.png)