Skip to content

Fix/release check pr creation - #3

Merged
StoneyJackson merged 3 commits into
mainfrom
fix/release-check-pr-creation
Jul 27, 2026
Merged

StoneyJackson merged 3 commits into
mainfrom
fix/release-check-pr-creation

Conversation

@StoneyJackson

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 27, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Automates and hardens the weekly “plcc-ng release” workflow so it can recover from partial runs (branch pushed but PR not created), and keeps all version pins/examples in sync when opening the update PR.

Changes:

  • Switch idempotency from “branch exists” to “PR exists”, and add a recovery path to create a PR from an already-pushed branch.
  • Add semantic-release-aware PR/commit metadata (major updates produce feat! + BREAKING CHANGE footer; otherwise fix:).
  • Centralize the test’s pinned version and update all pinned/versioned references together (images, scenarios, feature metadata, docs).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/plcc-ng/pinned_version.sh Introduces an EXPECTED_VERSION variable so workflow updates can keep the test assertion aligned with the scenario pin.
.github/workflows/check-plcc-ng-release.yml Reworks release-check automation for PR-based idempotency, recovery when branch exists without a PR, and synchronized version bumping across repo references.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

check "plcc-version runs" plcc-version
check "exact version installed" bash -c \
"/usr/local/pipx/venvs/plcc-ng/bin/python -m pip show plcc-ng | grep -q '^Version: 1.0.0$'"
"/usr/local/pipx/venvs/plcc-ng/bin/python -m pip show plcc-ng | grep -q '^Version: ${EXPECTED_VERSION}\$'"
StoneyJackson and others added 2 commits July 27, 2026 10:32
gh pr create resolves --label against the repo before creating the PR,
so the nonexistent 'automated' label aborted the run after the branch
had already been pushed. Labeling is now a separate best-effort step.

The idempotency guard keyed on branch existence, so the orphaned branch
made every subsequent run report "PR already open" and exit 0 —
suppressing the update permanently. It now keys on the PR and recovers
by opening one when a branch exists without it. That recovery checks
out FETCH_HEAD, since actions/checkout leaves no origin/<branch> ref.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…on reference

The bump commit was hardcoded to `fix:`, so a new plcc-ng major released
the image as a patch and moved the :N tag that courses are told to pin
onto a new major of the tool. The type is now derived: a major jump emits
`feat!:` with a BREAKING CHANGE footer, everything else stays `fix:`. The
PR title and body carry it too, since squash-merge is what semantic-release
ultimately reads.

The bump also only touched the two image devcontainer.json files, leaving
the feature test pin, the feature's proposals/description, and the docs
example to drift to a stale version. All of them now move together.
pinned_version.sh gains an EXPECTED_VERSION variable so its assertion and
scenarios.json cannot disagree; the feature's own patch version bumps so
the metadata edit actually publishes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@StoneyJackson
StoneyJackson force-pushed the fix/release-check-pr-creation branch from bec717a to 5074ab1 Compare July 27, 2026 14:36
Every PR built both images, including the ~12GB plcc-ng-full, even when
it touched only workflows or docs — tens of minutes of wasted CI per PR.

A cheap `changes` job now classifies the diff and the expensive steps are
guarded on it. The jobs themselves still run and still post their checks:
skipping the jobs would leave required status checks unreported, which
blocks merges permanently rather than speeding them up.

The two filters are separate because they have different inputs.
build-and-test.sh copies only test/smoke-test.sh into the image, so a
change under test/plcc-ng/ re-runs the feature test without rebuilding
either image.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🐳 PR images built (amd64 only):

  • ghcr.io/ourplcc/devcontainers/plcc-ng:pr-3
  • ghcr.io/ourplcc/devcontainers/plcc-ng-full:pr-3

To test, point a devcontainer.json image at one of these tags.

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

🐳 PR images built (amd64 only):

  • ghcr.io/ourplcc/devcontainers/plcc-ng:pr-3
  • ghcr.io/ourplcc/devcontainers/plcc-ng-full:pr-3

To test, point a devcontainer.json image at one of these tags.

@github-actions

Copy link
Copy Markdown
Contributor

🐳 PR images built (amd64 only):

  • ghcr.io/ourplcc/devcontainers/plcc-ng:pr-3
  • ghcr.io/ourplcc/devcontainers/plcc-ng-full:pr-3

To test, point a devcontainer.json image at one of these tags.

@StoneyJackson
StoneyJackson merged commit 9520c62 into main Jul 27, 2026
5 checks passed
@StoneyJackson
StoneyJackson deleted the fix/release-check-pr-creation branch July 27, 2026 15:10
@ourplcc-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants