-
-
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
Disable unnecessary GitHooks elements #18485
Conversation
This mod fixes disabling unnecessary GitHooks elements. Related: go-gitea#13129 Author-Change-Id: IB#1115251
Fixes: 6801919 Author-Change-Id: IB#1115251
Placing hidden as CSS class only greys out this option; we want to hide it. According to https://stackoverflow.com/questions/1992114/how-do-you-create-a-hidden-div-that-doesnt-create-a-line-break-or-horizontal-sp/27548863#27548863 using hidden as attribute is ok and works ok in gitea. Fixes: 6437b04 Author-Change-Id: IB#1115251
Fixes: 6801919 Related: go-gitea#18485 (review) Author-Change-Id: IB#1115251
I do not like these changes. All they do is hide a button in UI while adding additional complexity for no significant gain. In addition they introduce hidden behavior to [cron.resync_all_hooks]
ENABLED = true Where above will be ignored if I also see no good reason to either hide the button or disable this task - it takes no user input and I fear that this will introduce additional issues where potential update to hooks in newer version will not be propagated to users that applied your new configuration (the task is disabled during any potential migration too or during runtime on startup). While you will no doubt argument that this is something that should be done manually I see no reason why it must be done so and I also find your reasoning flawed and outdated given current practices of spinning up ephemeral instances in swarms. |
services/cron/tasks_extended.go
Outdated
@@ -160,7 +160,9 @@ func initExtendedTasks() { | |||
registerGarbageCollectRepositories() | |||
registerRewriteAllPublicKeys() | |||
registerRewriteAllPrincipalKeys() | |||
registerRepositoryUpdateHook() | |||
if !setting.DisableGitHooks { |
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.
No, I don't think this is right. DisableGitHooks
should be DisableExtraGitHooks
. We need to update Gitea internal git hooks.
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.
Gitea supports internal git hooks and extra git hooks editable from UI. The first is a MUST, the second could be disabled. I think the name DisableGitHooks
make something confusing.
Agree to make the system more clear and more consistent. |
Fixes: 6801919 Related: go-gitea#18485 (review) Author-Change-Id: IB#1115251
Cleaner app UI is significant gain for this app.
Fixed 97a5d84. |
I don't particularly agree on this point. You can use custom themes if you really want to hide some UI element and as it stands out, after 97a5d84 this PR does not even prevent user from issuing request, it just hides a button for absolutely no gain other than hiding it. |
This PR currently hides unnecessary git hooks changing permission checkbox in user configuration. |
is it still blocked ? |
Looks good at the moment, the PR basically hides |
The comment is pretty good and more clear. I agree with keeping showing the Although my preference is to make UI consistent instead of showing/hiding tiny elements dynamically (and personally I would vote for merging the new comments, reverting the HTML element hiding), either is fine to me. |
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.
since it's default is disabled - I'm also for hiding
* giteaofficial/main: (21 commits) Prevent intermittent race in attribute reader close (go-gitea#19537) Make repository file list useable on mobile (go-gitea#19515) Update image URL for Discord webhook (go-gitea#19536) [skip ci] Updated translations via Crowdin Fix 64-bit atomic operations on 32-bit machines (go-gitea#19531) Fix `upgrade.sh` script error with `su -c` (go-gitea#19483) When view _Siderbar or _Footer, just display once (go-gitea#19501) Fix migrate release from github (go-gitea#19510) Prevent dangling archiver goroutine (go-gitea#19516) Don't let repo clone URL overflow (go-gitea#19517) Add commit status popup to issuelist (go-gitea#19375) Disable unnecessary GitHooks elements (go-gitea#18485) Disable unnecessary GitHooks elements Improve dashboard's repo list performance (go-gitea#18963) By default force vertical tabs on mobile (go-gitea#19486) Refactor readme file renderer (go-gitea#19502) Allow package dump skipping (go-gitea#19506) Unset git author/committer variables when running integration tests (go-gitea#19512) Allow commit status popup on /pulls page (go-gitea#19507) Use router param for filepath in GetRawFile (go-gitea#19499) ...
* Disable unnecessary GitHooks elements This mod fixes disabling unnecessary GitHooks elements. Related: go-gitea#13129 Author-Change-Id: IB#1115251
This mod fixes disabling unnecessary GitHooks elements.
Related: #13129
Author-Change-Id: IB#1115251