Skip to content

Commit

Permalink
Clarify optional input documentation
Browse files Browse the repository at this point in the history
After a bit of trial and error, I gather that the workflow API must only provide strings as input. QED, the optional inputs have to be strings. Not a big deal, except for the IDENTIFIERS value which needs to be a JSON string, which looks exactly like a YAML sequence. Updated documentation to include what I needed to see to resolve this. (Now with prettier, less-exhausting single quotes.)
  • Loading branch information
battis committed Nov 1, 2022
1 parent ffe68fc commit e4dffba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The workflow file takes the following optional inputs:
| `IGNORE` | No | Optional string input that provides comma-delimited regular expressions that match files in the repo that we should not scan for TODOs. By default, we will scan all files. |
| `AUTO_ASSIGN` | No | Optional boolean input that specifies whether to assign the newly created issue to the user who triggered the action. If users are manually assigned to an issue, this setting is ignored. Default: `false`. |
| `ISSUE_TEMPLATE` | No | You can override the default issue template by providing your own here. Markdown is supported, and you can inject the issue title, body, code URL and snippet. Example: `"This is my issue title: **{{ title }}**\n\nThis is my issue body: **{{ body }}**\n\nThis is my code URL: **{{ url }}**\n\nThis is my snippet:\n\n{{ snippet }}"` |
| `IDENTIFIERS` | No | A list of dictionaries specifying the identifiers for the action to recognise. `TODO` is the default, but you can override this here, and specify default labels to be applied when creating issues for each identifier. JSON string must be valid with double quoted keys/values. Example: `"[{\"name\": \"TODO\", \"labels\": [\"help wanted\"]}, {\"name\": \"FIXME\", \"labels\": [\"bug\"]}]"` (`labels` should be an empty list if no default labels are wanted) |
| `IDENTIFIERS` | No | A list of dictionaries specifying the identifiers for the action to recognise. `TODO` is the default, but you can override this here, and specify default labels to be applied when creating issues for each identifier. JSON string must be valid with double quoted keys/values and itself single-quoted (or double-quoted and escaped). Example: `'[{"name": "TODO", "labels": ["help wanted"]}, {"name": "FIXME", "labels": ["bug"]}]'` (`labels` should be an empty list if no default labels are wanted) |

These can be specified in `with` in the workflow file, as below:

Expand Down

0 comments on commit e4dffba

Please sign in to comment.