Skip to content

Commit 5574a45

Browse files
authored
Align safe-jobs env setup step naming with Safe Outputs terminology (#27420)
1 parent 2cd3dc8 commit 5574a45

File tree

7 files changed

+17
-9
lines changed

7 files changed

+17
-9
lines changed

.github/workflows/daily-choice-test.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/mcp-inspector.lock.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/notion-issue-summary.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-copilot-arm.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-copilot.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/workflow/safe_jobs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func (c *Compiler) buildSafeJobs(data *WorkflowData, threatDetectionEnabled bool
241241
agentOutputArtifactFilename := "${RUNNER_TEMP}/gh-aw/safe-jobs/" + constants.AgentOutputFilename
242242

243243
// Add environment variables step with GH_AW_AGENT_OUTPUT and job-specific env vars
244-
steps = append(steps, " - name: Configure Safe Job Environment Variables\n")
244+
steps = append(steps, " - name: Configure Safe Outputs Job Environment Variables\n")
245245
steps = append(steps, " id: setup-safe-job-env\n")
246246
steps = append(steps, " run: |\n")
247247
steps = append(steps, " find \"${RUNNER_TEMP}/gh-aw/safe-jobs/\" -type f -print\n")
@@ -256,9 +256,9 @@ func (c *Compiler) buildSafeJobs(data *WorkflowData, threatDetectionEnabled bool
256256
}
257257

258258
// Add custom steps from the job configuration, injecting env vars from the
259-
// "Configure Safe Job Environment Variables" step output so user steps can access them.
259+
// setup-safe-job-env step outputs so user steps can access them.
260260
if len(jobConfig.Steps) > 0 {
261-
// Build the env vars that were set in the setup step so we can inject them.
261+
// Build the env vars that were set in the setup-safe-job-env step so we can inject them.
262262
setupEnvVars := map[string]string{
263263
"GH_AW_AGENT_OUTPUT": "${{ steps.setup-safe-job-env.outputs.GH_AW_AGENT_OUTPUT }}",
264264
}

pkg/workflow/safe_jobs_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ func TestBuildSafeJobs(t *testing.T) {
233233
t.Error("Expected main job output to be available as environment variable")
234234
}
235235

236+
if !strings.Contains(stepsContent, "Configure Safe Outputs Job Environment Variables") {
237+
t.Error("Expected safe jobs env setup step to use Safe Outputs terminology")
238+
}
239+
240+
if strings.Contains(stepsContent, "Configure Safe Job Environment Variables") {
241+
t.Error("Expected legacy Safe Job terminology to be absent from safe jobs env setup step")
242+
}
243+
236244
if strings.Contains(stepsContent, "GLOBAL_VAR=global_value") {
237245
t.Error("Safe-jobs should not inherit environment variables from safe-outputs.env (they are now independent)")
238246
}

0 commit comments

Comments
 (0)