Skip to content

Commit

Permalink
Only scan Octokit.Webhooks for [WebhookActionType] (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
martincostello committed Apr 13, 2022
1 parent 67d6930 commit 9703522
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Octokit.Webhooks/Converter/WebhookConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public class WebhookConverter<T> : JsonConverter<T>
public WebhookConverter()
{
var type = typeof(T);
this.types = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(x => x.GetTypes())
this.types = this.GetType().Assembly.GetTypes()
.Where(x => type.IsAssignableFrom(x) && x.IsClass && !x.IsAbstract &&
Attribute.GetCustomAttribute(x, typeof(WebhookActionTypeAttribute)) is not null)
.ToDictionary(
Expand Down

0 comments on commit 9703522

Please sign in to comment.