Skip to content

Commit

Permalink
Merge 0629939 into fd6db93
Browse files Browse the repository at this point in the history
  • Loading branch information
technote-space committed Aug 30, 2019
2 parents fd6db93 + 0629939 commit 0e067c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Just run [DocToc](https://github.com/thlorenz/doctoc) and commit to branch if ch
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Screenshot](#screenshot)
- [Installation](#installation)
- [Options](#options)
- [TARGET_PATHS](#target_paths)
Expand All @@ -25,12 +26,15 @@ Just run [DocToc](https://github.com/thlorenz/doctoc) and commit to branch if ch

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Screenshot
![behavior](https://raw.githubusercontent.com/technote-space/toc-generator/images/screenshot.gif)

## Installation
1. Setup workflow
e.g. `.github/workflows/push.yml`
e.g. `.github/workflows/toc.yml`
```yaml
on: push
name: Push
name: TOC Generator
jobs:
assignAuthor:
name: TOC Generator
Expand Down
2 changes: 1 addition & 1 deletion src/utils/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const commit = async (workDir: string): Promise<boolean> => {

const getDiff = async (workDir: string): Promise<string[]> => (await execAsync(`git -C ${workDir} status --short -uno`, false, null, false, true))
.split(/\r\n|\n/)
.filter(line => line.match(/^M\s+/))
.filter(line => line.match(/^M\s+/) && line.match(/\.md$/i))
.map(line => line.replace(/^M\s+/, ''));

const execAsync = (command: string, quiet: boolean = false, altCommand: string | null = null, suppressError: boolean = false, suppressOutput: boolean = false) => new Promise<string>((resolve, reject) => {
Expand Down

0 comments on commit 0e067c6

Please sign in to comment.