Skip to content

Commit

Permalink
Fix CI PR code convention check workflow (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
R055A authored Oct 20, 2023
1 parent 81455fc commit 2ced806
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/auto_update_stat_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
steps:

# Checks-out repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v3
- name: Check out code
uses: actions/checkout@v3

# Run using Python 3.11 for consistency and aiohttp
- name: Set up Python 3.11
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/non_auto_generate_stat_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
steps:

# Checks-out repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v3
- name: Check out code
uses: actions/checkout@v3

# Run using Python 3.11 for consistency and aiohttp
- name: Set up Python 3.11
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pull_request_code_convention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull Request Code Convention Check
on:
pull_request:
branches:
- master
- main

permissions:
contents: read
Expand All @@ -16,6 +16,9 @@ jobs:

steps:

- name: Check out code
uses: actions/checkout@v3

# Run using Python 3.11 for consistency
- name: Set up Python 3.11
uses: actions/setup-python@v3
Expand Down
6 changes: 3 additions & 3 deletions src/github_repo_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ async def lines_changed(self) -> Tuple[int, int]:
if sum(author_contribution_percentages) > 0:
self._avg_percent = f"{(sum(author_contribution_percentages) / len(repo_total_changes_arr) * 100):0.2f}%"

weighted_avg_percent = sum(
weighted_author_contribution_percentages
) / len(repo_total_changes_arr)
weighted_avg_percent = sum(weighted_author_contribution_percentages) / len(
repo_total_changes_arr
)
self._weighted_avg_percent = f"{weighted_avg_percent * 100:0.2f}%"
else:
self._weighted_avg_percent = self._avg_percent = "N/A"
Expand Down

0 comments on commit 2ced806

Please sign in to comment.