Skip to content

Commit

Permalink
feat: swe title updates (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
doprz authored Oct 15, 2024
1 parent 4cf8c3f commit 4629626
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
43 changes: 41 additions & 2 deletions src/views/components/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import useChangelog from '@views/hooks/useChangelog';
import useSchedules from '@views/hooks/useSchedules';
import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper';
import getCourseTableRows from '@views/lib/getCourseTableRows';
import { GitHubStatsService, LONGHORN_DEVELOPERS_ADMINS } from '@views/lib/getGitHubStats';
import { GitHubStatsService, LONGHORN_DEVELOPERS_ADMINS, LONGHORN_DEVELOPERS_SWE } from '@views/lib/getGitHubStats';
import { SiteSupport } from '@views/lib/getSiteSupport';
import { getUpdatedAtDateTimeString } from '@views/lib/getUpdatedAtDateTimeString';
import clsx from 'clsx';
Expand Down Expand Up @@ -487,11 +487,50 @@ export default function Settings(): JSX.Element {
<section className='my-8'>
<h2 className='mb-4 text-xl text-ut-black font-semibold'>UTRP CONTRIBUTERS</h2>
<div className='grid grid-cols-2 gap-4 2xl:grid-cols-4 md:grid-cols-3 xl:grid-cols-3'>
{LONGHORN_DEVELOPERS_SWE.map(swe => (
<div
key={swe.githubUsername}
className='border border-gray-300 rounded bg-ut-gray/10 p-4'
>
<Text
variant='p'
className='text-ut-burntorange font-semibold hover:cursor-pointer'
onClick={() =>
window.open(`https://github.com/${swe.githubUsername}`, '_blank')
}
>
{swe.name}
</Text>
<p className='text-sm text-gray-600'>{swe.role}</p>
{showGitHubStats && githubStats && (
<div className='mt-2'>
<p className='text-xs text-gray-500'>GitHub Stats (UTRP repo):</p>
{includeMergedPRs && (
<p className='text-xs'>
Merged PRS:{' '}
{githubStats.userGitHubStats[swe.githubUsername]?.mergedPRs}
</p>
)}
<p className='text-xs'>
Commits: {githubStats.userGitHubStats[swe.githubUsername]?.commits}
</p>
<p className='text-xs text-ut-green'>
{githubStats.userGitHubStats[swe.githubUsername]?.linesAdded} ++
</p>
<p className='text-xs text-ut-red'>
{githubStats.userGitHubStats[swe.githubUsername]?.linesDeleted} --
</p>
</div>
)}
</div>
))}
{githubStats &&
Object.keys(githubStats.userGitHubStats)
.filter(
username =>
!LONGHORN_DEVELOPERS_ADMINS.some(admin => admin.githubUsername === username)
!LONGHORN_DEVELOPERS_ADMINS.some(
admin => admin.githubUsername === username
) && !LONGHORN_DEVELOPERS_SWE.some(swe => swe.githubUsername === username)
)
.map(username => (
<div
Expand Down
13 changes: 13 additions & 0 deletions src/views/lib/getGitHubStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ export const LONGHORN_DEVELOPERS_ADMINS = [
{ name: 'Isaiah Rodriguez', role: 'Chief Operations and Design Officer', githubUsername: 'IsaDavRod' },
] as const satisfies TeamMember[];

export const LONGHORN_DEVELOPERS_SWE = [
{ name: 'Samuel Gunter', role: 'Software Engineer', githubUsername: 'Samathingamajig' },
{ name: 'Derek Chen', role: 'Software Engineer', githubUsername: 'DereC4' },
{ name: 'Casey Charleston', role: 'Software Engineer', githubUsername: 'caseycharleston' },
{ name: 'Vinson', role: 'Software Engineer', githubUsername: 'vinsonzheng499' },
{ name: 'Vivek', role: 'Software Engineer', githubUsername: 'vivek12311' },
] as const satisfies TeamMember[];

/**
* Represents the GitHub usernames of the SWEs in the LONGHORN_DEVELOPERS_SWE array.
*/
export type LD_SWE_GITHUB_USERNAMES = (typeof LONGHORN_DEVELOPERS_SWE)[number]['githubUsername'];

/**
* Represents the GitHub usernames of the admins in the LONGHORN_DEVELOPERS_ADMINS array.
*/
Expand Down

0 comments on commit 4629626

Please sign in to comment.