-
Notifications
You must be signed in to change notification settings - Fork 317
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
Refactor FossID config #9745
Refactor FossID config #9745
Conversation
namingProjectPattern
with projectName
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9745 +/- ##
=========================================
Coverage 68.08% 68.08%
Complexity 1293 1293
=========================================
Files 249 249
Lines 8845 8845
Branches 923 923
=========================================
Hits 6022 6022
Misses 2434 2434
Partials 389 389
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
357b58a
to
1c7d785
Compare
@sschuberth Would be nice to get this into the release tomorrow, then all breaking FossID config changes would happen in a single release. |
Looks like |
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.
Only some nits.
Remove the functionality to define a pattern to determine the project name and instead make the project name configurable as a constant value, because in practice it turned out that the flexibility provided by the pattern is not required. If no `projectName` is configured, it is determined from the Git repository URL as before. This change requires adaptations in the "delete newly triggered scans if a package cannot be scanned" test, because it used mocking to make the removed `createProjectCode` function behave in a way it would not behave at runtime. Signed-off-by: Martin Nonnenmacher <[email protected]>
Add support for `projectName` as a built-in variable for the `namingScanPattern`. This allows to easily include the project name in the generated scan code. Signed-off-by: Martin Nonnenmacher <[email protected]>
Remove support for adding custom naming variables prefixed with `namingVariable`. Instead, custom values can be written directly into the `namingScanPattern`. Signed-off-by: Martin Nonnenmacher <[email protected]>
1c7d785
to
3e6de50
Compare
Replace the custom options to define URL mappings with a single comma-separated option `urlMappings`. This will simplify the migration to the new plugin API. Signed-off-by: Martin Nonnenmacher <[email protected]>
This allows handling the property like all other config properties for consistency and removes the need to store the plain `options` in the config class. Signed-off-by: Martin Nonnenmacher <[email protected]>
3e6de50
to
7c29ab3
Compare
Refactor the FossID config to prepare for migrating scanners to the new plugin API. See the commit messages for details.