File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 4
4
description : > # this means to ignore newlines until "baseurl:"
5
5
A site for tracking software development work in the Penn-CHOP Microbiome
6
6
Program. Mostly for internal use, but feel free to look around.
7
- baseurl : " /dev " # the subpath of your site, e.g. /blog/
7
+ baseurl : " " # the subpath of your site, e.g. /blog/
8
8
url : " http://pennchopmicrobiomeprogram.github.io" # the base hostname & protocol for your site
9
9
github_username : PennChopMicrobiomeProgram
10
10
Original file line number Diff line number Diff line change @@ -35,25 +35,23 @@ <h1 class="page-heading">Software</h1>
35
35
const repos = await PCMPresponse . json ( ) ;
36
36
const SLresponse = await fetch ( `https://api.github.com/orgs/sunbeam-labs/repos` ) ;
37
37
repos . push ( ...( await SLresponse . json ( ) ) ) ;
38
+ console . log ( repos ) ;
38
39
39
- // Fetch the latest commit date for each repository
40
- const reposWithCommits = await Promise . all ( repos . map ( async repo => {
41
- const commitsResponse = await fetch ( repo . commits_url . replace ( '{/sha}' , '' ) ) ;
42
- const commits = await commitsResponse . json ( ) ;
43
- repo . latestCommitDate = commits [ 0 ] ?. commit ?. committer ?. date || '' ;
44
- return repo ;
45
- } ) ) ;
46
-
47
- // Sort repositories by the latest commit date
48
- reposWithCommits . sort ( ( a , b ) => new Date ( b . latestCommitDate ) - new Date ( a . latestCommitDate ) ) ;
40
+ // Sort repos by 'updated_at'
41
+ repos . sort ( ( a , b ) => new Date ( b . updated_at ) - new Date ( a . updated_at ) ) ;
49
42
50
43
const ul = document . querySelector ( '.post-list' ) ;
51
- reposWithCommits . forEach ( repo => {
44
+ repos . forEach ( repo => {
52
45
const li = document . createElement ( 'li' ) ;
53
46
const a = document . createElement ( 'a' ) ;
54
47
a . href = repo . html_url ;
55
48
a . textContent = repo . name ;
56
49
li . appendChild ( a ) ;
50
+
51
+ const issues = document . createElement ( 'p' ) ;
52
+ issues . textContent = `Open issues: ${ repo . open_issues } ` ;
53
+ li . appendChild ( issues ) ;
54
+
57
55
ul . appendChild ( li ) ;
58
56
} ) ;
59
57
}
You can’t perform that action at this time.
0 commit comments