Skip to content

Commit

Permalink
Merge pull request #24 from marcduiker/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
marcduiker committed May 9, 2019
2 parents 5a1907e + 1179302 commit c95a3e2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20190203-03" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ public class GetLatestReleaseFromGitHub
RepositoryRelease repoRelease = new NullRelease(repoConfiguration.RepositoryName);
try
{
var latestRelease = await client.Repository.Release.GetLatest(
var releases = await client.Repository.Release.GetAll(
repoConfiguration.RepositoryOwner,
repoConfiguration.RepositoryName);
repoRelease = MapToRepoRelease(repoConfiguration, latestRelease);

// A repository might not use releases yet.
if (releases.Any())
{
var latestRelease = releases.OrderByDescending(r => r.PublishedAt ?? r.CreatedAt).FirstOrDefault();
if (latestRelease != null)
{
repoRelease = MapToRepoRelease(repoConfiguration, latestRelease);
}
}
}
catch (NotFoundException)
{
Expand All @@ -47,7 +56,7 @@ public class GetLatestReleaseFromGitHub
release.Id,
release.Name,
release.TagName,
release.CreatedAt,
release.PublishedAt ?? release.CreatedAt,
release.HtmlUrl,
release.Body,
repoConfiguration.HashTags);
Expand Down
6 changes: 3 additions & 3 deletions src/AzureFunctionsUpdates/AzureFunctionsUpdates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.4" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.26" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.6" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.27" />
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
<PackageReference Include="Octokit" Version="0.32.0" />
<PackageReference Include="TweetinviAPI" Version="4.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace AzureFunctionsUpdates.Models.Publications
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ bool IsWithinTimeWindow()
}
}

public const int MaximumNumberOfDaysToPostAboutNewlyFoundRelease = 2;
public const int MaximumNumberOfDaysToPostAboutNewlyFoundRelease = 3;
}
}

0 comments on commit c95a3e2

Please sign in to comment.