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

Support default private when creating or migrating repository #3239

Merged
merged 4 commits into from
Dec 20, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented Dec 20, 2017

Will resolve #3235

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Dec 20, 2017
@lunny lunny added this to the 1.4.0 milestone Dec 20, 2017
@codecov-io
Copy link

codecov-io commented Dec 20, 2017

Codecov Report

Merging #3239 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3239      +/-   ##
==========================================
- Coverage   34.97%   34.96%   -0.01%     
==========================================
  Files         277      277              
  Lines       40004    40014      +10     
==========================================
+ Hits        13990    13991       +1     
- Misses      23977    23985       +8     
- Partials     2037     2038       +1
Impacted Files Coverage Δ
modules/setting/setting.go 46.93% <ø> (ø) ⬆️
routers/repo/repo.go 22.45% <50%> (+0.63%) ⬆️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
models/repo.go 43.58% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e67b405...58b6778. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 20, 2017
case setting.RepoCreatingPrivate:
return true
}
return false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add explicit case for RepoCreatingPublic, and add a default case in case setting.Repository.DefaultPrivate is something unexpected (maybe we will add more cases in the future)?

@@ -16,6 +16,8 @@ SCRIPT_TYPE = bash
ANSI_CHARSET =
; Force every new repository to be private
FORCE_PRIVATE = false
; Default private when create a new repository, 0: last user repo visiblity, 1: private, 2: public
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use named constants ("last", "private", "public") e.g. like we do for RUN_MODE?

@lunny
Copy link
Member Author

lunny commented Dec 20, 2017

@ethantkoenig done.

@lafriks
Copy link
Member

lafriks commented Dec 20, 2017

LGTM

@tboerger tboerger 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 Dec 20, 2017
@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger 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 Dec 20, 2017
@lafriks
Copy link
Member

lafriks commented Dec 20, 2017

@lunny please fmt format

@lunny lunny merged commit 5294821 into go-gitea:master Dec 20, 2017
@lunny lunny deleted the lunny/default_repo_private branch December 20, 2017 13:00
@strk
Copy link
Member

strk commented Dec 20, 2017

Thank you @lunny !

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
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.

Feature request: option to default to private repository
6 participants