Request: Disable certain merge strategies in pull requests #5721

Closed
opened 2025-11-02 06:34:00 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @lumio on GitHub (Jul 10, 2020).

  • Gitea version (or commit ref): 1.13.0+dev-242-g0b1bb9644 built with GNU Make 4.3, go1.14.4 : bindata, sqlite, sqlite_unlock_notify (latest docker container)
  • Git version: 2.26.2
  • Operating system: (latest docker container)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

It is great to be able to chose the merge strategy for a pull request, similar like GitHub.
However, it would be great to be able to disable certain merge strategies all together. We enforce commit signatures and allowing a PR to be squashed would also more or less remove those signatures, leaving one single commit with the default key.

I thought of new options for [repository.pull-request] like the following:

  • DISABLE_STRATEGY_REBASE
  • DISABLE_STRATEGY_REBASE_NO_FF
  • DISABLE_STRATEGY_SQUASH
  • DISABLE_STRATEGY_RECURSIVE (default merge strategy - could be left out in my opinion)
Originally created by @lumio on GitHub (Jul 10, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.13.0+dev-242-g0b1bb9644 built with GNU Make 4.3, go1.14.4 : bindata, sqlite, sqlite_unlock_notify (latest docker container) - Git version: 2.26.2 - Operating system: (latest docker container) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description It is great to be able to chose the merge strategy for a pull request, similar like GitHub. However, it would be great to be able to disable certain merge strategies all together. We enforce commit signatures and allowing a PR to be squashed would also more or less remove those signatures, leaving one single commit with the default key. I thought of new options for `[repository.pull-request]` like the following: - `DISABLE_STRATEGY_REBASE` - `DISABLE_STRATEGY_REBASE_NO_FF` - `DISABLE_STRATEGY_SQUASH` - `DISABLE_STRATEGY_RECURSIVE` (default merge strategy - could be left out in my opinion)
Author
Owner

@jolheiser commented on GitHub (Jul 10, 2020):

This is already available through repository settings.

@jolheiser commented on GitHub (Jul 10, 2020): This is already available through repository settings.
Author
Owner

@lumio commented on GitHub (Jul 11, 2020):

Ah I was looking on the wrong section. I thought I would find it in the Branch section. Thank you

@lumio commented on GitHub (Jul 11, 2020): Ah I was looking on the wrong section. I thought I would find it in the `Branch` section. Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5721