Skip to content

Commit

Permalink
first-push
Browse files Browse the repository at this point in the history
  • Loading branch information
bgido committed Nov 15, 2023
1 parent 19c4856 commit 5293937
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 12 additions & 1 deletion Python_function_replace_severity_values/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# memphis-functions
## memphis-functions

# This function parses a json file and replaces the severity values with other values according to the following logic -
If the value of the severity = 1, it replaces 1 with low
If the value of severity = 2, it replaces 2 with medium
If the value of the severity = 3, it replaces 3 with high
If the value of the severity = 4, it replaces 4 with critical
If the value of the severity = warning, it replaces warning with low
If the value of severity = minor, it replaces minor with medium
If the value of the severity = major, it replaces major with high
If the value of the severity = critical, it leaves critical as critical
The output is json with the new values of the severity field
11 changes: 1 addition & 10 deletions Python_function_replace_severity_values/memphis.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
function_name: replace_severity_values
description: This function parses a json file and replaces the severity values with other values according to the following logic -
If the value of the severity = 1, it replaces 1 with low
If the value of severity = 2, it replaces 2 with medium
If the value of the severity = 3, it replaces 3 with high
If the value of the severity = 4, it replaces 4 with critical
If the value of the severity = warning, it replaces warning with low
If the value of severity = minor, it replaces minor with medium
If the value of the severity = major, it replaces major with high
If the value of the severity = critical, it leaves critical as critical
The output is json with the new values of the severity field
description: This function parses a json file and replaces the severity values with other values
# tags:
# - tag: tag1
runtime: python3.11 # nodejs | nodejs4.3-edge | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | nodejs16.x | nodejs18.x | python2.7 | python3.6 | python3.7 | python3.8 | python3.9 | python3.10 | python3.11 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | dotnet6
Expand Down

0 comments on commit 5293937

Please sign in to comment.