-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Add the project name and project URL to bom processing notifications #3666
Conversation
Previously, the user was only notified of the result of the BOM processing. Now the user is told the name of the project for each notificication, and for errors, they are also given the project URL Signed-off-by: Ross Murphy <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more |
When I cloned the repo and ran the App, it was using the BomUploadProcessingTask class. There is also the option to use BomUploadProcessingTaskV2, which is what the unit tests are checking. Which class is the correct one to make the changes? |
@2000rosser I don't think you need to touch the code dispatching the notification internally at all. The notification subject already includes the When calling For each applicable rule, it will invoke the corresponding publisher (i.e. email, MS Teams, Slack).
dependency-track/src/main/java/org/dependencytrack/notification/publisher/Publisher.java Lines 83 to 143 in 7285d90
The template files live here. I recently added a suite of tests that assert the current output of all publishers. The relevant test case for this issue can be found here: dependency-track/src/test/java/org/dependencytrack/notification/publisher/MsTeamsPublisherTest.java Lines 71 to 107 in 7285d90
You will notice that the corresponding test case for the email publisher does include the desired information: dependency-track/src/test/java/org/dependencytrack/notification/publisher/SendMailPublisherTest.java Lines 144 to 178 in 7285d90
So ideally you shouldn't have to touch any code at all, except the test that is asserting the current output for MS Teams once the template has been updated. |
@nscuro Thank you for taking the time to explain, it makes a lot more sense now. |
…cations" This reverts commit 063c2b3. Signed-off-by: Ross Murphy <[email protected]>
…D to include the project URL and Name and add to test Previously there was no information as to what project was affected by the failed upload. Signed-off-by: Ross Murphy <[email protected]>
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.
Thanks @2000rosser!
Description
Previously, the user was only notified of the result of the BOM processing.
Now the user is told the name of the project for each notificication, and for processing errors, they are also given the project URL
Addressed Issue
#3637
Checklist