mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-23 06:16:43 +00:00
Update inputs
This commit is contained in:
parent
bcb5692258
commit
9b0d7c13ed
18
README.md
18
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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
2
main.py
2
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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user