Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Browse issues labeled **`good first issue`** across our repos to get started.
| Rank | Avatar | Username | Total | Commits | PRs | Issues | Reviews | Docs |
|------|--------|----------|------:|--------:|----:|------:|--------:|----:|
| 🥇 | <img src="https://avatars.githubusercontent.com/u/191262736?v=4" width="32"/> | [@naheel0](https://github.com/naheel0) | **83** | 39 | 11 | 0 | 10 | 23 |
| 🥈 | <img src="https://avatars.githubusercontent.com/in/1143301?v=4" width="32"/> | [@Copilot](https://github.com/Copilot) | **39** | 22 | 11 | 0 | 0 | 6 |
| 🥉 | <img src="https://avatars.githubusercontent.com/u/225665919?v=4" width="32"/> | [@jaseel0](https://github.com/jaseel0) | **27** | 12 | 0 | 0 | 8 | 7 |
| 4 | <img src="https://avatars.githubusercontent.com/in/15368?v=4" width="32"/> | [@github-actions[bot]](https://github.com/github-actions[bot]) | **8** | 4 | 0 | 0 | 0 | 4 |
| 🥈 | <img src="https://avatars.githubusercontent.com/u/225665919?v=4" width="32"/> | [@jaseel0](https://github.com/jaseel0) | **27** | 12 | 0 | 0 | 8 | 7 |
| 3 | - | - | - | - | - | - | - | - |
| 4 | - | - | - | - | - | - | - | - |
| 5 | - | - | - | - | - | - | - | - |
| 6 | - | - | - | - | - | - | - | - |
| 7 | - | - | - | - | - | - | - | - |
Expand Down
10 changes: 10 additions & 0 deletions profile/scripts/updateReadme.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ async function getAllPages(apiPath) {
return results;
}

function isBot(user) {
if (!user) return false;
if (user.type === 'Bot') return true;
if (user.login && user.login.endsWith('[bot]')) return true;
return false;
}

async function main() {
if (!TOKEN) {
console.error('GIT_PAT is not set');
Expand All @@ -63,6 +70,7 @@ async function main() {
try {
const contribs = await getAllPages(`/repos/${ORG}/${repo.name}/contributors`);
for (const c of contribs) {
if (isBot(c)) continue;
if (!contributors[c.login]) {
contributors[c.login] = {
login: c.login,
Expand All @@ -86,6 +94,7 @@ async function main() {
if (!pr.merged_at) continue;
const login = pr.user && pr.user.login;
if (!login) continue;
if (isBot(pr.user)) continue;
if (!contributors[login]) {
contributors[login] = {
login,
Expand All @@ -109,6 +118,7 @@ async function main() {
if (issue.pull_request) continue;
const login = issue.user && issue.user.login;
if (!login) continue;
if (isBot(issue.user)) continue;
if (!contributors[login]) {
contributors[login] = {
login,
Expand Down