From 9b0d7c13ed8146be7e6981a9a595b1d214a7d010 Mon Sep 17 00:00:00 2001 From: alstr Date: Sun, 6 Dec 2020 14:16:54 +0000 Subject: [PATCH] Update inputs --- README.md | 18 +++++++++--------- action.yml | 8 ++++---- main.py | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 68e1783..71f408f 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,14 @@ Latest version is `v2.4`. | Input | Default value | Description | |----------|---------------|-------------| -| `REPO` | "${{ github.repository }}" | The path to the repository where the action will be used, e.g. 'alstr/my-repo' (automatically set) | -| `BEFORE` | "${{ github.event.before }}" | The SHA of the last pushed commit (automatically set) | -| `SHA` | "${{ github.sha }}" | The SHA of the latest commit (automatically set) | -| `TOKEN` | "${{ secrets.GITHUB_TOKEN }}" | The GitHub access token to allow us to retrieve, create and update issues (automatically set) | -| `LABEL` | "# TODO" | The label that will be used to identify TODO comments | -| `COMMENT_MARKER` | "#" | The marker used to signify a line comment in your code | -| `CLOSE_ISSUES` | "true" | Optional input that specifies whether to attempt to close an issue when a TODO is removed | -| `AUTO_P` | "true" | For multiline TODOs, format each line as a new paragraph when creating the issue | +| `REPO` | `"${{ github.repository }}"` | The path to the repository where the action will be used, e.g. 'alstr/my-repo' (automatically set) | +| `BEFORE` | `"${{ github.event.before }}"` | The SHA of the last pushed commit (automatically set) | +| `SHA` | `"${{ github.sha }}"` | The SHA of the latest commit (automatically set) | +| `TOKEN` | `"${{ secrets.GITHUB_TOKEN }}"` | The GitHub access token to allow us to retrieve, create and update issues (automatically set) | +| `LABEL` | `"# TODO"` | The label that will be used to identify TODO comments | +| `COMMENT_MARKER` | `"#"` | The marker used to signify a line comment in your code | +| `CLOSE_ISSUES` | `true` | Optional input that specifies whether to attempt to close an issue when a TODO is removed | +| `AUTO_P` | `true` | For multiline TODOs, format each line as a new paragraph when creating the issue | ## Examples @@ -93,7 +93,7 @@ The extra line(s) will be posted in the body of the issue. The `COMMENT_MARKER` input must be set to the correct syntax (e.g. `#` for Python). -Each line in the multiline TODO will be formatted as a paragraph in the issue body. To disable this, set `AUTO_P` to `"false"`. +Each line in the multiline TODO will be formatted as a paragraph in the issue body. To disable this, set `AUTO_P` to `false`. ### Specifying Identifier diff --git a/action.yml b/action.yml index bd03254..2ee8d39 100644 --- a/action.yml +++ b/action.yml @@ -33,9 +33,9 @@ inputs: default: "#" CLOSE_ISSUES: description: "Optional input that specifies whether to attempt to close an issue when a TODO is removed" - required: false - default: "true" + required: true + default: true AUTO_P: description: "For multiline TODOs, format each line as a new paragraph when creating the issue" - required: false - default: "true" + required: true + default: true diff --git a/main.py b/main.py index 2fc0305..43a817f 100644 --- a/main.py +++ b/main.py @@ -21,7 +21,7 @@ def main(): label = os.getenv('INPUT_LABEL') token = os.getenv('INPUT_TOKEN') close_issues = os.getenv('INPUT_CLOSE_ISSUES') == 'true' - auto_p = os.getenv('AUTO_P') == 'true' + auto_p = os.getenv('INPUT_AUTO_P') == 'true' line_break = '\n\n' if auto_p else '\n' # Load a file so we can see what language each file is written in and apply highlighting later.