Files
Kota-Maeda 89bc9719b2 fix(ci): detect plugins skipped by cancelled Upload Merged Plugin runs (#3445)
* fix(ci): detect plugins skipped by cancelled Upload Merged Plugin runs

When multiple PRs are merged in quick succession, GitHub Actions queues
runs under the same concurrency group. Queued runs can be dropped before
they start, causing the plugins they would have uploaded to be silently
skipped.

Instead of using github.event.before as BASE_SHA (which only covers the
diff of the triggering push), resolve BASE_SHA from the HEAD SHA of the
last successful run of this workflow. This ensures that any commits
missed by a cancelled run are included in the next successful run's
changed-file detection.

* fix(ci): add permissions block and use ref_name for branch filter

- Add 'actions: read' permission to detect-changes job so GITHUB_TOKEN
  can call the workflow runs API regardless of org-level default policy
- Replace hard-coded 'branch=main' with github.ref_name to avoid
  silent breakage if the default branch is renamed

* fix(ci): fail on API/jq error instead of falling back silently

Splitting the pipeline into two separate commands (gh api, then jq)
lets either failure exit non-zero and fail the step. A transient API
error, rate limit, or permission issue now surfaces as a workflow
failure that can be retried, rather than silently falling back to
github.event.before and permanently skipping the queued plugins.

* fix(ci): filter by run_number to exclude re-runs of older commits

Using 'select(.head_sha != current)' alone could select a re-run of an
older cancelled commit if it succeeded more recently than the actual
last successful push. Add 'run_number < current_run_number' to ensure
only runs triggered before the current one are considered, and use
max_by(.run_number) instead of first to pick by run order rather than
API sort order (created_at).
2026-07-16 14:23:10 +08:00
..