mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-03-06 12:57:58 +00:00
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
This commit is contained in:
@@ -40,6 +40,7 @@ type ActionYMLForJSON struct {
|
||||
Outputs map[string]ActionOutputForJSON `json:"outputs,omitempty"`
|
||||
Runs map[string]any `json:"runs"`
|
||||
Branding *BrandingForJSON `json:"branding,omitempty"`
|
||||
Permissions map[string]string `json:"permissions,omitempty"`
|
||||
}
|
||||
|
||||
// ActionInputForJSON represents an input parameter in JSON format.
|
||||
@@ -218,6 +219,7 @@ func (jw *JSONWriter) convertToJSONOutput(action *ActionYML) *JSONOutput {
|
||||
Outputs: outputs,
|
||||
Runs: action.Runs,
|
||||
Branding: branding,
|
||||
Permissions: action.Permissions,
|
||||
},
|
||||
Documentation: DocumentationInfo{
|
||||
Title: action.Name,
|
||||
|
||||
Reference in New Issue
Block a user