Skip to content

Commit f414fe1

Browse files
fi3eworkampcode-com
andcommitted
fix: filter skipped jobs and harden summary injection in shared actions
- Filter out skipped/null-conclusion jobs in ecosystem-ci-result to avoid unexpanded matrix expressions in suite names - Use process.env instead of template literal interpolation for comment body in both ecosystem_ci_dispatch and ecosystem_ci_per_commit to prevent SyntaxError when summary contains special characters - Add cross-stack isomorphism guideline to AGENTS.md Amp-Thread-ID: https://ampcode.com/threads/T-019d3d10-71af-716a-a2ee-e4a3df4d5b7a Co-authored-by: Amp <amp@ampcode.com>
1 parent 20f3bbb commit f414fe1

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/actions/ecosystem-ci-result/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ runs:
7979
8080
const suites = jobs
8181
.filter((job) => job.name?.startsWith(jobPrefix))
82+
.filter((job) => job.conclusion !== 'skipped' && job.conclusion !== null)
8283
.map((job) => {
8384
let suiteName = job.name.substring(jobPrefix.length);
8485
if (suiteName.startsWith('(') && suiteName.endsWith(')')) {

.github/actions/ecosystem_ci_dispatch/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,6 @@ runs:
151151
await github.rest.issues.updateComment({
152152
owner: '${{ inputs.ecosystem-owner }}',
153153
repo: '${{ inputs.ecosystem-repo }}',
154-
comment_id: ${{ steps.create-comment.outputs.result }},
155-
body: `${{ steps.eco-ci-result.outputs.summary }}`
154+
comment_id: process.env.COMMENT_ID,
155+
body: process.env.SUMMARY
156156
})

.github/actions/ecosystem_ci_per_commit/action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@ runs:
8080
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
8181
if: steps.eco_ci.outcome == 'failure'
8282
name: Create Commit Comment
83+
env:
84+
SUMMARY: ${{ steps.eco-ci-result.outputs.summary }}
8385
with:
8486
script: |
8587
await github.rest.repos.createCommitComment({
8688
commit_sha: context.sha,
8789
owner: '${{ inputs.ecosystem-owner }}',
8890
repo: '${{ inputs.ecosystem-repo }}',
89-
body: `${{ steps.eco-ci-result.outputs.summary }}`
91+
body: process.env.SUMMARY
9092
})
9193
9294
- name: Checkout ecosystem-ci repository

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ Commits follow short, imperative subjects (≤72 chars), elaborating in the body
1818
## Environment & Tooling Notes
1919
The runner exports `ECOSYSTEM_CI`, `TURBO_FORCE`, and memory-safe `NODE_OPTIONS`; avoid overriding them unless a suite explicitly requires it. Keep `workspace/` untracked, and never commit runtime artifacts. Remember that network-dependent steps may need explicit approval in restricted environments.
2020
`verdaccio.yaml` lives at repo root for rspack flows that publish locally; it writes under `workspace/`.
21+
22+
## Cross-Stack Isomorphism
23+
All stacks (rsbuild, rspack, rslib, rstest, rsdoctor, rspress) must follow the same structural patterns. When fixing a bug or adding a feature to one stack's workflows or shared actions, always check whether the same issue or gap exists in the other stacks and apply the fix uniformly. Avoid stack-specific workarounds that diverge from the common pattern — if a change cannot be made isomorphic, document the reason explicitly. Shared composite actions (`ecosystem_ci_dispatch`, `ecosystem_ci_per_commit`, `ecosystem-ci-result`) and workflow conventions (job naming, Verdaccio setup, suite execution) are designed to be stack-agnostic; keep them that way.

0 commit comments

Comments
 (0)