Skip to content

Commit

Permalink
Merge 63ca8b7 into 0d607ec
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Feb 5, 2022
2 parents 0d607ec + 63ca8b7 commit 3b17040
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## auto-doc

Generate documentation for your actions.yml.
Generate documentation for your actions.(yml|yaml).

## Table of Contents

Expand Down Expand Up @@ -46,12 +46,12 @@ Add the `Inputs` and/or `Outputs` [`H2` header](https://github.com/adam-p/markdo

<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->

| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---------------|--------|----------|----------------|---------------------------------------------|
| action | string | false | `"action.yml"` | Path to the action.yml file<br> |
| col\_max\_width | string | false | `"1000"` | Max width of a column<br> |
| col\_max\_words | string | false | `"5"` | Max number of words per<br>line in a column |
| output | string | false | `"README.md"` | Path to the output file<br> |
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---------------|--------|----------|------------------|---------------------------------------------|
| action | string | false | `""action.yml""` | Path to the action.yml file<br> |
| col\_max\_width | string | false | `""1000""` | Max width of a column<br> |
| col\_max\_words | string | false | `""5""` | Max number of words per<br>line in a column |
| output | string | false | `""README.md""` | Path to the output file<br> |

<!-- AUTO-DOC-INPUT:END -->

Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ func (a *Action) renderOutput() error {
for _, key := range keys {
var outputDefault string
if len(a.Inputs[key].Default) > 0 {
outputDefault = a.Inputs[key].Default
outputDefault = fmt.Sprintf("%#v", a.Inputs[key].Default)

if outputDefault == pipeSeparator {
outputDefault = "\\" + outputDefault
}

outputDefault = "`\"" + outputDefault + "\"`"
outputDefault = "`" + outputDefault + "`"
}
row := []string{key, "string", strconv.FormatBool(a.Inputs[key].Required), outputDefault, wordWrap(a.Inputs[key].Description, maxWords)}
inputTable.Append(row)
Expand Down
16 changes: 8 additions & 8 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->

| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|-----------|--------|----------|-------------------------|-------------------------------------------------------------------------------------|
| base_sha | string | false | | Specify a base commit SHA<br>used for comparing changes |
| files | string | false | | Check for changes using only<br>this list of files (Defaults<br>to the entire repo) |
| path | string | false | | Specify a relative path under<br>$GITHUB_WORKSPACE to locate the repository<br> |
| separator | string | true | `"\|"` | Split character for array output<br> |
| sha | string | true | `"${{ github.sha }}"` | Specify a current commit SHA<br>used for comparing changes |
| token | string | true | `"${{ github.token }}"` | Github token or Repo Scoped<br>Personal Access Token |
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|-----------|--------|----------|------------------------------|-------------------------------------------------------------------------------------|
| base_sha | string | false | | Specify a base commit SHA<br>used for comparing changes |
| files | string | false | `""README.md\nREADME.md\n""` | Check for changes using only<br>this list of files (Defaults<br>to the entire repo) |
| path | string | false | | Specify a relative path under<br>$GITHUB_WORKSPACE to locate the repository<br> |
| separator | string | true | `""|""` | Split character for array output<br> |
| sha | string | true | `""${{ github.sha }}""` | Specify a current commit SHA<br>used for comparing changes |
| token | string | true | `""${{ github.token }}""` | Github token or Repo Scoped<br>Personal Access Token |

<!-- AUTO-DOC-INPUT:END -->

Expand Down

0 comments on commit 3b17040

Please sign in to comment.