feat: add GitHub activity sync background job

Adds automatic syncing of repository activity for projects with github_repo set. Background task fetches latest activity from GitHub API (issues, PRs, default branch commits) and updates last_github_activity timestamp. Configurable sync interval (default: 15 minutes), requires GITHUB_TOKEN env var.
This commit is contained in:
2026-01-13 22:54:48 -06:00
parent f79c7711f0
commit c7dbd77b72
7 changed files with 792 additions and 76 deletions
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE projects SET last_github_activity = $2 WHERE id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid",
"Timestamptz"
]
},
"nullable": []
},
"hash": "82118a82eb002e4155689f37c50b7a286d2381d9a195f1665979d3a338bedc01"
}
@@ -0,0 +1,92 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n id,\n slug,\n name,\n short_description,\n description,\n status as \"status: ProjectStatus\",\n github_repo,\n demo_url,\n last_github_activity,\n created_at,\n updated_at\n FROM projects\n WHERE github_repo IS NOT NULL\n ORDER BY updated_at DESC\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "slug",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "short_description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "status: ProjectStatus",
"type_info": {
"Custom": {
"name": "project_status",
"kind": {
"Enum": [
"active",
"maintained",
"archived",
"hidden"
]
}
}
}
},
{
"ordinal": 6,
"name": "github_repo",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "demo_url",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_github_activity",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": []
},
"nullable": [
false,
false,
false,
false,
false,
false,
true,
true,
true,
false,
false
]
},
"hash": "8302d5621d743bd3e5e2a029e30ad1e017e1f2ef1f9cb09aa924436b0c6b8c22"
}