add 'select/deselect all' buttons for custom events in webhooks#35980
Open
TimurRin wants to merge 2 commits intogo-gitea:mainfrom
Open
add 'select/deselect all' buttons for custom events in webhooks#35980TimurRin wants to merge 2 commits intogo-gitea:mainfrom
TimurRin wants to merge 2 commits intogo-gitea:mainfrom
Conversation
silverwind
reviewed
Dec 5, 2025
| all.forEach(i => { i.checked = false; }); | ||
| }); | ||
| })(); | ||
| </script> |
Member
There was a problem hiding this comment.
- We need to move this code to
web_src/js/features/repo-settings.ts. We avoid inline scripts because they are problematic with CSP and also the linter does not lint them. - Use
for-ofloops instead offorEach, but the linter will also tell you that 😉.
Author
There was a problem hiding this comment.
Isn't it better to place this code to web_src/js/features/comp/WebHookEditor.ts? There is already 'custom events' switch logic presented and webhooks are not bound to repos.
Member
There was a problem hiding this comment.
Yes, that looks like a even better place.
silverwind
reviewed
Dec 5, 2025
| {{ctx.Locale.Tr "repo.settings.event_button_deselect_all"}} | ||
| </button> | ||
| </div> | ||
| </div> |
Member
There was a problem hiding this comment.
Please move it to line 97. It's more logical for it to be after the "Repository Events" header.
Member
|
Definitely a useful feature, thanks. |
Member
|
Maybe those buttons could even be moved to the right side of the header to save even more space, pseudo code: <div class="tw-flex tw-justify-between tw-gap-2">
<h2>Repository-Events</h2>
<div>...buttons</div>
</div> |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds
Select AllandDeselect Allbuttons to the 'Custom events' section of the webhook view.This is useful when you need select all events but one.