Add branch dropdown to PR verification #82

Merged
alexander merged 9 commits from mcp/pr-workflow-branch-picker into main 2026-09-22 15:58:26 +02:00
Owner

Makes manual PR verification use an explicit BookWave branch dropdown in addition to the PR-number input.

Changes:

  • adds generated bookwave_branch choices to pull-request.yml;
  • checks out that selected branch in both preflight and verify jobs;
  • validates that the selected branch HEAD exactly matches the entered Forgejo PR head;
  • uses the selected branch in concurrency and run-name metadata;
  • extends the existing branch-dropdown refresh workflow so APK and PR choices are refreshed together.

Forgejo 16.0.4 still stores the top-level Actions run title from the literal workflow name, so the PR number is guaranteed in the job titles (PR #… · Preflight, PR #… · verifyDebug) while the existing run-name remains ready for Forgejo support.

Do not merge automatically.

Makes manual PR verification use an explicit BookWave branch dropdown in addition to the PR-number input. Changes: - adds generated `bookwave_branch` choices to `pull-request.yml`; - checks out that selected branch in both preflight and verify jobs; - validates that the selected branch HEAD exactly matches the entered Forgejo PR head; - uses the selected branch in concurrency and `run-name` metadata; - extends the existing branch-dropdown refresh workflow so APK and PR choices are refreshed together. Forgejo 16.0.4 still stores the top-level Actions run title from the literal workflow `name`, so the PR number is guaranteed in the job titles (`PR #… · Preflight`, `PR #… · verifyDebug`) while the existing `run-name` remains ready for Forgejo support. Do not merge automatically.
Author
Owner

Manual acceptance for this workflow change

Run Pull request once against PR #82.

Because the new dropdown exists only on this PR branch until merge, set Use workflow from to mcp/pr-workflow-branch-picker for this one test. Then select:

  • BookWave PR source branch: mcp/pr-workflow-branch-picker from the dropdown
  • Forgejo PR number: 82
  • Force rerun: leave off

Expected: preflight validates the selected branch HEAD exactly matches PR #82, and the jobs render as PR #82 · Preflight and PR #82 · verifyDebug.

After this PR is merged, leave Use workflow from on main; future PR checks will use the generated branch dropdown, so branch selection no longer depends on typing a ref.

Do not run Refresh workflow branch dropdowns as acceptance for this PR: that helper intentionally commits refreshed branch choices directly to main.

### Manual acceptance for this workflow change Run **Pull request** once against PR #82. Because the new dropdown exists only on this PR branch until merge, set **Use workflow from** to `mcp/pr-workflow-branch-picker` for this one test. Then select: - **BookWave PR source branch:** `mcp/pr-workflow-branch-picker` from the dropdown - **Forgejo PR number:** `82` - **Force rerun:** leave off Expected: preflight validates the selected branch HEAD exactly matches PR #82, and the jobs render as `PR #82 · Preflight` and `PR #82 · verifyDebug`. After this PR is merged, leave **Use workflow from** on `main`; future PR checks will use the generated branch dropdown, so branch selection no longer depends on typing a ref. Do **not** run `Refresh workflow branch dropdowns` as acceptance for this PR: that helper intentionally commits refreshed branch choices directly to main.
Author
Owner

Failed run #225 diagnosed and fixed

The run payload contained bookwave_branch=main, even though Use workflow from was mcp/pr-workflow-branch-picker. Checkout therefore correctly checked out main, and preflight rejected it because PR #82 HEAD is the feature branch.

Fix now on PR #82:

  • main is no longer offered as a PR source branch;
  • the PR branch dropdown defaults to __select_pr_branch__ rather than silently choosing a branch;
  • preflight stops before checkout with a clear error if the placeholder is left selected;
  • the refresh workflow keeps APK choices including main, but PR-source choices exclude main.

For the next acceptance run, use workflow definition mcp/pr-workflow-branch-picker, explicitly choose source branch mcp/pr-workflow-branch-picker, enter PR 82, and leave Force rerun off.

### Failed run #225 diagnosed and fixed The run payload contained `bookwave_branch=main`, even though **Use workflow from** was `mcp/pr-workflow-branch-picker`. Checkout therefore correctly checked out main, and preflight rejected it because PR #82 HEAD is the feature branch. Fix now on PR #82: - `main` is no longer offered as a PR source branch; - the PR branch dropdown defaults to `__select_pr_branch__` rather than silently choosing a branch; - preflight stops before checkout with a clear error if the placeholder is left selected; - the refresh workflow keeps APK choices including main, but PR-source choices exclude main. For the next acceptance run, use workflow definition `mcp/pr-workflow-branch-picker`, explicitly choose source branch `mcp/pr-workflow-branch-picker`, enter PR `82`, and leave Force rerun off.
Author
Owner

PR status indicator added

The Pull request workflow now publishes a Forgejo commit status named BookWave / PR verification on the exact PR HEAD:

  • success when both Preflight and verifyDebug pass → green check on the PR;
  • failure when either fails → red X on the PR;
  • branch/PR mismatch is published as failure on the requested PR HEAD;
  • if the PR HEAD changes during verification, the run is not allowed to mark the newer commit green.

verifyDebug is also pinned to the exact SHA validated by Preflight so the visual status and the code actually checked are the same commit.

A new run is required to exercise the status publisher; the previous failed run belongs to an older PR HEAD.

### PR status indicator added The Pull request workflow now publishes a Forgejo commit status named **BookWave / PR verification** on the exact PR HEAD: - **success** when both Preflight and `verifyDebug` pass → green check on the PR; - **failure** when either fails → red X on the PR; - branch/PR mismatch is published as failure on the requested PR HEAD; - if the PR HEAD changes during verification, the run is not allowed to mark the newer commit green. `verifyDebug` is also pinned to the exact SHA validated by Preflight so the visual status and the code actually checked are the same commit. A new run is required to exercise the status publisher; the previous failed run belongs to an older PR HEAD.
Author
Owner

Hidden branch input + failed status publisher fixed

Latest runs #226/#227 exposed two Forgejo-specific issues:

  1. Forgejo did not render the new bookwave_branch input from this unmerged workflow revision. It silently supplied the workflow default instead.
  2. The status-publishing job used jq, but the default node:22-bookworm job image does not contain jq.

Current PR HEAD fixes both:

  • if bookwave_branch is hidden/defaulted while testing an unmerged workflow, PR verification resolves the source from Use workflow from (FORGEJO_REF_NAME);
  • once this workflow is merged into main, the generated BookWave PR source branch dropdown remains the normal source selector;
  • selecting/running main as the source is still rejected;
  • the status publisher now uses the guaranteed Node runtime rather than jq;
  • the final BookWave / PR verification commit status still publishes success/failure against the exact PR HEAD.

For the next pre-merge test of PR #82: set Use workflow from to mcp/pr-workflow-branch-picker, enter PR number 82, leave Force rerun off. If Forgejo still does not show the BookWave source-branch field, that is expected for this unmerged workflow revision; the workflow will now use mcp/pr-workflow-branch-picker from Use workflow from automatically.

### Hidden branch input + failed status publisher fixed Latest runs #226/#227 exposed two Forgejo-specific issues: 1. Forgejo did not render the new `bookwave_branch` input from this unmerged workflow revision. It silently supplied the workflow default instead. 2. The status-publishing job used `jq`, but the default `node:22-bookworm` job image does not contain `jq`. Current PR HEAD fixes both: - if `bookwave_branch` is hidden/defaulted while testing an unmerged workflow, PR verification resolves the source from **Use workflow from** (`FORGEJO_REF_NAME`); - once this workflow is merged into `main`, the generated **BookWave PR source branch** dropdown remains the normal source selector; - selecting/running `main` as the source is still rejected; - the status publisher now uses the guaranteed Node runtime rather than `jq`; - the final `BookWave / PR verification` commit status still publishes success/failure against the exact PR HEAD. For the next pre-merge test of PR #82: set **Use workflow from** to `mcp/pr-workflow-branch-picker`, enter PR number `82`, leave Force rerun off. If Forgejo still does not show the BookWave source-branch field, that is expected for this unmerged workflow revision; the workflow will now use `mcp/pr-workflow-branch-picker` from **Use workflow from** automatically.
Keep branch refresh scoped to APK workflow
All checks were successful
BookWave / PR verification BookWave PR verification passed
b82a8e2ae4
Author
Owner

Workflow simplified after repeated dispatch failures

The custom bookwave_branch input has been removed entirely.

PR verification now uses Forgejo's native Use workflow from ref as the branch source, exactly like the previously working workflow. The manual input schema once again matches main exactly: only pr_number and force_rerun.

The PR still adds:

  • exact checked-HEAD output from Preflight;
  • verifyDebug pinned to that exact validated SHA;
  • final BookWave / PR verification commit status: green on full success, red on failure.

Current PR HEAD: b82a8e2ae4b65ef287247b5e525aa8dccfb3a39d.

The latest recorded failure is still run #227 on older HEAD 91bdffb…; there is no Actions run yet for the current HEAD.

Next test: Use workflow from = mcp/pr-workflow-branch-picker, PR number 82, Force rerun off. There is intentionally no separate BookWave source-branch field anymore.

### Workflow simplified after repeated dispatch failures The custom `bookwave_branch` input has been removed entirely. PR verification now uses Forgejo's native **Use workflow from** ref as the branch source, exactly like the previously working workflow. The manual input schema once again matches `main` exactly: only `pr_number` and `force_rerun`. The PR still adds: - exact checked-HEAD output from Preflight; - `verifyDebug` pinned to that exact validated SHA; - final `BookWave / PR verification` commit status: green on full success, red on failure. Current PR HEAD: `b82a8e2ae4b65ef287247b5e525aa8dccfb3a39d`. The latest recorded failure is still run #227 on older HEAD `91bdffb…`; there is no Actions run yet for the current HEAD. Next test: **Use workflow from = mcp/pr-workflow-branch-picker**, PR number `82`, Force rerun off. There is intentionally no separate BookWave source-branch field anymore.
alexander deleted branch mcp/pr-workflow-branch-picker 2026-09-22 15:58:26 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/Audiobookshelf-Manager-Claude!82
No description provided.