fix(pull): show scheduled merge style in auto-merge banner and keep merge message fields visible #6

Merged
Fryuni merged 2 commits from t3code/44b1c273 into forgejo 2026-09-16 11:06:26 +00:00
Owner

Summary

  • Show the scheduled (auto-merge) merge style in the auto-merge banner independently of the currently selected merge style, instead of only the generic tip message
  • Pass pendingMergeStyle from the template into PullRequestMergeForm and derive its display label from the known merge styles
  • Always show merge title/message fields when the form is open, removing the special case that hid them for rebase auto-merge, so the saved message and branch choice work consistently (including rebase-merge)

Testing

  • Added frontend unit tests in PullRequestMergeForm.test.js:
    • auto-merge banner shows the scheduled method label while the selected method can differ
    • message fields are absent for rebase/fast-forward-only styles in all merge/auto-merge combinations
    • auto-merge saves message and branch choice for merge, squash, and rebase-merge
  • Added integration test TestPullViewScheduledMergeStyle verifying pendingMergeStyle is rendered empty without a schedule and as the scheduled style (e.g. rebase) after ScheduleAutoMerge
  • Not run: browser E2E suite; frontend tests and SQLite integration test should be exercised via npx vitest run web_src/js/components/PullRequestMergeForm.test.js and make 'test-sqlite#TestPullViewScheduledMergeStyle'
## Summary - Show the scheduled (auto-merge) merge style in the auto-merge banner independently of the currently selected merge style, instead of only the generic tip message - Pass `pendingMergeStyle` from the template into `PullRequestMergeForm` and derive its display label from the known merge styles - Always show merge title/message fields when the form is open, removing the special case that hid them for rebase auto-merge, so the saved message and branch choice work consistently (including `rebase-merge`) ## Testing - Added frontend unit tests in `PullRequestMergeForm.test.js`: - auto-merge banner shows the scheduled method label while the selected method can differ - message fields are absent for `rebase`/`fast-forward-only` styles in all merge/auto-merge combinations - auto-merge saves message and branch choice for `merge`, `squash`, and `rebase-merge` - Added integration test `TestPullViewScheduledMergeStyle` verifying `pendingMergeStyle` is rendered empty without a schedule and as the scheduled style (e.g. `rebase`) after `ScheduleAutoMerge` - Not run: browser E2E suite; frontend tests and SQLite integration test should be exercised via `npx vitest run web_src/js/components/PullRequestMergeForm.test.js` and `make 'test-sqlite#TestPullViewScheduledMergeStyle'`
- Pass the pending auto-merge style to the merge form and display its label in the info banner, independent of the currently selected style
- No longer force-show merge title/message fields for scheduled rebase merges
- Add integration and component tests
fix(pull): reject merge messages for rebase and fast-forward-only merges
Some checks failed
testing / semgrep/ci (pull_request) Successful in 52s
testing / backend-checks (pull_request) Failing after 7m59s
testing / test-unit (pull_request) Has been skipped
testing / test-e2e (pull_request) Has been skipped
testing / test-pgsql (pull_request) Has been skipped
testing / test-mysql (pull_request) Has been skipped
testing / test-sqlite (pull_request) Has been skipped
testing / test-remote-cacher (redis) (pull_request) Has been skipped
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
testing / coverage (pull_request) Has been skipped
testing / security-check (pull_request) Has been skipped
testing-integration / test-mariadb (v10.6) (pull_request) Failing after 56m23s
testing-integration / test-mariadb (v11.8) (pull_request) Failing after 51m24s
testing-integration / test-sqlite (pull_request) Failing after 1h25m0s
testing-integration / test-unit (pull_request) Successful in 26m23s
testing / frontend-checks (pull_request) Failing after 2m35s
ee81ef98ba
- Rebase and fast-forward-only preserve original commit messages; a supplied title/body now returns 422 (API) or an error (web), including when scheduling auto-merge
- Drop the REBASE_TEMPLATE amend of the tip commit and skip message templates for non-message styles
- Document MergeTitleField/MergeMessageField constraints in API form
Fryuni merged commit 608cbcfa91 into forgejo 2026-09-16 11:06:26 +00:00
Fryuni deleted branch t3code/44b1c273 2026-09-16 11:06:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
Fryuni/forgejo!6
No description provided.