File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const acc: GitHubAccount = await getGitHubAccountFromFile(filePath);
1414 <time datetime = { lastUpdated .toISOString ()} >
1515 { lastUpdated .toLocaleDateString (lang , {
1616 dateStyle: " medium" ,
17- timeZone: " UTC " ,
17+ timeZone: Intl . DateTimeFormat (). resolvedOptions (). timeZone ,
1818 })}
1919 </time >
2020 { " by " }
Original file line number Diff line number Diff line change @@ -6,26 +6,27 @@ export interface GitHubAccount {
66 accountLink ?: string ;
77}
88
9- const token : string | null = import . meta. env . GITHUB_TOKEN
10-
11- const headers : RequestInit = token != null ? {
12- headers : {
13- Accept : "application/vnd.github+json" ,
14- "User-Agent" : "papermc-docs/author" ,
15- "Authorization" : `Bearer ${ token } `
16- } ,
17- }
18- : {
19- headers : {
20- Accept : "application/vnd.github+json" ,
21- "User-Agent" : "papermc-docs/author"
22- } ,
23- } ;
9+ const token : string | null = import . meta. env . GITHUB_TOKEN ;
10+
11+ const headers : RequestInit =
12+ token != null
13+ ? {
14+ headers : {
15+ Accept : "application/vnd.github+json" ,
16+ "User-Agent" : "papermc-docs/author" ,
17+ Authorization : `Bearer ${ token } ` ,
18+ } ,
19+ }
20+ : {
21+ headers : {
22+ Accept : "application/vnd.github+json" ,
23+ "User-Agent" : "papermc-docs/author" ,
24+ } ,
25+ } ;
2426
2527const repo : string = "PaperMC/docs" ;
2628const cache : Map < string , GitHubAccount > = new Map ( ) ;
2729
28-
2930// Git
3031export async function getGitHubAccountFromFile ( filePath : string ) : Promise < GitHubAccount | null > {
3132 const displayName = execSync ( `git log -1 --pretty="format:%an" -- "${ filePath } "` ) . toString ( ) ;
You can’t perform that action at this time.
0 commit comments