Skip to content
Closed
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
14 changes: 0 additions & 14 deletions pkg/workflow/update_project_job.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package workflow

import (
"encoding/json"
"fmt"
)

Expand Down Expand Up @@ -38,19 +37,6 @@ func (c *Compiler) buildUpdateProjectJob(data *WorkflowData, mainJobName string)
// The JavaScript code checks process.env.GH_AW_PROJECT_GITHUB_TOKEN to provide helpful error messages
customEnvVars = append(customEnvVars, fmt.Sprintf(" GH_AW_PROJECT_GITHUB_TOKEN: %s\n", effectiveToken))

// If views are configured in frontmatter, pass them to the JavaScript via environment variable
if data.SafeOutputs.UpdateProjects != nil && len(data.SafeOutputs.UpdateProjects.Views) > 0 {
viewsJSON, err := json.Marshal(data.SafeOutputs.UpdateProjects.Views)
if err != nil {
return nil, fmt.Errorf("failed to marshal views configuration: %w", err)
}
// lgtm[go/unsafe-quoting] - This generates YAML environment variable declarations, not shell commands.
// The %q format specifier properly escapes the JSON string for YAML syntax. There is no shell injection
// risk because this value is set as an environment variable in the GitHub Actions YAML configuration,
// not executed as shell code.
customEnvVars = append(customEnvVars, fmt.Sprintf(" GH_AW_PROJECT_VIEWS: %q\n", string(viewsJSON)))
}

jobCondition := BuildSafeOutputType("update_project")
permissions := NewPermissionsContentsReadProjectsWrite()

Expand Down
Loading