File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1212 run : " grep -E '^name\\ s*\\ :' ./src/blog/ -R > posts.txt && cat posts.txt"
1313 - name : deps
1414 run : |
15- npm install -g js-yaml
15+ npm install js-yaml
1616 - uses : actions/github-script@v3
1717 with :
1818 github-token : ${{secrets.GITHUB_TOKEN}}
3030 let title = nameLine.slice(nameLine.indexOf(':')+1).trim();
3131 let labels = ["blog-post"];
3232 let contents = fs.readFileSync(f).toString().trim();
33- if contents.startsWith('---') {
34- const [_ , metaString, rest] = contents.split('---', 3);
33+ if ( contents.startsWith('---') ) {
34+ const [_div , metaString, rest] = contents.split('---', 3);
3535 const meta = yaml.load(metaString);
3636 labels = labels.concat(meta['labels'] || []);
3737 if (meta['name']) {
Original file line number Diff line number Diff line change 77 announce :
88 runs-on : ubuntu-latest
99 steps :
10- - run : npm install -g js-yaml
10+ - run : npm install js-yaml
1111 - uses : actions/github-script@v3
1212 with :
1313 github-token : ${{secrets.GITHUB_TOKEN}}
3131 if (newBlogPosts.length < 1)
3232 return;
3333
34- const [_ , metaString, _ ] = newBlogPosts[0].patch.split('---', 3);
34+ const [_div , metaString, _rest ] = newBlogPosts[0].patch.split('---', 3);
3535 const meta = yaml.load(metaString);
3636 const releaseName = meta['name'];
3737 const slug = meta['slug'] || releaseName.toLowerCase().replace(/\s+/g, "-").replace(/[^a-zA-Z0-9\-]/g, "");
You can’t perform that action at this time.
0 commit comments