Files
gh-action-readme/templates_embed/templates
Ismo Vuorinen ce23f93b74 feat: detect permissions from actions (#137)
* feat: detect permissions from actions

* refactor(test): fix 25 SonarCloud issues by extracting test constants

Resolved all SonarCloud code quality issues for PR #137:
- Fixed 12 string duplication issues (S1192)
- Fixed 13 naming convention issues (S100)

Changes:
- Centralized test constants in appconstants/test_constants.go
  * Added 9 parser test constants for YAML templates
  * Added 3 template test constants for paths and versions
- Updated parser_test.go to use shared constants
- Updated template_test.go to use shared constants
- Renamed 13 test functions to camelCase (removed underscores)

* chore: reduce code duplication

* fix: implement cr fixes

* chore: deduplication
2026-01-04 02:48:29 +02:00
..

# {{.Name}}

{{if .Branding}}
> {{.Description}}

## Usage

```yaml
- uses: {{gitUsesString .}}
  with:
{{- range $key, $val := .Inputs}}
    {{$key}}: # {{$val.Description}}{{if $val.Default}} (default: {{$val.Default}}){{end}}
{{- end}}
```

## Inputs

{{range $key, $input := .Inputs}}
- **{{$key}}**: {{$input.Description}}{{if $input.Required}} (**required**){{end}}{{if $input.Default}} (default: {{$input.Default}}){{end}}
{{end}}

{{if .Outputs}}
## Outputs

{{range $key, $output := .Outputs}}
- **{{$key}}**: {{$output.Description}}
{{end}}
{{end}}

{{if and .Permissions (gt (len .Permissions) 0)}}
## Permissions

This action requires the following permissions:

{{range $key, $value := .Permissions}}
- **`{{$key}}`**: `{{$value}}`
{{end}}

**Usage in workflow:**
```yaml
permissions:
{{- range $key, $value := .Permissions}}
  {{$key}}: {{$value}}
{{- end}}
```
{{end}}

## Example

See the [action.yml](./action.yml) for a full reference.

---

*Auto-generated by [gh-action-readme](https://github.com/ivuorinen/gh-action-readme)*
{{end}}