@@ -673,7 +673,7 @@ func TestPreparePullRequestDetails(t *testing.T) {
673
673
SuggestedFixedVersion : "1.0.0" ,
674
674
},
675
675
}
676
- expectedPrBody := "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | | package1:1.0.0 | 1.0.0<br><br>2.0.0 |\n \n </div>\n \n ## 👇 Details\n \n \n \n \n - **Severity** 🔥 High\n - **Package Name:** package1\n - **Current Version:** 1.0.0\n - **CVE:** CVE-2022-1234\n - **Fixed Versions:** 1.0.0,2.0.0\n \n **Description:**\n \n summary\n \n \n \n \n ---\n \n <div align=\" center\" >\n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n </div>\n \n ---\n <div align=\" center\" >\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n "
676
+ expectedPrBody := "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS | CVES |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | :---------------------------------: | \n | <br> High | | package1:1.0.0 | 1.0.0<br>2.0.0 | CVE-2022-1234 |\n \n </div>\n \n ## 👇 Details\n \n \n **Description:**\n summary\n \n \n ---\n \n <div align=\" center\" >\n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n </div>\n \n ---\n <div align=\" center\" >\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>"
677
677
prTitle , prBody , err := cfp .preparePullRequestDetails (vulnerabilities ... )
678
678
assert .NoError (t , err )
679
679
assert .Equal (t , "[🐸 Frogbot] Update version of package1 to 1.0.0" , prTitle )
@@ -690,13 +690,13 @@ func TestPreparePullRequestDetails(t *testing.T) {
690
690
SuggestedFixedVersion : "2.0.0" ,
691
691
})
692
692
cfp .aggregateFixes = true
693
- expectedPrBody = "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | | package1:1.0.0 | 1.0.0<br><br>2.0.0 |\n | <br>Critical | | package2:2.0.0 | 2.0.0<br><br>3.0.0 |\n \n </div>\n \n ## 👇 Details\n \n \n <details>\n <summary> <b>[ CVE-2022-1234 ] package1 1.0.0</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Package Name:** package1\n - **Current Version:** 1.0.0\n - **CVE:** CVE-2022-1234\n - **Fixed Versions:** 1.0.0,2.0.0\n \n **Description:**\n \n summary\n \n \n \n </details>\n \n \n <details>\n <summary> <b>[ CVE-2022-4321 ] package2 2.0.0</b> </summary>\n <br>\n \n - **Severity** 💀 Critical\n - **Package Name:** package2\n - **Current Version:** 2.0.0\n - **CVE:** CVE-2022-4321\n - **Fixed Versions:** 2.0.0,3.0.0\n \n **Description:**\n \n summary\n \n \n \n </details>\n \n \n ---\n \n <div align=\" center\" >\n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n </div>\n \n ---\n <div align=\" center\" >\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n [comment]: <> (Checksum: bec823edaceb5d0478b789798e819bde)\n "
693
+ expectedPrBody = "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS | CVES |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | :---------------------------------: | \n | <br> High | | package1:1.0.0 | 1.0.0<br>2.0.0 | CVE-2022-1234 |\n | <br>Critical | | package2:2.0.0 | 2.0.0<br>3.0.0 | CVE-2022-4321 |\n \n </div>\n \n ## 👇 Details\n \n <details>\n <summary> <b>[ CVE-2022-1234 ] package1 1.0.0</b> </summary>\n <br>\n \n **Description:**\n summary\n \n \n </details>\n \n \n <details>\n <summary> <b>[ CVE-2022-4321 ] package2 2.0.0</b> </summary>\n <br>\n \n **Description:**\n summary\n \n \n </details>\n \n \n ---\n \n <div align=\" center\" >\n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n </div>\n \n ---\n <div align=\" center\" >\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n [comment]: <> (Checksum: bec823edaceb5d0478b789798e819bde)\n "
694
694
prTitle , prBody , err = cfp .preparePullRequestDetails (vulnerabilities ... )
695
695
assert .NoError (t , err )
696
696
assert .Equal (t , outputwriter .GetAggregatedPullRequestTitle ("" ), prTitle )
697
697
assert .Equal (t , expectedPrBody , prBody )
698
698
cfp .OutputWriter = & outputwriter.SimplifiedOutput {}
699
- expectedPrBody = "**🚨 This automated pull request was created by Frogbot and fixes the below:**\n \n \n ---\n ## 📦 Vulnerable Dependencies\n ---\n \n ### ✍️ Summary \n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | High | | package1:1.0.0 | 1.0.0, 2.0.0 |\n | Critical | | package2:2.0.0 | 2.0.0, 3.0.0 |\n \n ---\n ### 👇 Details\n ---\n \n \n #### [ CVE-2022-1234 ] package1 1.0.0\n \n \n - **Severity** 🔥 High\n - **Package Name:** package1\n - **Current Version:** 1.0.0\n - **CVE:** CVE-2022-1234\n - **Fixed Versions:** 1.0.0,2.0.0\n \n **Description:**\n \n summary\n \n \n \n \n #### [ CVE-2022-4321 ] package2 2.0.0\n \n \n - **Severity** 💀 Critical\n - **Package Name:** package2\n - **Current Version:** 2.0.0\n - **CVE:** CVE-2022-4321\n - **Fixed Versions:** 2.0.0,3.0.0\n \n **Description:**\n \n summary\n \n \n \n \n ---\n \n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n [comment]: <> (Checksum: bec823edaceb5d0478b789798e819bde)\n "
699
+ expectedPrBody = "**🚨 This automated pull request was created by Frogbot and fixes the below:**\n \n \n ---\n ## 📦 Vulnerable Dependencies\n ---\n \n ### ✍️ Summary \n \n \n | SEVERITY | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS | CVES |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | :---------------------------------: | \n | High | | package1:1.0.0 | 1.0.0, 2.0.0 | CVE-2022-1234 |\n | Critical | | package2:2.0.0 | 2.0.0, 3.0.0 | CVE-2022-4321 |\n \n ---\n ### 👇 Details\n ---\n \n \n #### [ CVE-2022-1234 ] package1 1.0.0\n \n \n **Description:**\n summary\n \n \n #### [ CVE-2022-4321 ] package2 2.0.0\n \n \n **Description:**\n summary\n \n \n ---\n \n \n **Frogbot** also supports **Contextual Analysis, Secret Detection and IaC Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/xray/) package, which isn't enabled on your system.\n \n [🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n [comment]: <> (Checksum: bec823edaceb5d0478b789798e819bde)\n "
700
700
prTitle , prBody , err = cfp .preparePullRequestDetails (vulnerabilities ... )
701
701
assert .NoError (t , err )
702
702
assert .Equal (t , outputwriter .GetAggregatedPullRequestTitle ("" ), prTitle )
0 commit comments