Use direct avatars.githubusercontent.com URL for contributor avatars#24
Use direct avatars.githubusercontent.com URL for contributor avatars#24
Conversation
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/204ccf11-afe1-4fcc-80b2-68d5ae9a73b1 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/7dd9fc60-ee05-4510-97b0-a8ff60efb3ae Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/e5a9c6c2-cf01-4bd4-acc7-5545e5855fdd Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the leaderboard generation script to include contributor avatars by replacing markdown links with HTML anchor and image tags. The review feedback recommends adding an empty alt attribute to the tags to improve accessibility, as the images are decorative and redundant with the username text.
There was a problem hiding this comment.
Pull request overview
Updates the markdown generation in scripts/leaderboard.py to render contributor cells using pure HTML (link + avatar + handle) rather than Markdown links, aligning the leaderboard output with the intended HTML-only formatting.
Changes:
- Introduces an HTML
contributor_cell(<a><img><br>@login</a>) for the main leaderboard table. - Applies the same HTML contributor cell rendering to the “Extended Statistics” table.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…l helper Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/466e64a0-98f9-4911-8d6f-64ee775320b7 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/4027e7e9-1711-46a1-be39-aa77e1751a77 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/01d6fd0f-7d87-4442-97a6-a4884d35e36a Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
Done in c945a26. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the leaderboard script to generate HTML-based contributor cells with avatars and links, replacing the previous markdown format. It introduces GitHub username validation using a regular expression and ensures proper URL and HTML escaping. Feedback was provided regarding the use of a ValueError for invalid logins, which could cause the script to crash in a CI/CD environment; it is recommended to handle these cases more gracefully to avoid breaking the leaderboard generation.
| if not _GITHUB_LOGIN_RE.match(login): | ||
| raise ValueError(f"Invalid GitHub login: {login!r}") |
There was a problem hiding this comment.
Raising a ValueError here will cause the entire script to crash during the markdown generation phase if an invalid login is encountered (e.g., from a legacy account or a manual entry in EMAIL_ALIASES). Since this script likely runs in a CI/CD pipeline to update the README, a single invalid username would break the leaderboard for the whole organization.
Consider validating the login earlier in the pipeline (e.g., in build_leaderboard) and handling invalid entries gracefully by logging a warning and skipping the contributor or using a safe fallback.
Agent-Logs-Url: https://github.com/NextCommunity/.github/sessions/54ce91a8-a4b5-4ab0-811e-00db602a7025 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
altattribute to<img>tags?s=64size query to avatar URLs to reduce bandwidth_contributor_cell()helper to eliminate code duplication between tables_GITHUB_LOGIN_RE)urllib.parse.quoteinhref/srchtml.escapeinaltand display text_GITHUB_LOGIN_REto reject consecutive hyphens