Skip to content

Commit

Permalink
Add description field.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett0000FF committed Mar 18, 2024
1 parent 351bb5a commit 25f08e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add RULES.md
TIMESTAMP=$(date -u +"%Y-%m-%d UTC")
TIMESTAMP=$(date -u +"%Y-%m-%d")
git commit -m "Update RULES.md - $TIMESTAMP." || echo "No changes to commit."
git push
6 changes: 4 additions & 2 deletions scripts/update-rules-page.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from datetime import datetime

def generate_rule_markdown(rule_data):
message = rule_data['message']
markdown = f"### {message}\n\n"

## Use description field if it exists; if not, use message field
description = rule_data.get('description', rule_data['message'])
markdown = f"### {description}\n\n"
markdown += f"**Level:** *{rule_data['level']}*\n\n"

if 'link' in rule_data:
Expand Down
1 change: 1 addition & 0 deletions styles/Datadog/abbreviations.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extends: substitution
description: Don't use Latin abbreviations
message: "Use '%s' instead of abbreviations like '%s'."
link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#abbreviations"
ignorecase: true
Expand Down
1 change: 1 addition & 0 deletions styles/Datadog/americanspelling.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extends: existence
description: Use American spelling
message: "In general, use American spelling instead of '%s'."
link: 'https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md'
ignorecase: true
Expand Down

0 comments on commit 25f08e6

Please sign in to comment.