File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2222 steps :
2323 - uses : actions/checkout@v2
2424 - uses : actions/setup-go@v3
25- - uses : stackaid/generate-stackaid-json@v1.4
25+ - uses : stackaid/generate-stackaid-json@v1.5
2626` ` `
2727
2828This will commit a ` stackaid.json` file in your repository which will then automatically show up for funding in the StackAid dashboard.
Original file line number Diff line number Diff line change 11{
22 "name" : " stackaid-json-generator" ,
3- "version" : " 1.4 .0" ,
3+ "version" : " 1.5 .0" ,
44 "private" : false ,
55 "description" : " A GitHub action to generate a stackaid.json file based on your repository's dependency graph" ,
66 "main" : " lib/src/main.js" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const run = async () => {
1515 const repo = process . env . GITHUB_REPOSITORY ?. split ( '/' , 2 ) [ 1 ] as string
1616
1717 const stackAidJson : StackAidJson = { version : 1 , dependencies : [ ] }
18- const direct = [ ]
18+ let direct = [ ]
1919
2020 const glob = '**/'
2121 const summary = await getRepositorySummary ( owner , repo , glob )
@@ -38,6 +38,7 @@ const run = async () => {
3838
3939 // We need to query each direct dependency separately since the graphql API
4040 // does NOT support nested dependencies.
41+ direct = uniqBy ( direct , ( d ) => d . repository . url )
4142 for ( const dep of direct ) {
4243 const {
4344 url : source ,
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ export const getRepositorySummary = async (
126126 }
127127
128128 const relevant = edges
129- . filter ( ( edge ) => matches ( edge . node . filename , SUMMARY_FILE_TYPES , glob ) )
130129 . map ( ( edge , i ) => ( {
131130 ...edge ,
132131 after : i > 0 ? edges [ i - 1 ] . cursor : undefined ,
133132 } ) )
133+ . filter ( ( edge ) => matches ( edge . node . filename , SUMMARY_FILE_TYPES , glob ) )
134134
135135 return relevant
136136}
You can’t perform that action at this time.
0 commit comments