The Wayback Machine - https://web.archive.org/web/20220806102933/https://github.com/go-gitea/gitea/pull/18745
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

Add config option to disable "Update branch by rebase" #18745

Merged
merged 13 commits into from Mar 4, 2022

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Feb 12, 2022

Fixes #18710

@jpraet
Copy link
Member Author

@jpraet jpraet commented Feb 12, 2022

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

@wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Feb 13, 2022

Maybe DisableXxx? 😂

@jpraet
Copy link
Member Author

@jpraet 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 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 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 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 Feb 13, 2022
lunny
lunny approved these changes 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
2 checks passed
zjjhot added a commit to zjjhot/gitea that referenced this issue 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)
@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.
Development

Successfully merging this pull request may close these issues.

7 participants