gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Squash-Merging through API mangles commit body

Open soulmerge opened this issue 4 years ago • 3 comments

  • Gitea version (or commit ref): 1.13.0
  • Git version: 2.20.1
  • Operating system: debian

Description

When using the API to merge a pull request, we have the option to specify a commit body when performing a squash merge. Gitea appends its default content for the commit message body ("co-authored by", etc.) to the string specified as MergeMessageField.

I think using this default is fine if this field is not provided at all, but I would expect the commit message to just contain the string I provided to the API, even if it is an empty string.

Alternatively, the the API could provide a flag to disable this behaviour explicitly.

soulmerge avatar Jan 04 '21 12:01 soulmerge

@soulmerge the co-authored by ... is always added doesnt mather if UI or API, if you commit for somebody else

6543 avatar Jan 04 '21 14:01 6543

I am aware of that. But I can delete that bit when using the UI. I can't delete it when merging through the API.

soulmerge avatar Jan 04 '21 15:01 soulmerge

There is a config option: ADD_CO_COMMITTER_TRAILERS

wxiaoguang avatar Jun 02 '25 06:06 wxiaoguang

We close issues that need feedback from the author if there were no new comments for a month. :tea:

GiteaBot avatar Jul 02 '25 22:07 GiteaBot