Skip to content

Commit 5b6bff1

Browse files
Fix PR checks (dotnet#1965)
Allow PR builds to flow
1 parent 8eb6567 commit 5b6bff1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Infrastructure/src/TriageBuildFailures/Commands/Triage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private async Task<IEnumerable<ICIBuild>> GetUntriagedBuildFailures()
143143

144144
private bool IsWatchedBuild(ICIBuild build)
145145
{
146-
if (_watchedBranches.Any(b => build.Branch.StartsWith(b, StringComparison.OrdinalIgnoreCase)))
146+
if (_watchedBranches.Any(b => build.Branch.StartsWith(b, StringComparison.OrdinalIgnoreCase)) || build.Branch.StartsWith("refs/pull", StringComparison.OrdinalIgnoreCase))
147147
{
148148
return true;
149149
}

Infrastructure/src/TriageBuildFailures/GitHub/PullRequestClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public Task<string> GetBuildLogAsync(ICIBuild build)
3030
public async Task<IEnumerable<ICIBuild>> GetFailedBuildsAsync(DateTime startDate)
3131
{
3232
var prs = await _gitHubClient.GetPullRequests("aspnet", "AspNetCore");
33-
33+
prs = prs.Where(pr => pr.UpdatedAt >= startDate);
3434
var builds = new List<VSTSBuild>();
3535
foreach (var pr in prs)
3636
{
@@ -67,7 +67,7 @@ public Task<IEnumerable<ICITestOccurrence>> GetTestsAsync(ICIBuild build, BuildS
6767
public async Task SetTagAsync(ICIBuild build, string tag)
6868
{
6969
var vstsBuild = (VSTSBuild)build;
70-
if(vstsBuild.PRSource != null && string.Equals(tag, Triage.TriagedTag))
70+
if (vstsBuild.PRSource != null && string.Equals(tag, Triage.TriagedTag))
7171
{
7272
var comment = "I've triaged the above build.";
7373
await _gitHubClient.CreateComment(vstsBuild.PRSource, comment);

0 commit comments

Comments
 (0)