Repository navigation
Warn instead of failing when Node is unavailable in the conclusion job - #65765
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot review conclusion job and replace using node with actions/github-script |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Moved both generators into the conclusion job’s pinned |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||
| with: | ||
| script: | | ||
| const path = require('path'); |
There was a problem hiding this comment.
@copilot refactor in js file in sctions/setup/js
There was a problem hiding this comment.
The usage generation logic now lives in actions/setup/js/generate_usage_artifacts.cjs; generated workflows delegate to it. Commit ac91ea7.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Moved the conclusion orchestration into |
|
/smoke-copilot |
|
📰 BREAKING: Smoke Copilot is now investigating this issue comment. Sources say the story is developing... |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The shell regression test is not run by CI, and the implementation contradicts the documented warning behavior.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Moves usage summary generation to actions/github-script, avoiding reliance on node being available on PATH.
Changes:
- Separates file collection from best-effort JavaScript generation.
- Exports generator entry points and adds a resilient orchestration wrapper.
- Regenerates compiled workflow lockfiles.
| File | Description |
|---|---|
actions/setup/sh/collect_usage_artifact_files.sh |
Removes direct Node invocations. |
actions/setup/sh/collect_usage_artifact_files_test.sh |
Adds collector regression coverage. |
actions/setup/js/generate_usage_activity_summary.cjs |
Exports main. |
actions/setup/js/generate_usage_activity_summary.test.cjs |
Tests the exported entry point. |
actions/setup/js/unified_session.cjs |
Exposes unified-session generation. |
actions/setup/js/generate_usage_artifacts.cjs |
Orchestrates best-effort generation and file listing. |
actions/setup/js/generate_usage_artifacts.test.cjs |
Tests failure handling and listing. |
pkg/workflow/notify_comment.go |
Adds the GitHub Script generation step. |
pkg/workflow/notify_comment_test.go |
Validates generated conclusion steps. |
.github/workflows/*.lock.yml |
Applies the generated step across compiled workflows. |
| output="$(RUNNER_TEMP="$TEST_DIR" PATH="$TEST_DIR/bin" /bin/bash "$SCRIPT" 2>&1)" | ||
| ! grep -q 'node not found on PATH' <<<"$output" | ||
| grep -q '/tmp/gh-aw/usage/activity/collector-test-marker' <<<"$output" | ||
| test ! -f /tmp/gh-aw/usage/activity/summary.json |
There was a problem hiding this comment.
Added this regression script to the test-scripts target in commit 80a1d1c; make test-scripts now exercises it.
| " - name: Generate usage activity summary and unified session\n", | ||
| " if: always()\n", | ||
| " continue-on-error: true\n", | ||
| fmt.Sprintf(" uses: %s\n", pinAction("actions/github-script")), |
There was a problem hiding this comment.
The collector now emits a GitHub Actions warning when system node is absent, while generation stays on actions/github-script. The shell test covers both PATH cases; see commit 7532f42.
|
@copilot run pr-finisher skill fix https://github.com/github/gh-aw/actions/runs/37326651081/job/111821643354 |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Ran the PR-finisher checks. I fixed the reproducible impacted Go test failure in |
|
🎉 This pull request is included in a new release. Release: |

On runners without
nodeonPATH, the conclusion job’s usage collector exits 127, leaving an error annotation and skipping the final file listing. Activity summary generation is best-effort and should not fail the collection step.node(exit 127) on runners without node on PATH #65105