Skip to content

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Feb 12, 2022

Fixes #18710

@jpraet
Copy link
Member Author

jpraet commented Feb 12, 2022

How can I make AllowRebaseUpdate=true the default for existing repositories?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 12, 2022
@wxiaoguang
Copy link
Contributor

Maybe DisableXxx? 😂

@jpraet
Copy link
Member Author

jpraet commented Feb 13, 2022

Maybe DisableXxx? 😂

Yes that would work 😆.
But I would like to avoid it for consistency with the other PullRequestsConfig options that are also named AllowXxx.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 13, 2022

In the code, AllowRebaseUpdate is *bool, so if it is nil, set it to true?

@lunny
Copy link
Member

lunny commented Feb 13, 2022

How can I make AllowRebaseUpdate=true the default for existing repositories?

It's not easy.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 13, 2022

https://stackoverflow.com/questions/30445479/how-to-specify-default-values-when-parsing-json-in-go

It seems that the default value can be set in FromDB, before json.Unmarshal

Screenshot 2022-02-13 at 22 49 41

@jpraet jpraet changed the title WIP: Add config option to disable "Update branch by rebase" Add config option to disable "Update branch by rebase" Feb 13, 2022
@jpraet jpraet marked this pull request as ready for review February 13, 2022 16:38
@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 Feb 16, 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 Feb 16, 2022
@zeripath zeripath added the type/enhancement An improvement of existing functionality label Feb 16, 2022
@zeripath zeripath added this to the 1.17.0 milestone Feb 16, 2022
@techknowlogick techknowlogick merged commit 5184c83 into go-gitea:main Mar 4, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 6, 2022
* giteaofficial/main:
  Fix EasyMDE error when input Enter (go-gitea#19004)
  Fix update hint bug (go-gitea#18996)
  Fix the editor height in review box (go-gitea#19003)
  Add a "admin user generate-access-token" subcommand (go-gitea#17722)
  Fix potential assignee query for repo (go-gitea#18994)
  Add config option to disable "Update branch by rebase" (go-gitea#18745)
  Update `go-enry` to v2.8.0 (go-gitea#18993)
  homebrew updates via cron
  ignore missing comment for user notifications (go-gitea#18954)
  allow overwrite artifacts for github releases (go-gitea#18987)
  fix & refactor (go-gitea#18973)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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.

Option to disable update branch by rebase
7 participants