Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Add possibility to limit posted issues for a specific provider #158

Conversation

janniksam
Copy link
Contributor

@janniksam janniksam commented Jul 17, 2020

What has changed:

This pullrequest introduces a new property ProviderType to the IPullRequestDiscussionThread interface.
The ProviderType is being used to restrict each providers issues by either a maximum limit across all runs or a limit for each individual run.

The report settings interface IReportIssuesToPullRequestSettings has retrieved a new property ProviderIssueLimits, which can be used to set the limits for each individual provider type. It is implemented with a dictionary which has the key = the providertype to which the limits should be applied. The dictionary value is a new interface IProviderIssueLimits, which holds the properties MaxIssuesToPost and MaxIssuesToPostAcrossRuns to configure the limits.

I have made the already existing MaxIssuesToPostForEachIssueProvider obselete, because it basically did the same but you were not able to configure different issues for each provider. The functionality is still working like it was implemented and could be removed in a future release.

closes #142 and #141

What's next:

We need to fill IPullRequestDiscussionThread.ProviderType @ Cake.Issues.PullRequests.AzureDevOps (see this issue: cake-contrib/Cake.Issues.PullRequests.AzureDevOps#182)

@pascalberger pascalberger force-pushed the feature/maxIssuesToPostAcrossRunsForEachProvider branch from 254f5c0 to b9c7d16 Compare July 17, 2020 21:31
@pascalberger
Copy link
Member

I have made the already existing MaxIssuesToPostForEachIssueProvider obselete, because it basically did the same but you were not able to configure different issues for each provider. The functionality is still working like it was implemented and could be removed in a future release.

I removed the obsolete from MaxIssuesToPostForEachIssueProvider since the new functionality is not 100% equivalent. While the new functionality provides a way to define a limit for specific issue providers, the old provides a way to have a limit for every issue provider. If we want to make it obsolete we should provide a way to set a limit which applies to every issue provider (e.g. by using a defined value for key) and then also replace implementation internally to use the new code.

@pascalberger pascalberger force-pushed the feature/maxIssuesToPostAcrossRunsForEachProvider branch from b9c7d16 to 977ddf6 Compare July 18, 2020 07:54
@pascalberger pascalberger changed the title Feature/max issues to post across runs for each provider Add possibility to limit posted issues for a specific provider Jul 18, 2020
@pascalberger pascalberger merged commit caa3eba into cake-contrib:release/0.9.0 Jul 18, 2020
@pascalberger
Copy link
Member

@janniksam your changes have been merged, thanks for your contribution 👍

I'll create a 0.9.0-beta.2 release containing your changes which can be used for further implementation and testing in concrete pull request implementations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants