todays product advirories implemented

This commit is contained in:
master
2026-01-16 23:30:47 +02:00
parent 91ba600722
commit 77ff029205
174 changed files with 30173 additions and 1383 deletions

View File

@@ -24,16 +24,16 @@ public sealed class GitHubEventMapper : IScmEventMapper
_ => (ScmEventType.Unknown, (Func<JsonElement, (ScmEventType, string?, string?)>?)null)
};
if (extractor is null && scmEventType == ScmEventType.Unknown)
var repository = ExtractRepository(payload);
if (repository is null && scmEventType != ScmEventType.Unknown)
{
return null;
}
var repository = ExtractRepository(payload);
if (repository is null)
repository ??= new ScmRepository
{
return null;
}
FullName = "unknown"
};
string? commitSha = null;
string? refName = null;
@@ -196,13 +196,15 @@ public sealed class GitHubEventMapper : IScmEventMapper
return null;
}
var state = GetString(pr, "state") ?? GetString(payload, "action");
return new ScmPullRequest
{
Number = GetInt(pr, "number"),
Title = GetString(pr, "title"),
SourceBranch = GetNestedString(pr, "head", "ref"),
TargetBranch = GetNestedString(pr, "base", "ref"),
State = GetString(pr, "state"),
State = state,
Url = GetString(pr, "html_url")
};
}