-
-
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
refactor webhook *EditPost #20780
refactor webhook *EditPost #20780
Conversation
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.
Certainly looks far cleaner from what I can see.
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.
I think there's more that can be done here with a register block.
But this is still a good improvement.
make L-G-T-M work |
Ping lg-tm bot |
* giteaofficial/main: Display total blob size of a package version. (go-gitea#20927) Display all files. (go-gitea#20917) Enhance package date display (go-gitea#20928) [skip ci] Updated translations via Crowdin Forbid HTML string tooltips (go-gitea#20935) Set no-tags in git fetch on compare (go-gitea#20893) Update comparison.en-us.md: link subgroups issue (go-gitea#20905) Enable contenthash in filename for dynamic assets (go-gitea#20813) refactor webhook *EditPost (go-gitea#20780)
Following #20729 this PR aims at reducing duplicated code in the
*HooksEditPost
functions.I also moved the functions around, so that webhook types are grouped together, which makes it easier to read.
For instance the matrix endpoints is now simply (notice that
fmt.Sprintf
is not duplicated anymore!):