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

feat: allow set default merge style while creating repo #19751

Merged
merged 3 commits into from
Jun 3, 2022

Conversation

ttys3
Copy link
Contributor

@ttys3 ttys3 commented May 19, 2022

feat: allow set default merge style while creating repo

currently, we have something like DEFAULT_BRANCH, allow to init a repo with global pre-configured value while creating a repo.
but no way to do this for PR merge style, user have to do this over and over if they want all repo created with default merge style set to squash other than default merge style.

this PR allow user to set the default value while creating repo via the ini config file, user can below to gitea app.ini:

[repository.pull-request]
DEFAULT_MERGE_STYLE = squash

or use env var GITEA__REPOSITORY__PULL_REQUEST__DEFAULT_MERGE_STYLE=squash

@lunny
Copy link
Member

lunny commented May 19, 2022

How about put it into template.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 19, 2022
@ttys3
Copy link
Contributor Author

ttys3 commented May 19, 2022

Sorry, what does it mean put it into template ?

@Gusted Gusted added this to the 1.17.0 milestone May 22, 2022
@Gusted Gusted added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label May 22, 2022
@Gusted
Copy link
Contributor

Gusted commented May 22, 2022

Sorry, what does it mean put it into template ?

I think what @lunny meant is that we might want to move this option into a template repository or into a .gitea/xx.yml file?

@lunny
Copy link
Member

lunny commented May 22, 2022

Sorry, what does it mean put it into template ?

I think what @lunny meant is that we might want to move this option into a template repository or into a .gitea/xx.yml file?

I was but now I think it's not a good idea because we need some branch protected rules to protect it.

@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 May 22, 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 Jun 2, 2022
@techknowlogick techknowlogick merged commit 0c759fd into go-gitea:main Jun 3, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 3, 2022
* giteaofficial/main:
  Allow postgres integration tests to run over unix pipe (go-gitea#19875)
  improvement some release related code (go-gitea#19867)
  feat: add DEFAULT_MERGE_STYLE to `repository.pull-request` section for repo init (go-gitea#19751)
  [skip ci] Updated translations via Crowdin
  Prevent NPE on update mirror settings (go-gitea#19864)
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/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants