feat(settings): improve commit messages#19851
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e890e07434
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR updates Weblate’s default VCS commit / merge request message templates to be more consistent and aligned with the Conventional Commits format, and adds a per-field “Restore site default” control in settings forms to revert message templates back to the current installation defaults.
Changes:
- Revise default commit/add/delete/merge/add-on/pull message templates in
weblate/trans/defaults.pyand update affected test expectations. - Add “Restore site default” UI support for message template fields (form metadata, template button, JS behavior, and CSS).
- Add/extend tests to cover rendering of updated default templates and the new site-default restore control in settings UIs.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| weblate/workspaces/tests.py | Adds coverage to ensure workspace settings include site-default metadata and restore control. |
| weblate/workspaces/forms.py | Marks message template fields as supporting “site default” restore and injects site default values into widget attrs. |
| weblate/trans/tests/test_settings.py | Adds tests validating that new default templates render and that site-default widget attrs/rendering exist across settings forms. |
| weblate/trans/tests/test_file_format_params.py | Updates assertions to match new Conventional Commits-style commit subjects. |
| weblate/trans/forms.py | Introduces setup_message_setting_site_defaults() and wires it into inherited settings handling. |
| weblate/trans/defaults.py | Rewrites built-in default templates to a Conventional Commits-style subject + structured body format. |
| weblate/templates/bootstrap5/field.html | Adds a restore button next to labels for fields marked as site_default. |
| weblate/static/styles/main.css | Adds layout styling for label + restore-button alignment. |
| weblate/static/loader-bootstrap.js | Implements restore-button behavior and refactors inherited-setting helpers for reuse. |
| docs/changes.rst | Documents the behavior change in release notes. |
| docs/admin/workspaces.rst | Documents Conventional Commits-style defaults and the restore control in workspace admin docs. |
| docs/admin/projects.rst | Documents the restore control and inheritance interaction for message templates. |
| docs/admin/config.rst | Documents restore behavior and updates notes for message-related settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
- Follow Conventional Commits specification and make the content of the commit messages consistent. - Add button to revert to the site defaults in case users wants to go back to the shipped/configured settings. Fixes WeblateOrg#19806
Fixes #19806