Skip to content

Cleanup the output from the gitea internal hooks #23389

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

Closed
wants to merge 1 commit into from

Conversation

adlternative
Copy link

@adlternative adlternative commented Mar 9, 2023

Some gitea hook output "Processing 2 references" is a little noisy, so let's cleanup them.

v1.
Remove all hook output logic.

v2.
Just turn off VerbosePush setting to suppress output.

Want to fix #23364

@yardenshoham yardenshoham added this to the 1.20.0 milestone Mar 9, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #23389 (6e1c5bc) into main (8cadd51) will decrease coverage by 0.01%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main   #23389      +/-   ##
==========================================
- Coverage   47.61%   47.61%   -0.01%     
==========================================
  Files        1147     1147              
  Lines      151225   151185      -40     
==========================================
- Hits        72002    71982      -20     
+ Misses      70709    70694      -15     
+ Partials     8514     8509       -5     
Impacted Files Coverage Δ
cmd/hook.go 7.64% <ø> (+0.55%) ⬆️
modules/git/error.go 28.57% <0.00%> (-24.29%) ⬇️
modules/util/io.go 73.68% <0.00%> (-5.27%) ⬇️
models/activities/repo_activity.go 61.50% <0.00%> (-4.61%) ⬇️
modules/charset/charset.go 71.73% <0.00%> (-3.63%) ⬇️
modules/git/repo.go 64.44% <0.00%> (-3.56%) ⬇️
modules/queue/queue_channel.go 84.26% <0.00%> (-1.13%) ⬇️
services/pull/pull.go 42.22% <0.00%> (-0.32%) ⬇️
models/issues/review.go 52.73% <0.00%> (+0.56%) ⬆️
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 9, 2023
cmd/hook.go Outdated
@@ -207,18 +197,6 @@ Gitea or set your environment appropriately.`, "")
total := 0
lastline := 0

var out io.Writer
out = &nilWriter{}
if setting.Git.VerbosePush {
Copy link
Member

Choose a reason for hiding this comment

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

you can set the setting as false.

Copy link
Author

Choose a reason for hiding this comment

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

you can set the setting as false.

You mean that we should turn off the this setting & keep all the output here?
Or turn off the this setting & cleanup these output at the same time?

Copy link
Member

Choose a reason for hiding this comment

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

I mean, maybe this PR is unnecessary. You can disable that output via setting [git]\nVERBOSE_PUSH=false?

Copy link
Author

Choose a reason for hiding this comment

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

OK, I will close this PR.

Signed-off-by: ZheNing Hu <adlternative@gmail.com>
@techknowlogick techknowlogick removed this from the 1.20.0 milestone Mar 10, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup the output from the gitea internal hook(s).
6 participants