WIP Add after hooks step#218
Conversation
6aad646 to
dfa44fa
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughTwo workflow files— ChangesAfter-Hooks and Encryption Key Integration
Sequence DiagramsequenceDiagram
participant Caller as Workflow Caller
participant Preflight as pipelines-preflight-action
participant Pipeline as Pipeline Run
participant Mise as Mise Installer
participant CodeAuth as pipelines-code-auth
participant Hooks as pipelines-hooks-after
participant Status as pipelines_status_check
Caller->>Preflight: provide PIPELINES_PLAN_ENCRYPTION_KEY
Preflight-->>Caller: preflight complete
Caller->>Pipeline: run pipeline
Pipeline-->>Caller: pipeline_status (success/failure)
Status->>Mise: install Mise
Status->>CodeAuth: configure code auth
Status->>Hooks: run pipelines-hooks-after (with key)
Hooks-->>Status: outcome -> AFTER_HOOKS_OUTCOME
Status-->>Caller: require pipeline_status=="success" AND AFTER_HOOKS_OUTCOME!="failure"
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pipelines.yml:
- Line 382: The workflow references steps.hooks_after.output_file (assigned to
AFTER_HOOKS_OUTPUT_FILE) but that output doesn't exist in the
pipelines-hooks-after action; inspect the action's action.yml
(pipelines-actions/.github/actions/pipelines-hooks-after) and either add an
outputs.output_file definition (and make the action set that output) or change
the workflow to use an existing output (e.g., steps.hooks_after.outcome) or
remove the env var if not needed; also verify the CLI supports
--after-hooks-output-file (search repo for the flag in Go files) and if it
doesn't, remove/replace the flag usage where AFTER_HOOKS_OUTPUT_FILE is consumed
so you don't pass an empty value to the CLI.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 86df98ca-63c0-4381-9b44-1ff78ae192b7
📒 Files selected for processing (1)
.github/workflows/pipelines.yml
| API_BASE_URL: ${{ inputs.api_base_url }} | ||
| GH_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).propose_infra_change }} | ||
| GH_ARTIFACT_TOKEN: ${{ fromJson(steps.pipelines-tokens.outputs.tokens_json).propose_infra_change }} | ||
| AFTER_HOOKS_OUTPUT_FILE: ${{ steps.hooks_after.output_file }} |
There was a problem hiding this comment.
The output_file property doesn't exist on the step outputs.
Static analysis flags that steps.hooks_after.output_file isn't defined in the action's outputs schema. Cross-checking with pipelines-root.yml, I notice it only references steps.hooks_after.outcome and never uses output_file. This discrepancy suggests either:
- The action doesn't expose an
output_fileoutput - There's a missing output definition in the action's
action.yml
If the property is undefined, AFTER_HOOKS_OUTPUT_FILE will be empty, and line 387 will pass a blank value to the CLI.
Run this script to check the action definition:
#!/bin/bash
# Check if pipelines-hooks-after action defines output_file output
fd -t f 'action.ya?ml' pipelines-actions/.github/actions/pipelines-hooks-after --exec cat {} \; | rg -A 5 '^outputs:'Also verify the CLI accepts this flag:
#!/bin/bash
# Check if pipelines CLI supports --after-hooks-output-file flag
rg -n 'after-hooks-output-file' -g '*.go' -C 3🧰 Tools
🪛 actionlint (1.7.12)
[error] 382-382: property "output_file" is not defined in object type {conclusion: string; outcome: string; outputs: {string => string}}
(expression)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/pipelines.yml at line 382, The workflow references
steps.hooks_after.output_file (assigned to AFTER_HOOKS_OUTPUT_FILE) but that
output doesn't exist in the pipelines-hooks-after action; inspect the action's
action.yml (pipelines-actions/.github/actions/pipelines-hooks-after) and either
add an outputs.output_file definition (and make the action set that output) or
change the workflow to use an existing output (e.g., steps.hooks_after.outcome)
or remove the env var if not needed; also verify the CLI supports
--after-hooks-output-file (search repo for the flag in Go files) and if it
doesn't, remove/replace the flag usage where AFTER_HOOKS_OUTPUT_FILE is consumed
so you don't pass an empty value to the CLI.
e9e8d19 to
7d8115c
Compare
Summary by CodeRabbit