Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md #18177

Merged
merged 28 commits into from
May 8, 2022

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 4, 2022

Fix #11089

@lunny lunny added the type/enhancement An improvement of existing functionality label Jan 4, 2022
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Show resolved Hide resolved
modules/git/commit.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 4, 2022
@lunny lunny added this to the 1.16.0 milestone Jan 7, 2022
@lunny lunny force-pushed the lunny/custom_default_merge_message branch from b7a60d9 to 62a2607 Compare January 15, 2022 05:07
@redstonedesigner
Copy link
Contributor

Just my two cents here:

Would it not be better to move these to a .gitea/merge_message subfolder? This allows for less clutter in the main .gitea subdirectory and also allows for a common prefix to become a subfolder thereby making the system more usable.

Again, I'm not qualified to make this decision, I'm just taking inspiration from how GitHub handles their files (.github/workflows/*.yml instead of .github/workflow_*.yml and .github/issue_template/*.yml instead of .github/issue_template_*.yml)

@lunny
Copy link
Member Author

lunny commented Feb 10, 2022

Just my two cents here:

Would it not be better to move these to a .gitea/merge_message subfolder? This allows for less clutter in the main .gitea subdirectory and also allows for a common prefix to become a subfolder thereby making the system more usable.

Again, I'm not qualified to make this decision, I'm just taking inspiration from how GitHub handles their files (.github/workflows/*.yml instead of .github/workflow_*.yml and .github/issue_template/*.yml instead of .github/issue_template_*.yml)

resolved.

services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
@lunny lunny force-pushed the lunny/custom_default_merge_message branch from 3b067b5 to 555a85d Compare February 16, 2022 06:02
@lunny lunny changed the title Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md Feb 16, 2022
@sprnza
Copy link

sprnza commented Mar 13, 2022

LGTM please!

services/pull/merge.go Outdated Show resolved Hide resolved
@lunny lunny force-pushed the lunny/custom_default_merge_message branch from c37b9e1 to f8e4e42 Compare March 13, 2022 16:09
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 20, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 20, 2022
modules/git/commit.go Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
services/pull/merge.go Outdated Show resolved Hide resolved
@lunny lunny force-pushed the lunny/custom_default_merge_message branch from 7fc48f9 to 85d7d02 Compare May 8, 2022 03:50
@lunny
Copy link
Member Author

lunny commented May 8, 2022

make L-G-T-M work.

@lunny lunny merged commit 4344a64 into go-gitea:main May 8, 2022
@lunny lunny deleted the lunny/custom_default_merge_message branch May 8, 2022 12:32
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 8, 2022
* giteaofficial/main:
  Delete related PullAutoMerge and ReviewState on User/Repo Deletion (go-gitea#19649)
  Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (go-gitea#18177)
  Allow to mark files in a PR as viewed (go-gitea#19007)
  Auto merge pull requests when all checks succeeded via API (go-gitea#9307)
  Hide private repositories in packages (go-gitea#19584)
  Only show accessible teams in dashboard dropdown list (go-gitea#19642)
  prevent double click new issue/pull/comment button (go-gitea#16157)
  Improve reviewing PR UX (go-gitea#19612)
  [skip ci] Updated translations via Crowdin
  Add Changelog v1.16.7 (go-gitea#19575) (go-gitea#19644)
  Set safe dir for git operations in .drone.yml CI (go-gitea#19641)
  Add missing `sorting` column in `project_issue` table (go-gitea#19635)
zeripath pushed a commit that referenced this pull request May 8, 2022
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
…<merge_style>_TEMPLATE.md (go-gitea#18177)

* Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md

* Some improvements

* Follow some advices

* Fix bug

* Fix bug

* Fix lint

* Fix close comment

* Fix test

* Fix and docs

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* Fix test

* improve code

* ignore unknow unit type

* return error for GetDefaultMergeMessage

* Update services/pull/merge.go

* Some improvements

* Follow some advices

* Fix bug

* Fix lint

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* improve code

* Handle deleted HeadRepo in GetDefaultMergeMessage

Signed-off-by: Andrew Thornton <[email protected]>

* Fix test

* Fix test

Co-authored-by: zeripath <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suggest allow custom default merge message template
10 participants