Skip to content

Add configuration option for PR title default source (branch name vs first commit message) #37463

@0xGREG

Description

@0xGREG

Feature Description

Since PR #36606 (merged in 1.26.0), the pull request creation form always uses the first commit's message as the default PR title, even for multi-commit branches. Previously, multi-commit branches would use the branch name as the default title.

While I understand the rationale behind the change (novice users leaving branch names as PR titles), our teams have procedures that make it so branch names automatically meaningful. The new behavior breaks this workflow and requires manually replacing the commit message with the branch name every time.

Proposed Solution

Add a configuration option under [repository.pull-request] in app.ini to let administrators choose the default PR title source. For example:

[repository.pull-request]
;; Options: first-commit, branch-name
DEFAULT_PR_TITLE_SOURCE = first-commit

This would let teams that prefer the old behavior set DEFAULT_PR_TITLE_SOURCE = branch-name, while keeping the new first-commit default for everyone else.

Related info

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposal/acceptedWe have reviewed the proposal and agree that it should be implemented like that/at all.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions