gitforge/templates/repo/commit_message.tmpl
limiting-factor dc8d16d412 fix(ui): blame displays a placeholder if the commit message is empty (#13479)
Closes forgejo/forgejo#6133

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests for Go changes

(can be removed for JavaScript changes)

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [x] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
NOTE: add Gusted as co-author

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/13479): <!--number 13479 --><!--line 0 --><!--description Zml4KHVpKTogYmxhbWUgZGlzcGxheXMgYSBwbGFjZWhvbGRlciBpZiB0aGUgY29tbWl0IG1lc3NhZ2UgaXMgZW1wdHk=-->fix(ui): blame displays a placeholder if the commit message is empty<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13479
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-07-16 14:51:23 +02:00

5 lines
150 B
Go HTML Template

{{if and (eq .commitMessage "") (not (eq .commitURL ""))}}
<i>{{ctx.Locale.Tr "repo.empty_commit_message"}}</i>
{{else}}
{{.commitMessage}}
{{end}}