File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
<div align =" center " >
2
2
<h1 >create-dotgithub</h1 >
3
- <p >Boring GitHub Dotfiles Generator (download from <a href =" https://github.com/boringcodes/dotgithub " >boringcodes/dotgithub </a >)</p >
3
+ <p >Boring GitHub Dotfiles Generator (download from <a href =" https://github.com/boringcodes/.github " >boringcodes/.github </a >)</p >
4
4
5
5
<p >
6
6
<a href="https://github.com/boringcodes/create-dotgithub/commits" aria-label="Commitizen Friendly">
Original file line number Diff line number Diff line change @@ -6,14 +6,16 @@ const axios = require('axios').default;
6
6
const pkg = require ( '../../package.json' ) ;
7
7
8
8
const orgName = 'boringcodes' ;
9
- const repoName = 'dotgithub ' ;
9
+ const repoName = '.github ' ;
10
10
const getApiUrl = ( type , sha ) => {
11
11
const ghApiUrl = 'https://api.github.com' ;
12
12
13
13
return `${ ghApiUrl } /repos/${ orgName } /${ repoName } /git/${ type } /${ sha } ` ;
14
14
} ;
15
15
const findWorkflowsFromTree = ( tree ) => {
16
- return tree . find ( ( { path, type } ) => path === 'workflows' && type === 'tree' ) ;
16
+ return tree . find (
17
+ ( { path, type } ) => path === 'workflow-templates' && type === 'tree' ,
18
+ ) ;
17
19
} ;
18
20
19
21
module . exports = class extends Generator {
@@ -34,10 +36,12 @@ module.exports = class extends Generator {
34
36
type : 'list' ,
35
37
name : 'elementSelectedWorkflow' ,
36
38
message : 'Please select the workflow you want to add?' ,
37
- choices : workflowsDir . tree . map ( ( item ) => ( {
38
- name : item . path ,
39
- value : item ,
40
- } ) ) ,
39
+ choices : workflowsDir . tree
40
+ . filter ( ( item ) => / \. y m l $ / . exec ( item . path ) )
41
+ . map ( ( item ) => ( {
42
+ name : item . path ,
43
+ value : item ,
44
+ } ) ) ,
41
45
} ,
42
46
] ;
43
47
You can’t perform that action at this time.
0 commit comments