Skip to content

Commit

Permalink
feat: add severity to advisories list (#312)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikaël Barbero <mikael.barbero@eclipse-foundation.org>
  • Loading branch information
mbarbero authored Oct 31, 2024
1 parent 692c64c commit ff09cc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion otterdog/operations/list_advisories.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def pre_execute(self) -> None:
self.printer.println(f"Listing {self.states} repository security advisories:")
if not self.details:
self.printer.println(
"organization,created_at,updated_at,published_at,state,ghsa_id,cve_id,html_url,summary"
"organization,created_at,updated_at,published_at,state,severity,ghsa_id,cve_id,html_url,summary"
)

def post_execute(self) -> None:
Expand Down Expand Up @@ -95,6 +95,7 @@ async def execute(
"updated_at": format_date_for_csv(advisory["updated_at"]),
"published_at": format_date_for_csv(advisory["published_at"]),
"state": advisory["state"],
"severity": advisory["severity"],
"ghsa_id": advisory["ghsa_id"],
"cve_id": cve_id,
"html_url": advisory["html_url"],
Expand All @@ -107,6 +108,7 @@ async def execute(
f"\"{formatted_values['updated_at']}\","
f"\"{formatted_values['published_at']}\","
f"\"{formatted_values['state']}\","
f"\"{formatted_values['severity']}\","
f"\"{formatted_values['ghsa_id']}\","
f"\"{formatted_values['cve_id']}\","
f"\"{formatted_values['html_url']}\","
Expand Down

0 comments on commit ff09cc9

Please sign in to comment.