Document DEFAULT_TITLE_SOURCE pull request title setting (#391)

Adds documentation for the `DEFAULT_TITLE_SOURCE` setting.

- Added `DEFAULT_TITLE_SOURCE` to the config cheat sheet under `[repository.pull-request]`
- Added a "Default pull request title" section to the pull request usage docs explaining both modes (`first-commit` and `auto`)

---------

Co-authored-by: Nicolas <bircni@icloud.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/391
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: 0xGREG <gitea@freespeech.work>
Co-committed-by: 0xGREG <gitea@freespeech.work>
This commit is contained in:
0xGREG
2026-04-28 21:45:22 +00:00
committed by Lunny Xiao
parent a0802c6748
commit e0fcc861f2
2 changed files with 19 additions and 0 deletions

View File

@@ -169,6 +169,9 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
- `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo.
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: Set the default value for "Delete pull request branch after merge by default" for new repositories.
- `DEFAULT_TITLE_SOURCE`: **first-commit**: Default source for the pull request title when opening a new PR. Valid options:
- `first-commit`: Uses the oldest commit's summary as the title. If there are multiple commits, still uses the first commit's message.
- `auto`: Uses the commit's summary when the PR contains a single commit; when there are multiple commits, converts the branch name into a human-readable title by normalizing separators and casing.
### Repository - Issue (`repository.issue`)