Skip to content

Commit 7216b47

Browse files
Add activity validation and update README labels
- Skip repos inactive for more than 90 days in populate script - Update README to mention all beginner-friendly labels searched
1 parent d85c8c4 commit 7216b47

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To maintain the quality of projects in Good First Issue, please make sure your G
2121

2222
| Requirement | Description |
2323
|-------------|-------------|
24-
| Good First Issues | At least 3 open issues with the `good first issue` label |
24+
| Good First Issues | At least 3 open issues with beginner-friendly labels (`good first issue`, `beginner`, `easy`, `help wanted`, etc.) |
2525
| Contributors | At least 10 contributors |
2626
| README.md | Detailed setup instructions |
2727
| CONTRIBUTING.md | Guidelines for new contributors |

gfi/populate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import time
88
from collections import Counter
99
from concurrent.futures import ThreadPoolExecutor
10+
from datetime import datetime, timezone
1011
from operator import itemgetter
1112
from os import getenv, path
1213
from typing import TypedDict, Dict, Union, Sequence, Optional
@@ -30,6 +31,7 @@
3031
ISSUE_SORT_DIRECTION = "desc"
3132
ISSUE_LIMIT = 10
3233
SLUGIFY_REPLACEMENTS = [["#", "sharp"], ["+", "plus"]]
34+
MAX_INACTIVITY_DAYS = 90 # Skip repos inactive for more than 3 months
3335

3436
if not path.exists(LABELS_DATA_FILE):
3537
raise RuntimeError("No labels data file found. Exiting.")
@@ -146,6 +148,12 @@ def get_repository_info(
146148
if repository.archived:
147149
return None
148150

151+
# Skip repos with no recent activity
152+
days_since_push = (datetime.now(timezone.utc) - repository.pushed_at).days
153+
if days_since_push > MAX_INACTIVITY_DAYS:
154+
logger.info("\t skipping due to inactivity ({} days since last push)", days_since_push)
155+
return None
156+
149157
good_first_issues = set()
150158
for label in ISSUE_LABELS:
151159
rate_limiter.acquire()

0 commit comments

Comments
 (0)