Skip to content

Duplicate Reviewed-by lines in default merge message #24795

@corytodd

Description

@corytodd

Description

When using the merge commit strategy for a pull request it is possible for unofficial approvers to be duplicated in the commit message trailers.

The requirements to trigger this scenario:

  1. app.ini
    [repository.pull-request]
    DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = false

  2. No custom MERGE_TEMPLATE or a custom pull.tmpl that always appends the default merge message.

For example if the unofficial reviewer User A casts two approval votes, the generated merge message looks like this

Commit Title

Reviewed-by: User A <[email protected]>
Reviewed-by: User A <[email protected]>

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

2.40.1

Operating System

Ubuntu 23.04

How are you running Gitea?

Built from source on v1.19.3, also verified on tip of main, and running locally from command line.

TAGS="bindata sqlite sqlite_unlock_notify" make build

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions