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 feature flags to the config for Wiki and Issues #7032

Open
wants to merge 8 commits into
base: master
from

Conversation

7 participants
@jpicht
Copy link
Contributor

commented May 24, 2019

This pull request aims to close #3336, implementing ENABLE_WIKI and ENABLE_ISSUES config options (defaulting to true).

It would probably be good if somebody, who really knows how the Issue system works, had a close look over what I did and if there are some places that I missed (maybe pull-request related).

Currently there are two unrelated commits in this branch, that I needed to make the Makefile work for me. I can remove them, if they pose a problem.

@jpicht

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

The next step for me would be (in another pull request) to try and make pull requests work with issues disabled.

@lunny

This comment has been minimized.

Copy link
Member

commented May 24, 2019

I think just change defaultRepoUnits according configs and change the repository settings UI is OK. Or maybe team add/edit page.

@jpicht

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

I think just change defaultRepoUnits according configs and change the repository settings UI is OK. Or maybe team add/edit page.

I thought about that, but I was unsure if the config file is parsed early enough. I do not really know enough about the initialization sequence. When some code path uses defaultRepoUnits before the config is read, it could have weird consequences.

I can change the patch set to do exactly what you said, if that's the better solution.

@lunny lunny added the kind/feature label Jun 9, 2019

@charlesmorin

This comment has been minimized.

Copy link

commented Jul 8, 2019

Do we have any ETA for this feature to be pulled into the master branch? Working in a large organization where Confluence and JIRA are used, such flag would be very helpful. Thanks!

Show resolved Hide resolved Makefile Outdated
Show resolved Hide resolved routers/api/v1/api.go Outdated
Show resolved Hide resolved routers/repo/issue_label_test.go Outdated

jpicht added some commits May 23, 2019

Implement ENABLE_WIKI config option
Signed-off-by: Julian Picht <julian.picht@gmail.com>
Implement ENABLE_ISSUES config option
Signed-off-by: Julian Picht <julian.picht@gmail.com>
Clean up the repo settings page, if both issues and wiki are disabled
Signed-off-by: Julian Picht <julian.picht@gmail.com>
remove unneccessary changes
Signed-off-by: Julian Picht <julian.picht@gmail.com>

@jpicht jpicht force-pushed the jpicht:issue_3336 branch from 4dbfebd to 11bebf7 Jul 11, 2019

set EnableIssues = true for TestUpdateIssueLabel_Clear
Signed-off-by: Julian Picht <julian.picht@gmail.com>
@codecov-io

This comment has been minimized.

Copy link

commented Jul 11, 2019

Codecov Report

Merging #7032 into master will decrease coverage by <.01%.
The diff coverage is 45.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7032      +/-   ##
==========================================
- Coverage   41.23%   41.22%   -0.01%     
==========================================
  Files         469      469              
  Lines       63620    63634      +14     
==========================================
  Hits        26232    26232              
- Misses      33965    33979      +14     
  Partials     3423     3423
Impacted Files Coverage Δ
routers/repo/setting.go 9.29% <0%> (ø) ⬆️
routers/repo/wiki.go 40.5% <0%> (-0.38%) ⬇️
routers/user/home.go 53.28% <0%> (ø) ⬆️
modules/setting/service.go 80.76% <100%> (+1.6%) ⬆️
routers/api/v1/api.go 71.36% <100%> (ø) ⬆️
routers/routes/routes.go 82.4% <100%> (ø) ⬆️
routers/repo/activity.go 40.35% <100%> (ø) ⬆️
models/repo.go 47.9% <20%> (-0.63%) ⬇️
routers/repo/issue.go 35.34% <60%> (+0.05%) ⬆️
models/repo_issue.go 73.68% <0%> (-10.53%) ⬇️
... and 6 more

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 e0d6d2f...bdb05ba. Read the comment docs.

jpicht added some commits Jul 19, 2019

Revert "set EnableIssues = true for TestUpdateIssueLabel_Clear"
This reverts commit e2eb475.

Signed-off-by: Julian Picht <julian.picht@gmail.com>
Actually set default values for Service.EnableWiki and Service.Enable…
…Issues

Signed-off-by: Julian Picht <julian.picht@gmail.com>
@jpicht

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2019

Now the docker test fails because of unrelated issues. :(

Can that be re-run or do I need to push an empty commit to the branch?

go: strk.kbt.io/projects/go/libravatar@v0.0.0-20160628055650-5eed7bff870a: git fetch -f https://strk.kbt.io/git/go-libravatar.git refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/20b35e8f598eb07a4d3d0fb9a878597498193f8a12440138d148579fe7ea90eb: exit status 128:
--
418 | fatal: unable to access 'https://strk.kbt.io/git/go-libravatar.git/': The requested URL returned error: 500
@lafriks

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

Currently this will totally break options page to enable/disable pull requests if both issue and wiki are disabled, no?

IMHO this PR can not be merged if it leaves broken state that no PR can be used in Gitea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.