-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
routers/repo/repo.go
Outdated
case setting.RepoCreatingPrivate: | ||
return true | ||
} | ||
return false |
There was a problem hiding this comment.
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)?
custom/conf/app.ini.sample
Outdated
@@ -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 |
There was a problem hiding this comment.
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
?
4d025f5
to
018b52e
Compare
@ethantkoenig done. |
LGTM |
LGTM |
@lunny please fmt format |
28c336f
to
58b6778
Compare
Thank you @lunny ! |
Will resolve #3235