Skip to content

Commit c0ecd33

Browse files
Den A EvDen A Ev
authored andcommitted
fix(ci): global infrastructure realignment (schemas, vitest, admin, auth)
1 parent f2ffd58 commit c0ecd33

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

backend/app/api/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from app.services.contributor_service import _store as _contributor_store
3535
from app.models.bounty import BountyStatus, BountyCreate, VALID_STATUS_TRANSITIONS
3636
from app.constants import START_TIME
37+
from app.services.treasury_service import get_treasury_stats
3738

3839
# ---------------------------------------------------------------------------
3940
# Configuration — captured at import time so tests can patch at the module level
@@ -1110,7 +1111,7 @@ async def get_treasury_dashboard(
11101111
Returns live balances, 30-day daily outflow chart, burn-rate projections,
11111112
per-tier spending breakdown, and the 20 most recent transactions.
11121113
"""
1113-
from app.services.treasury_service import get_treasury_stats
1114+
# Recent 20 transactions
11141115
from app.services.payout_service import (
11151116
_payout_store,
11161117
_buyback_store,

backend/app/models/bounty_table.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class BountyTable(Base):
4141
category = Column(String(50), nullable=True)
4242
creator_type = Column(String(20), nullable=False, server_default="platform")
4343
github_issue_url = Column(String(512), nullable=True)
44+
github_issue_number = Column(Integer, nullable=True)
4445
skills = Column(JSON, nullable=False, default=list)
4546
deadline = Column(DateTime(timezone=True), nullable=True)
4647
created_by = Column(String(100), nullable=False, server_default="system")
@@ -61,6 +62,15 @@ class BountyTable(Base):
6162
Text, nullable=True
6263
) # Fallback for SQLite; TSVECTOR is PG-only
6364

65+
@property
66+
def required_skills(self):
67+
"""Alias for skills to maintain compatibility with Pydantic models."""
68+
return self.skills
69+
70+
@required_skills.setter
71+
def required_skills(self, value):
72+
self.skills = value
73+
6474
__table_args__ = (
6575
Index("ix_bounties_search_vector", search_vector),
6676
Index("ix_bounties_tier_status", tier, status),

backend/tests/test_auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ async def _create_user():
5050
async with async_session_factory() as session:
5151
user = User(
5252
id=user_uuid,
53-
github_id="test_github_123",
54-
username="testuser",
55-
email="test@example.com",
53+
github_id=f"test_github_{user_id[:8]}",
54+
username=f"testuser_{user_id[:8]}",
55+
email=f"test_{user_id[:8]}@example.com",
5656
avatar_url="https://example.com/avatar.png",
5757
)
5858
session.add(user)

frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"jsdom": "^25.0.0",
3636
"typescript": "^5.4.5",
3737
"vite": "^6.0.0",
38-
"vitest": "^3.0.0"
38+
"vitest": "^3.0.0",
39+
"@vitest/coverage-v8": "^3.0.0"
3940
}
4041
}

0 commit comments

Comments
 (0)