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.
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
Prune hook_task table #11416
Prune hook_task table #11416
Changes from 43 commits
e1c9664
ee83fe7
c4502dc
739dfe7
2cdecc1
dd5a870
dfb2505
1e800f5
2ae404b
c016b7c
eea3a74
1a56206
66c0d8b
fde6937
dd0f4a1
bc14884
8a66680
125dc99
d1db4f2
fd13812
a28df99
4651030
aec78da
38f6d30
2170896
537c913
b6c09c5
ce8d93a
3c45159
28c73de
a803bf2
2c76c5f
4a83485
9b2b546
a4caeca
83925c2
5decea3
9a09960
6f9af14
49ea492
deaac3e
1709bc9
7ebc11c
157fd96
dacb03b
d1642ac
63551dd
0341fc6
cffae2e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
can you insert 2 and limit to 1
and check if only the right one has been deleted?
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.
sure, I added a test where I created a new webhook that was delievered "now" and then called the delete method where 1 is kept...and then verified that the newly created webhook is still present.
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.
do we real have to set it on repo creation?
instead of use global default until user change it?
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 guess I was implementing the way "CloseIssuesViaCommitInAnyBranch" is done...but I think you are suggesting that the columns added to repository would be null by default, and would only have values if the user overrides the settings?
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.
yes
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.
This may fail on sqlite. I think use a
Find
but notIterate
is better.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'm not sure I totally understand, can you elaborate? I saw Iterate usage other places like for example (if I'm understanding):
https://github.com/go-gitea/gitea/blob/master/modules/repository/check.go#L25
https://github.com/go-gitea/gitea/blob/master/modules/repository/hooks.go#L159
But I'm happy to refactor it if it is a problem.
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.
When did some database operations on an iterate maybe affect a lock on sqlite. If other places also have the problems, they also needs to be changed.