Add debug prints to fetch_gitea_data for feed structure and filtering verification
This commit is contained in:
@@ -35,10 +35,13 @@ def fetch_gitea_data():
|
|||||||
|
|
||||||
# 2. Activity Feed (Filtered)
|
# 2. Activity Feed (Filtered)
|
||||||
all_feeds = requests.get(f"{GITEA_URL}/api/v1/users/{USERNAME}/feeds", headers=headers).json()
|
all_feeds = requests.get(f"{GITEA_URL}/api/v1/users/{USERNAME}/feeds", headers=headers).json()
|
||||||
|
print(all_feeds) # Debug: Check the structure of feeds
|
||||||
# Filter out pushes from the bot
|
# Filter out pushes from the bot
|
||||||
human_feeds = [f for f in all_feeds if f['act_user']['login'] != BOT_NAME][:10]
|
human_feeds = [f for f in all_feeds if f['act_user']['login'] != BOT_NAME][:10]
|
||||||
|
print(human_feeds) # Debug: Check the filtered feeds for human activity
|
||||||
# Specific list for "Recent Pushes"
|
# Specific list for "Recent Pushes"
|
||||||
recent_pushes = [f for f in all_feeds if f['op_type'] == 'push_repo' and f['act_user']['login'] != BOT_NAME][:5]
|
recent_pushes = [f for f in all_feeds if f['op_type'] == 'push_repo' and f['act_user']['login'] != BOT_NAME][:5]
|
||||||
|
print(recent_pushes) # Debug: Check the recent pushes for human activity
|
||||||
|
|
||||||
repo_stats = []
|
repo_stats = []
|
||||||
lang_totals = {}
|
lang_totals = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user