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 22
22
steps :
23
23
- uses : actions/checkout@v2
24
24
- uses : actions/setup-go@v3
25
- - uses : stackaid/generate-stackaid-json@v1.4
25
+ - uses : stackaid/generate-stackaid-json@v1.5
26
26
` ` `
27
27
28
28
This 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 1
1
{
2
2
"name" : " stackaid-json-generator" ,
3
- "version" : " 1.4 .0" ,
3
+ "version" : " 1.5 .0" ,
4
4
"private" : false ,
5
5
"description" : " A GitHub action to generate a stackaid.json file based on your repository's dependency graph" ,
6
6
"main" : " lib/src/main.js" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const run = async () => {
15
15
const repo = process . env . GITHUB_REPOSITORY ?. split ( '/' , 2 ) [ 1 ] as string
16
16
17
17
const stackAidJson : StackAidJson = { version : 1 , dependencies : [ ] }
18
- const direct = [ ]
18
+ let direct = [ ]
19
19
20
20
const glob = '**/'
21
21
const summary = await getRepositorySummary ( owner , repo , glob )
@@ -38,6 +38,7 @@ const run = async () => {
38
38
39
39
// We need to query each direct dependency separately since the graphql API
40
40
// does NOT support nested dependencies.
41
+ direct = uniqBy ( direct , ( d ) => d . repository . url )
41
42
for ( const dep of direct ) {
42
43
const {
43
44
url : source ,
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ export const getRepositorySummary = async (
126
126
}
127
127
128
128
const relevant = edges
129
- . filter ( ( edge ) => matches ( edge . node . filename , SUMMARY_FILE_TYPES , glob ) )
130
129
. map ( ( edge , i ) => ( {
131
130
...edge ,
132
131
after : i > 0 ? edges [ i - 1 ] . cursor : undefined ,
133
132
} ) )
133
+ . filter ( ( edge ) => matches ( edge . node . filename , SUMMARY_FILE_TYPES , glob ) )
134
134
135
135
return relevant
136
136
}
You can’t perform that action at this time.
0 commit comments