Repository navigation
Description
Context
Reported in #27670. Even after fixing the YAML splicing bug (Bug 1) and needs: duplication bug (Bug 2), there is no way to make pre_activation or activation depend on a custom job that supplies credentials. This prevents sourcing on.github-app credentials (app-id, private-key) from an external secret manager via a custom job's outputs.
This is the symmetric counterpart to safe-outputs.needs shipped in #27472 — but on the on: / activation side.
Objective
Implement an on.needs frontmatter field (or equivalent) that allows users to declare one or more custom jobs as dependencies of pre_activation and activation, enabling $\{\{ needs.<job>.outputs.* }} expressions in on.github-app.app-id / private-key.
Approach
Preferred: on.needs: [<job>, ...] (parallel to safe-outputs.needs):
- Schema: Add
needsas an optional array field under theon:block inpkg/parser/schemas/. - Parser (
pkg/parser/): Parseon.needsinto the frontmatter config struct (pkg/workflow/frontmatter_types.go). pre_activationcompiler (pkg/workflow/compiler_pre_activation_job.go):- In
buildPreActivationJob, emit the listed jobs asneeds:forpre_activation. - Drop the assumption that
pre_activationis always the structurally-first job whenon.needsis non-empty.
- In
activationcompiler (pkg/workflow/compiler_activation_job_builder.go):- In
configureActivationNeedsAndCondition, also addon.needsjobs toactivation.needs(similar to howsafe-outputs.needsjobs are added tosafe_outputs.needs).
- In
- Expression validator: Validate that
$\{\{ needs.<job>.outputs.* }}references inon.github-app.*resolve againston.needs(or already-accepted needs). - Documentation: Update relevant docs in
docs/to describe the newon.needsfield.
Alternative: jobs.pre_activation.needs / jobs.activation.needs under jobs: — if the team prefers keeping dependency config next to the other per-job customisation from ADR-27138 rather than in on:.
Files to Modify
pkg/parser/schemas/— addneedstoon:schema blockpkg/workflow/frontmatter_types.go— addNeedsfield toOnconfig structpkg/workflow/compiler_pre_activation_job.go— wireon.needsintopre_activation.needspkg/workflow/compiler_activation_job_builder.go— wireon.needsintoactivation.needspkg/workflow/expression_extraction.goor expression validator — validateneeds.*refs inon.github-app.*docs/— documenton.needspkg/workflow/compiler_*_test.go— integration tests for the full spike scenario from the issue
Acceptance Criteria
-
on.needs: [secrets_fetcher]compiles without error - The compiled
pre_activationjob includesneeds: [secrets_fetcher]in the output YAML - The compiled
activationjob also includessecrets_fetcherin itsneeds: -
$\{\{ needs.secrets_fetcher.outputs.app_id }}inon.github-app.app-idpasses expression validation - The spike workflow from the issue (full external-secret-manager pattern) compiles cleanly and passes
actionlint - Documentation updated with
on.needsfield description and example -
make agent-finishpasses (includingmake recompile)
Related to on.github-app credentials cannot be sourced from a custom job's outputs (jobs.{pre_activation,activation}.pre-steps splicing/needs bugs + missing on.needs API) #27670
Generated by Plan Command for issue #27670 · ● 242.8K · ◷
- expires on Apr 24, 2026, 2:47 AM UTC
Activity
github-actions commentedon Apr 22, 2026
🍪 *Issue Monster selected this for Copilotecho BEGIN___COMMAND_OUTPUT_MARKER ; PS1= ; PS2= ; unset HISTFILE ; EC=0 ; echo ___BEGIN___COMMAND_DONE_MARKER___0 ; }
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
Caution
Security scanning requires review for Issue Monster
Details
Potential security threats were detected in the agent output. The workflow output should be reviewed before merging.
Review the workflow run logs for details.
Copilot commentedon Apr 22, 2026
The agent encountered an error and was unable to start working on this issue: This may be caused by a repository ruleset violation. See granting bypass permissions for the agent, or please contact support if the issue persists. (Request id: 1E01:271319:1DFE10:7911CB:69E85029)