-
Total Score = Commits + Lines + PRs + Reviews + Comments + Issues + Response
+ Total Score = Commits + Lines + PRs + Reviews + Comments + Issues + Tests + Response
Where:
Commits = sum of (commits x 10 x time_multiplier)
@@ -73,6 +73,7 @@ Where:
Reviews = reviews_given x 30 pts
Comments = review_comments x 5 pts
Issues = (opened x 10) + (closed x 20) + (comments x 5) + (refs x 5) pts
+ Tests = commits_with_tests x 15 pts
Response = fast review bonus (0-50 pts)
Time Multipliers:
diff --git a/web/src/views/Leaderboard.vue b/web/src/views/Leaderboard.vue
index a476dd0..fc3d7ab 100644
--- a/web/src/views/Leaderboard.vue
+++ b/web/src/views/Leaderboard.vue
@@ -34,16 +34,6 @@ const tableColumns = [
{ key: 'team', label: 'Team', align: 'left', headerClass: 'hidden xl:table-cell' },
{ key: 'score', label: 'Score', align: 'right' }
]
-
-const categoryIcon = (category) => {
- const icons = {
- 'Commits': 'fas fa-code-commit text-green-500',
- 'PRs': 'fas fa-code-pull-request text-blue-500',
- 'Reviews': 'fas fa-eye text-purple-500',
- 'Comments': 'fas fa-comment text-orange-500'
- }
- return icons[category] || ''
-}
@@ -71,8 +61,8 @@ const categoryIcon = (category) => {
/>
diff --git a/web/src/views/Repository.vue b/web/src/views/Repository.vue
index 226e07b..59c9256 100644
--- a/web/src/views/Repository.vue
+++ b/web/src/views/Repository.vue
@@ -61,7 +61,13 @@ async function loadRepository() {
}
onMounted(loadRepository)
-watch(() => route.params, loadRepository)
+
+// Watch for route changes (navigation to different repository)
+watch(() => [route.params.owner, route.params.name], ([newOwner, newName], [oldOwner, oldName]) => {
+ if ((newOwner && newName) && (newOwner !== oldOwner || newName !== oldName)) {
+ loadRepository()
+ }
+})
@@ -132,8 +138,8 @@ watch(() => route.params, loadRepository)
/>
diff --git a/web/src/views/Team.vue b/web/src/views/Team.vue
index 866bbd5..b580d40 100644
--- a/web/src/views/Team.vue
+++ b/web/src/views/Team.vue
@@ -8,6 +8,7 @@ import StatCard from '../components/StatCard.vue'
import MemberCard from '../components/MemberCard.vue'
import SectionHeader from '../components/SectionHeader.vue'
import { slugify } from '../composables/formatters'
+import { DEFAULT_TEAM_COLOR } from '../composables/constants'
const route = useRoute()
const globalData = inject('globalData')
@@ -38,8 +39,20 @@ function loadTeam() {
}
onMounted(loadTeam)
-watch(() => route.params, loadTeam)
-watch(globalData, loadTeam)
+
+// Watch for route changes (navigation to different team)
+watch(() => route.params.slug, (newSlug, oldSlug) => {
+ if (newSlug && newSlug !== oldSlug) {
+ loadTeam()
+ }
+})
+
+// Watch for globalData changes, but only reload if we don't have team data yet
+watch(globalData, (newData, oldData) => {
+ if (newData && !oldData && (error.value || !team.value)) {
+ loadTeam()
+ }
+})
@@ -56,7 +69,7 @@ watch(globalData, loadTeam)