diff --git a/internal/github/action.go b/internal/github/action.go index cc37523..1c95d24 100644 --- a/internal/github/action.go +++ b/internal/github/action.go @@ -125,11 +125,14 @@ func (a *Action) pullRequestNumber() int { } func (a *Action) outputResult(result string) { + const UserReadWriteFilePermission = 0o644 + labelCheckOutput := fmt.Sprintf("label_check=%s", result) gitHubOutputFileName := filepath.Clean(os.Getenv("GITHUB_OUTPUT")) - githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0o644) //nolint:gosec + githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, UserReadWriteFilePermission) //nolint:gosec,lll panic.IfError(err) _, err = githubOutputFile.WriteString(labelCheckOutput) + if err != nil { closingErr := githubOutputFile.Close()