-
Notifications
You must be signed in to change notification settings - Fork 6
Add setting to limit number of issues posted to a pull request across multiple runs #134
Comments
Yes, in this case it will mark the first 50 as resolved and post the next 50. This is how I currently approach this scenario:
For most of the steps above there are aliases and helpers available, but there's currently no out-of-the box implementation for this. It might be possible to add this to Cake.Issues.Recipe (cake-contrib/Cake.Issues.Recipe#33), but I'm not sure how easy it is to implement this in a generic way. But if you're interested in this approach I definitely help you with code snippets. Another possibility would be to introduce a new setting which limits number of issues posted to a single pull request across multiple build runs. This should be possible, since we have marked issues posted by the addin and are already reading them back. Let me know if any of these approaches help in your use case. |
Thanks for always getting back to me so quickly. Thats really helpful. Unfortunately I don't have the spare time to work at that first time-connsuming algorithm you wrote down for me (which I've understood completely) . Maybe in the future, but I am already way past my time estimate implementing the code analysis for my company. The approach, that I had personally in mind, you actually thought about aswell: "Another possibility would be to introduce a new setting which limits number of issues posted to a single pull request across multiple build runs. This should be possible, since we have marked issues posted by the addin and are already reading them back." That seems to be a very quick (subjective statement :-)) but ok'ish way to do the "capping". I figured, you could detect the already posted comments. I know that it does have some negative aspects (e.g. new warnings could be skipped, when 100+ already existing warnings are priorized), but I could live with that for now. I would love to see that, if it doesnt take too much time. If I can help you somehow, please let me know. |
I really don't want to rush/annoy you and its not that urgent. I might be able to check out the code myself and spend some of my free time and try to get a switch implemented for that feature. |
I started working on it yesterday and hope to finish it by the end of this weekend (probably sooner). While all basic parts are already there, there's some logic involved which needs to be done correctly and I want to get this right with proper test coverage. If you are interested to give it a try yourself I can show you what needs to be changed. |
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
@janniksam If you want to test you can checkout the changes from #138 and build the addin locally. I can also later provide a beta version for testing once the PRs are merged. It adds a new setting Behavior is like this. Assuming you have the following issues:
And the following settings:
The following will happen:
|
Looks pretty good 👍 Good job. Will test it tomorrow or maybe on monday. BTW: I wonder, what happens on the first run. Which provider will win? Is it random (one provider will output 20 and one 10 issues) or is it distributed equally between both providers (each provider will output 15 issues)? |
Issues are filtered by priority (higher priorities are kept) and issues with a file path are prioritized over issues without a file path. Beside that it is undetermined. |
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
…a pull request across multiple runs
Hey Pascal. Did you create a beta (or even final) release for this feature? I would be interested in that. 👍 |
Not yet, but can create a beta version later today |
(GH-134) Add setting to limit number of issues posted to a pull request across multiple runs
@janniksam I've released 0.8.1-beta0001 containing this feature |
Lets imagine, in theory, my pullrequest is fixing somehing in a old legacy class and 200 warnings pop up during code analyse of my PR build. Most of aren't results from by my changes. MaxIssuesToPost is set to 50 warnings, so 50 warnings will be output to the Pull Request..
Now I'll fix all the 50 warnings in my next commit to the PR. The build will be rerun and reanalyse everything. Will it output the next 50 warnings or does it detect that it already detect the 50 submitted warnings?
It already gave me 50, and I wouldn't want to fix another 50, when it comes to legacy code. We're aiming for small but steady steps to a zero warning policy. (currently we're at 14000 ;-))
The text was updated successfully, but these errors were encountered: