Skip to content

Commit

Permalink
Adding ratings capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Jan 26, 2024
1 parent aa7f8af commit 264e710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/GitHubActionsVSPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke

await this.RegisterCommandsAsync();

// Setup ratings prompt
ExtensionOptions options = await ExtensionOptions.GetLiveInstanceAsync();
RatingPrompt prompt = new("TimHeuer.GitHubActionsVS", Vsix.Name, options);
prompt.RegisterSuccessfulUsage();

this.RegisterToolWindows();
}

Expand Down
5 changes: 4 additions & 1 deletion src/Options/ExtensionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal partial class OptionsProvider
public class ExtensionOptionsOptions : BaseOptionPage<ExtensionOptions> { }
}

public class ExtensionOptions : BaseOptionModel<ExtensionOptions>
public class ExtensionOptions : BaseOptionModel<ExtensionOptions>, IRatingConfig
{
[Category("Query Settings")]
[DisplayName("Max Runs")]
Expand All @@ -29,4 +29,7 @@ public class ExtensionOptions : BaseOptionModel<ExtensionOptions>
[Description("The interval (in seconds) to poll/refresh when pending/active jobs are going")]
[DefaultValue(5)]
public int RefreshInterval { get; set; } = 5;

[Browsable(false)]
public int RatingRequests { get; set; }
}

0 comments on commit 264e710

Please sign in to comment.