Skip to content

Commit

Permalink
Merge pull request #3666 from 2000rosser/issue-#3637
Browse files Browse the repository at this point in the history
Add the project name and project URL to bom processing notifications

Closes #3637
  • Loading branch information
nscuro authored May 5, 2024
2 parents 1edf31b + 95c45ea commit ff22d4f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/resources/templates/notification/publisher/msteams.peb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,29 @@
"value": "{{ subject.project.toString | escape(strategy="json") }}"
}
],
{% elseif notification.group == "BOM_PROCESSING_FAILED" %}
"facts": [
{
"name": "Level",
"value": "{{ notification.level | escape(strategy="json") }}"
},
{
"name": "Scope",
"value": "{{ notification.scope | escape(strategy="json") }}"
},
{
"name": "Group",
"value": "{{ notification.group | escape(strategy="json") }}"
},
{
"name": "Project",
"value": "{{ subject.project.toString | escape(strategy="json") }}"
},
{
"name": "Project URL",
"value": "{{ baseUrl }}/projects/{{ subject.project.uuid | escape(strategy='json') }}"
}
],
{% else %}
"facts": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ public void testInformWithBomProcessingFailedNotification() {
{
"name": "Group",
"value": "BOM_PROCESSING_FAILED"
},
{
"name": "Project",
"value": "pkg:maven/org.acme/projectName@projectVersion"
},
{
"name": "Project URL",
"value": "https://example.com/projects/c9c9539a-e381-4b36-ac52-6a7ab83b2c95"
}
],
"text": "An error occurred while processing a BOM"
Expand Down Expand Up @@ -135,6 +143,14 @@ public void testInformWithBomProcessingFailedNotificationAndNoSpecVersionInSubje
{
"name": "Group",
"value": "BOM_PROCESSING_FAILED"
},
{
"name": "Project",
"value": "pkg:maven/org.acme/projectName@projectVersion"
},
{
"name": "Project URL",
"value": "https://example.com/projects/c9c9539a-e381-4b36-ac52-6a7ab83b2c95"
}
],
"text": "An error occurred while processing a BOM"
Expand Down

0 comments on commit ff22d4f

Please sign in to comment.