Skip to content
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

Add IMuteIssuesService #5068

Merged

Conversation

ugras-ergun-sonarsource
Copy link
Contributor

Fixes #5059

@ugras-ergun-sonarsource ugras-ergun-sonarsource marked this pull request as ready for review November 29, 2023 16:05
@ugras-ergun-sonarsource ugras-ergun-sonarsource linked an issue Nov 29, 2023 that may be closed by this pull request
Copy link
Contributor

Choose a reason for hiding this comment

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

2 potentially important changes

[PartCreationPolicy(CreationPolicy.Shared)]
internal class MuteIssuesService : IMuteIssuesService
{
private readonly IConfigurationProvider configurationProvider;

Choose a reason for hiding this comment

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

I did the same mistake in one of my PRs, but only realized it just now - I think we shouldn't use configuration provider directly, but instead use the cached configuration from IActiveSolutionBoundTracker for performance reasons


public async Task Mute(string issueKey, CancellationToken token)
{
if (!configurationProvider.GetConfiguration().Mode.IsInAConnectedMode())

Choose a reason for hiding this comment

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

I suggest adding throwifnotonbackgroundthread or an explicit switch to it

Choose a reason for hiding this comment

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

Edit: Just throwing if on UI thread should be enough

Copy link

sonarqubecloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ugras-ergun-sonarsource ugras-ergun-sonarsource merged commit 8274e54 into feature/mute-server-issues Dec 1, 2023
7 checks passed
@ugras-ergun-sonarsource ugras-ergun-sonarsource deleted the ue/muteissueservice branch December 1, 2023 10:59
ugras-ergun-sonarsource added a commit that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IMuteIssuesService
2 participants