Skip to content

Commit 56e0a8e

Browse files
authored
Merge branch 'main' into dashboard/project-ranking-factor
2 parents b6b24eb + 56fbae2 commit 56e0a8e

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

.github/workflows/run-ci-cd.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ jobs:
302302
echo "NEXT_PUBLIC_GRAPHQL_URL=${{ secrets.VITE_GRAPHQL_URL }}" >> frontend/.env
303303
echo "NEXT_PUBLIC_GTM_ID=${{ secrets.NEXT_PUBLIC_GTM_ID }}" >> frontend/.env
304304
echo "NEXT_PUBLIC_IDX_URL=${{ secrets.VITE_IDX_URL }}" >> frontend/.env
305+
echo "NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED=${{ secrets.NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED }}" >> frontend/.env
305306
echo "NEXT_PUBLIC_RELEASE_VERSION=${{ github.event.release.tag_name }}" >> frontend/.env
306307
echo "NEXT_PUBLIC_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}" >> frontend/.env
307308
@@ -535,6 +536,7 @@ jobs:
535536
echo "NEXT_PUBLIC_GRAPHQL_URL=${{ secrets.VITE_GRAPHQL_URL }}" >> frontend/.env
536537
echo "NEXT_PUBLIC_GTM_ID=${{ secrets.NEXT_PUBLIC_GTM_ID }}" >> frontend/.env
537538
echo "NEXT_PUBLIC_IDX_URL=${{ secrets.VITE_IDX_URL }}" >> frontend/.env
539+
echo "NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED=${{ secrets.NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED }}" >> frontend/.env
538540
echo "NEXT_PUBLIC_RELEASE_VERSION=${{ github.event.release.tag_name }}" >> frontend/.env
539541
echo "NEXT_PUBLIC_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}" >> frontend/.env
540542

backend/apps/github/index/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ class UserIndex(IndexBase):
4343
"minProximity": 4,
4444
"customRanking": [
4545
"desc(idx_contributions_count)",
46-
"desc(idx_created_at)",
4746
"desc(idx_followers_count)",
47+
"desc(idx_public_repositories_count)",
48+
"asc(idx_created_at)",
4849
],
4950
"ranking": [
5051
"typo",

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ NEXT_PUBLIC_ENVIRONMENT=local
44
NEXT_PUBLIC_GRAPHQL_URL=http://localhost:8000/graphql/
55
NEXT_PUBLIC_GTM_ID=
66
NEXT_PUBLIC_IDX_URL=http://localhost:8000/idx/
7+
NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED=true
78
NEXT_PUBLIC_RELEASE_VERSION=
89
NEXT_PUBLIC_SENTRY_DSN=
910
NEXT_SERVER_CSRF_URL=http://backend:8000/csrf/

frontend/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ clean-frontend-dependencies:
99

1010
clean-frontend-docker:
1111
@docker container rm -f nest-frontend >/dev/null 2>&1 || true
12-
@docker image rm -f docker-frontend >/dev/null 2>&1 || true
13-
@docker volume rm -f docker_frontend-next >/dev/null 2>&1 || true
14-
@docker volume rm -f docker_frontend-node-modules >/dev/null 2>&1 || true
12+
@docker image rm -f nest-local-frontend >/dev/null 2>&1 || true
13+
@docker volume rm -f nest-local_frontend-next >/dev/null 2>&1 || true
14+
@docker volume rm -f nest-local_frontend-node-modules >/dev/null 2>&1 || true
1515

1616
exec-frontend-command:
1717
@docker exec -t nest-frontend $(CMD)

frontend/pnpm-lock.yaml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/components/CardDetailsPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1212
import Link from 'next/link'
1313
import type { DetailsCardProps } from 'types/card'
1414
import { capitalize } from 'utils/capitalize'
15+
import { IS_PROJECT_HEALTH_ENABLED } from 'utils/credentials'
1516
import { getSocialIcon } from 'utils/urlIconMappings'
1617
import AnchorTitle from 'components/AnchorTitle'
1718
import ChapterMapWrapper from 'components/ChapterMapWrapper'
@@ -65,7 +66,7 @@ const DetailsCard = ({
6566
<div className="mt-4 flex flex-row items-center">
6667
<div className="flex w-full items-center justify-between">
6768
<h1 className="text-4xl font-bold">{title}</h1>
68-
{type === 'project' && healthMetricsData.length > 0 && (
69+
{IS_PROJECT_HEALTH_ENABLED && type === 'project' && healthMetricsData.length > 0 && (
6970
<Link href="#issues-trend">
7071
<div
7172
className={`group relative flex h-20 w-20 flex-col items-center justify-center rounded-full border-2 shadow-lg transition-all duration-300 hover:scale-105 hover:shadow-xl ${scoreStyle}`}
@@ -236,7 +237,7 @@ const DetailsCard = ({
236237
<RepositoriesCard repositories={repositories} />
237238
</SecondaryCard>
238239
)}
239-
{type === 'project' && healthMetricsData.length > 0 && (
240+
{IS_PROJECT_HEALTH_ENABLED && type === 'project' && healthMetricsData.length > 0 && (
240241
<HealthMetrics data={healthMetricsData} />
241242
)}
242243
</div>

frontend/src/utils/credentials.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const IDX_URL = process.env.NEXT_PUBLIC_IDX_URL
99
export const IS_GITHUB_AUTH_ENABLED = Boolean(
1010
process.env.NEXT_SERVER_GITHUB_CLIENT_ID && process.env.NEXT_SERVER_GITHUB_CLIENT_SECRET
1111
)
12+
export const IS_PROJECT_HEALTH_ENABLED =
13+
process.env.NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED === 'true'
1214
export const NEXTAUTH_SECRET = process.env.NEXTAUTH_SECRET
1315
export const NEXTAUTH_URL = process.env.NEXTAUTH_URL
1416
export const RELEASE_VERSION = process.env.NEXT_PUBLIC_RELEASE_VERSION

0 commit comments

Comments
 (0)