Skip to content

Commit c223b75

Browse files
Update README.md to rename the total lines of code badge for consistency and clarity, and modify GitHub Actions workflow to use the standard GITHUB_TOKEN for authentication.
1 parent b831198 commit c223b75

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/total-loc-badge.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ jobs:
1515
- name: Install dependencies
1616
run: sudo apt-get update && sudo apt-get install -y cloc jq gh
1717

18-
- name: Setup GitHub CLI
19-
uses: cli/cli-action@v2
20-
with:
21-
github_token: ${{ secrets.GH_PAT }}
22-
23-
- name: Clone and count LOC
18+
- name: Clone all public repos and count LOC
2419
run: |
2520
mkdir repos || true
26-
gh repo list Kirito666codr --limit 100 --json nameWithOwner,isFork,visibility -q '.[] | select(.isFork==false and .visibility=="public") | .nameWithOwner' > repos.txt
21+
gh repo list Kirito666codr --limit 100 --json nameWithOwner,isFork,visibility \
22+
-q '.[] | select(.isFork==false and .visibility=="public") | .nameWithOwner' > repos.txt
2723
2824
echo "Counting lines..."
2925
TOTAL=0
@@ -42,5 +38,5 @@ jobs:
4238
- name: Upload badge to GitHub Pages
4339
uses: peaceiris/actions-gh-pages@v3
4440
with:
45-
github_token: ${{ secrets.GH_PAT }}
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
4642
publish_dir: ./badge

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,4 +523,4 @@ me.expandSkills(); // [ ...no limits ]
523523
</details>
524524
<hr/>
525525

526-
![Total Lines of Code](https://img.shields.io/endpoint?url=https://Kirito666codr.github.io/total-loc-badge/loc-badge.json)
526+
![Total LOC](https://img.shields.io/endpoint?url=https://Kirito666codr.github.io/total-loc-badge/loc-badge.json)

0 commit comments

Comments
 (0)