todays product advirories implemented
This commit is contained in:
@@ -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")
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user