Skip to content

Commit

Permalink
Create a new entry in the msteams pebble format for BOM_PROCESS_FAILE…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
2000rosser authored and rkg-mm committed May 5, 2024
1 parent 5a70191 commit efe2c29
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 efe2c29

Please sign in to comment.