Skip to content

Commit

Permalink
Update Pylint badge in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Arturo Gonzalez committed Feb 4, 2024
1 parent 673a6ef commit 8ec687d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ jobs:
# Assuming you have a script or service to generate/update the badge
badge_url="https://some-badge-service.com/badge?score=$pylint_score"
echo "Badge URL: $badge_url"
# Update README.md or another document with the new badge URL
# This is a simplified example. You would need a script to properly update the README.md with the new badge URL.
- name: Update README with Pylint Badge
run: python update_readme.py README.md ${{ env.NEW_BADGE_URL }}


9 changes: 7 additions & 2 deletions pylint.py → update_readme.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import re


Expand Down Expand Up @@ -25,6 +26,10 @@ def update_badge_in_readme(readme_path, new_badge_url):

# Example usage
if __name__ == "__main__":
new_badge_url = "https://img.shields.io/badge/PyLint-9.5%2F10-green"
readme_path = "README.md"
if len(sys.argv) < 3:
print("Usage: python update_readme.py README_PATH NEW_BADGE_URL")
sys.exit(1)

readme_path = sys.argv[1]
new_badge_url = sys.argv[2]
update_badge_in_readme(readme_path, new_badge_url)

0 comments on commit 8ec687d

Please sign in to comment.