Skip to content

Commit bc0969f

Browse files
authored
Adding workflow to automatically compare public API surface against previous release (#513)
* Adding workflow to automatically compare public API surface against previous release * Update search path in generate-api-diffs.sh and generate-api-diffs.cmd * update package source mapping * update package source mapping * update package source mapping * Set execution permission on the generate-api-diffs.sh * Remove scripts and put them in GH action
1 parent c8b96cd commit bc0969f

File tree

40 files changed

+1494
-0
lines changed

40 files changed

+1494
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Generate API Diffs
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 16 * * *' # 8am PST (16:00 UTC)
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
generate-and-pr:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: |
21+
8.0.x
22+
9.0.x
23+
24+
- name: Restore and build
25+
run: |
26+
27+
find src -type f -name "*.csproj" | while read -r csproj; do
28+
dotnet build "$csproj" -f net8.0 --configuration Release --no-incremental -t:Build -t:GenAPIGenerateReferenceAssemblySource
29+
done
30+
continue-on-error: true
31+
32+
- name: Create or update pull request
33+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
branch: update-api-diffs
37+
base: main
38+
title: "[Automated] Update API Surface Area"
39+
body: "Auto-generated update to the API surface to compare current surface vs latest release. This should only be merged once this surface area ships in a new release."

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
<ItemGroup Label="Build Dependencies">
5656
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
57+
<PackageVersion Include="Microsoft.DotNet.GenAPI.Task" Version="9.0.103-servicing.25065.25" />
5758
</ItemGroup>
5859

5960
<ItemGroup Label="Integration Packages">

nuget.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<clear />
66
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
77
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
8+
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
89
<!-- <add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" /> -->
910
</packageSources>
1011
<packageSourceMapping>
@@ -16,6 +17,9 @@
1617
<packageSource key="dotnet-eng">
1718
<package pattern="Microsoft.DotNet.XUnitExtensions" />
1819
</packageSource>
20+
<packageSource key="dotnet9-transport">
21+
<package pattern="Microsoft.DotNet.GenAPI.Task" />
22+
</packageSource>
1923
<packageSource key="nuget">
2024
<package pattern="*" />
2125
</packageSource>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace CommunityToolkit.Aspire.EventStore
10+
{
11+
public sealed partial class EventStoreSettings
12+
{
13+
public string? ConnectionString { get { throw null; } set { } }
14+
15+
public bool DisableHealthChecks { get { throw null; } set { } }
16+
17+
public bool DisableTracing { get { throw null; } set { } }
18+
19+
public System.TimeSpan? HealthCheckTimeout { get { throw null; } set { } }
20+
}
21+
}
22+
23+
namespace Microsoft.Extensions.Hosting
24+
{
25+
public static partial class AspireEventStoreExtensions
26+
{
27+
public static void AddEventStoreClient(this IHostApplicationBuilder builder, string connectionName, System.Action<CommunityToolkit.Aspire.EventStore.EventStoreSettings>? configureSettings = null) { }
28+
29+
public static void AddKeyedEventStoreClient(this IHostApplicationBuilder builder, string name, System.Action<CommunityToolkit.Aspire.EventStore.EventStoreSettings>? configureSettings = null) { }
30+
}
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace CommunityToolkit.Aspire.GoFeatureFlag
10+
{
11+
public sealed partial class GoFeatureFlagClientSettings
12+
{
13+
public bool DisableHealthChecks { get { throw null; } set { } }
14+
15+
public System.Uri? Endpoint { get { throw null; } set { } }
16+
17+
public int? HealthCheckTimeout { get { throw null; } set { } }
18+
19+
public OpenFeature.Contrib.Providers.GOFeatureFlag.GoFeatureFlagProviderOptions ProviderOptions { get { throw null; } set { } }
20+
}
21+
}
22+
23+
namespace Microsoft.Extensions.Hosting
24+
{
25+
public static partial class AspireGoFeatureFlagExtensions
26+
{
27+
public static void AddGoFeatureFlagClient(this IHostApplicationBuilder builder, string connectionName, System.Action<CommunityToolkit.Aspire.GoFeatureFlag.GoFeatureFlagClientSettings>? configureSettings = null) { }
28+
29+
public static void AddKeyedGoFeatureFlagClient(this IHostApplicationBuilder builder, string name, System.Action<CommunityToolkit.Aspire.GoFeatureFlag.GoFeatureFlagClientSettings>? configureSettings = null) { }
30+
}
31+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace Aspire.Hosting
10+
{
11+
public static partial class ActiveMQBuilderExtensions
12+
{
13+
public static ApplicationModel.IResourceBuilder<ApplicationModel.ActiveMQServerResource> AddActiveMQ(this IDistributedApplicationBuilder builder, string name, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? userName = null, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? password = null, int? port = null, string scheme = "tcp", int? webPort = null) { throw null; }
14+
15+
public static ApplicationModel.IResourceBuilder<ApplicationModel.ActiveMQArtemisServerResource> AddActiveMQArtemis(this IDistributedApplicationBuilder builder, string name, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? userName = null, ApplicationModel.IResourceBuilder<ApplicationModel.ParameterResource>? password = null, int? port = null, string scheme = "tcp", int? webPort = null) { throw null; }
16+
17+
public static ApplicationModel.IResourceBuilder<T> WithConfBindMount<T>(this ApplicationModel.IResourceBuilder<T> builder, string source, bool isReadOnly = false)
18+
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }
19+
20+
public static ApplicationModel.IResourceBuilder<T> WithConfVolume<T>(this ApplicationModel.IResourceBuilder<T> builder, string? name = null, bool isReadOnly = false)
21+
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }
22+
23+
public static ApplicationModel.IResourceBuilder<T> WithDataBindMount<T>(this ApplicationModel.IResourceBuilder<T> builder, string source, bool isReadOnly = false)
24+
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }
25+
26+
public static ApplicationModel.IResourceBuilder<T> WithDataVolume<T>(this ApplicationModel.IResourceBuilder<T> builder, string? name = null, bool isReadOnly = false)
27+
where T : ApplicationModel.ActiveMQServerResourceBase { throw null; }
28+
}
29+
}
30+
31+
namespace Aspire.Hosting.ApplicationModel
32+
{
33+
public partial class ActiveMQArtemisServerResource : ActiveMQServerResourceBase
34+
{
35+
public ActiveMQArtemisServerResource(string name, ParameterResource? userName, ParameterResource password, string scheme) : base(default!, default, default!, default!, default!) { }
36+
}
37+
38+
public partial class ActiveMQServerResource : ActiveMQServerResourceBase
39+
{
40+
public ActiveMQServerResource(string name, ParameterResource? userName, ParameterResource password, string scheme) : base(default!, default, default!, default!, default!) { }
41+
}
42+
43+
public abstract partial class ActiveMQServerResourceBase : ContainerResource, IResourceWithConnectionString, IResource, IManifestExpressionProvider, IValueProvider, IValueWithReferences, IResourceWithEnvironment
44+
{
45+
protected ActiveMQServerResourceBase(string name, ParameterResource? userName, ParameterResource password, string scheme, CommunityToolkit.Aspire.Hosting.ActiveMQ.IActiveMQSettings settings) : base(default!, default) { }
46+
47+
public CommunityToolkit.Aspire.Hosting.ActiveMQ.IActiveMQSettings ActiveMqSettings { get { throw null; } }
48+
49+
public ReferenceExpression ConnectionStringExpression { get { throw null; } }
50+
51+
public ParameterResource PasswordParameter { get { throw null; } }
52+
53+
public EndpointReference PrimaryEndpoint { get { throw null; } }
54+
55+
public ParameterResource? UserNameParameter { get { throw null; } }
56+
}
57+
}
58+
59+
namespace CommunityToolkit.Aspire.Hosting.ActiveMQ
60+
{
61+
public partial interface IActiveMQSettings
62+
{
63+
string ConfPath { get; }
64+
65+
string DataPath { get; }
66+
67+
string EnvironmentVariablePassword { get; }
68+
69+
string EnvironmentVariableUsername { get; }
70+
71+
string Image { get; }
72+
73+
string JolokiaPath { get; }
74+
75+
string Registry { get; }
76+
77+
string Tag { get; }
78+
}
79+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace Aspire.Hosting
10+
{
11+
public static partial class DataApiBuilderHostingExtension
12+
{
13+
public static ApplicationModel.IResourceBuilder<ApplicationModel.DataApiBuilderContainerResource> AddDataAPIBuilder(this IDistributedApplicationBuilder builder, string name, int? httpPort = null, params string[] configFilePaths) { throw null; }
14+
15+
public static ApplicationModel.IResourceBuilder<ApplicationModel.DataApiBuilderContainerResource> AddDataAPIBuilder(this IDistributedApplicationBuilder builder, string name, params string[] configFilePaths) { throw null; }
16+
}
17+
}
18+
19+
namespace Aspire.Hosting.ApplicationModel
20+
{
21+
public partial class DataApiBuilderContainerResource : ContainerResource, IResourceWithServiceDiscovery, IResourceWithEndpoints, IResource
22+
{
23+
public DataApiBuilderContainerResource(string name, string? entrypoint = null) : base(default!, default) { }
24+
}
25+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace Aspire.Hosting
10+
{
11+
public static partial class SwaAppHostingExtension
12+
{
13+
public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> AddSwaEmulator(this IDistributedApplicationBuilder builder, string name, SwaResourceOptions options) { throw null; }
14+
15+
public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> AddSwaEmulator(this IDistributedApplicationBuilder builder, string name) { throw null; }
16+
17+
public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> WithApiResource(this ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> builder, ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithEndpoints> apiResource) { throw null; }
18+
19+
public static ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> WithAppResource(this ApplicationModel.IResourceBuilder<ApplicationModel.SwaResource> builder, ApplicationModel.IResourceBuilder<ApplicationModel.IResourceWithEndpoints> appResource) { throw null; }
20+
}
21+
22+
public partial class SwaResourceOptions
23+
{
24+
public int DevServerTimeout { get { throw null; } set { } }
25+
26+
public int Port { get { throw null; } set { } }
27+
}
28+
}
29+
30+
namespace Aspire.Hosting.ApplicationModel
31+
{
32+
public partial class SwaApiEndpointAnnotation : IResourceAnnotation
33+
{
34+
public SwaApiEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) { }
35+
36+
public string Endpoint { get { throw null; } }
37+
}
38+
39+
public partial class SwaAppEndpointAnnotation : IResourceAnnotation
40+
{
41+
public SwaAppEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) { }
42+
43+
public string Endpoint { get { throw null; } }
44+
}
45+
46+
public partial class SwaResource : ExecutableResource
47+
{
48+
public SwaResource(string name, string workingDirectory) : base(default!, default!, default!) { }
49+
}
50+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
namespace Aspire.Hosting
10+
{
11+
public static partial class BunAppExtensions
12+
{
13+
public static ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> AddBunApp(this IDistributedApplicationBuilder builder, string name, string? workingDirectory = null, string entryPoint = "index.ts", bool watch = false) { throw null; }
14+
15+
public static ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> WithBunPackageInstallation(this ApplicationModel.IResourceBuilder<ApplicationModel.BunAppResource> resource) { throw null; }
16+
}
17+
}
18+
19+
namespace Aspire.Hosting.ApplicationModel
20+
{
21+
public partial class BunAppResource : ExecutableResource
22+
{
23+
public BunAppResource(string name, string workingDirectory) : base(default!, default!, default!) { }
24+
}
25+
}

0 commit comments

Comments
 (0)