Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/automation-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This is a managed action, when PR updates, the existing comments added by gitStr
| Args | Usage | Type | Description |
| -----------|------|-----|------------------------------------------------ |
| `comment` | Required | String | Sets the comment, markdown is supported, including suggestion syntax (```suggestion … ```) |
| `file_path` | Required | String | The relative path to the file that necessitates the comment |
| `file_name` | Required | String | The relative path to the file that necessitates the comment |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧾 Readability - Semantic Inconsistency: Either change the parameter name to file_path to match the description, or update the description to clarify that it accepts a relative path despite being named file_name.

Suggested change
| `file_name` | Required | String | The relative path to the file that necessitates the comment |
| `file_path` | Required | String | The relative path to the file that necessitates the comment |

| `start_line` | Optional | Integer | The line (or the first line in multi-line comment)of the blob in the pull request diff that the comment applies to. If start_line is empty, the code comment should be on the file provided |
| `end_line` | Optional | Integer | For a multi-line comment, the last line of the range that your comment applies to. Must be equal to or larger than start_line |

Expand All @@ -89,7 +89,7 @@ automations:
run:
- action: add-code-comment@v1
args:
file_path: <FILE>
file_name: <FILE>
start_line: 20
comment: |
Magic! Move it to a constant variable.
Expand Down