Skip to content

Improve project status report table format and fix commit count accuracy#56

Merged
gvegayon merged 8 commits into
mainfrom
copilot/fix-55
Aug 12, 2025
Merged

Improve project status report table format and fix commit count accuracy#56
gvegayon merged 8 commits into
mainfrom
copilot/fix-55

Conversation

Copilot AI commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

This PR implements improvements to the project status report generation to create a more compact and readable table format, and fixes a critical issue with commit count accuracy.

Table Format Improvements

Consolidated Table Columns

Combined three separate columns ("Issues", "PRs", "Last Commit") into a single "Issues, PRs, and Last Commit" column with line breaks between each component. This reduces the table width from 7 columns to 5 columns, making it more readable.

Before:

| Project | Contributors | Issues | PRs | Last Commit | Commits | Repository |

After:

| Project | Contributors | Issues, PRs, and Last Commit | Commits | Repository |

Removed Contributor Count Numbers

Eliminated the redundant contributor count numbers (e.g., "(20)") that appeared after contributor avatars in the Contributors column. The visual avatars alone provide sufficient indication of contributor activity.

Enhanced Table Cell Formatting

The combined column uses <br> tags to properly separate Issues, PRs, and Last Commit information within a single table cell, maintaining readability while reducing horizontal space.

Commit Count Accuracy Fix

Fixed a significant issue where repositories were showing drastically incorrect commit counts. For example, UofUEpiBio/epiworld was showing only 30 commits instead of the actual 500+ commits.

Root Cause: The script was prioritizing the GitHub participation stats API, which only returns commit data for the last 52 weeks, causing severe undercounting for repositories with long development histories.

Solution: Restructured the commit counting logic to:

  1. Primary method: Use GitHub search API to get total repository commit history
  2. Fallback method: Use contributors stats API for accurate historical totals
  3. Last resort: Use participation stats (last 52 weeks only) when other methods fail
  4. Error handling: Properly distinguish between API failures and genuine zero commit counts

Example Output

| [Project Name](https://github.com/user/repo) | <img src="..."/> | [![Issues](https://img.shields.io/github/issues/user/repo)](link)<br> [![PRs](https://img.shields.io/github/issues-pr/user/repo)](link)<br> 2024-12-12 ([`abc1234`](link)) | 542 | [user/repo](link) |

All changes are backward compatible with existing YAML data structure and workflow configuration.

Fixes #55.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Improving report Improve project status report table format and fix data display issues Jul 29, 2025
Copilot AI requested a review from gvegayon July 29, 2025 00:37
@apulsipher

Copy link
Copy Markdown
Member

@gvegayon How close is this to being ready to merge?

@gvegayon

Copy link
Copy Markdown
Member

@copilot, the number of commits is off. For example, UofUEpiBio/epiworldR has over 500 commits, but the table you prepared only has 30. Fix that.

Copilot AI commented Aug 12, 2025

Copy link
Copy Markdown
Contributor Author

@copilot, the number of commits is off. For example, UofUEpiBio/epiworldR has over 500 commits, but the table you prepared only has 30. Fix that.

Fixed the commit count issue in commit c7a8c2f. The problem was that the script was prioritizing the participation stats API which only returns data for the last 52 weeks, causing significant undercounting for repositories with long histories like UofUEpiBio/epiworld.

Updated the logic to:

  1. First try GitHub search API for total repository commit history
  2. Use contributors stats API as fallback for accurate totals
  3. Only use participation stats (last 52 weeks) as last resort

This should now show the correct 500+ commits for UofUEpiBio/epiworld and other repositories with extensive commit histories.

Copilot AI changed the title Improve project status report table format and fix data display issues Improve project status report table format and fix commit count accuracy Aug 12, 2025
@gvegayon
gvegayon marked this pull request as ready for review August 12, 2025 19:58

@gvegayon gvegayon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improving report

3 participants