more features checks. setup improvements
This commit is contained in:
@@ -25,10 +25,18 @@ public sealed class GitHubEventMapper : IScmEventMapper
|
||||
_ => (ScmEventType.Unknown, (Func<JsonElement, (ScmEventType, string?, string?)>?)null)
|
||||
};
|
||||
|
||||
// Unsupported event types return null
|
||||
// Unsupported event types still return a normalized event with Unknown type
|
||||
if (extractor is null)
|
||||
{
|
||||
return null;
|
||||
return new NormalizedScmEvent
|
||||
{
|
||||
EventId = deliveryId,
|
||||
Provider = ScmProvider.GitHub,
|
||||
EventType = ScmEventType.Unknown,
|
||||
Timestamp = ExtractTimestamp(payload),
|
||||
Repository = ExtractRepository(payload) ?? new ScmRepository { FullName = "unknown" },
|
||||
Actor = ExtractActor(payload)
|
||||
};
|
||||
}
|
||||
|
||||
var repository = ExtractRepository(payload);
|
||||
|
||||
Reference in New Issue
Block a user