Skip to content

Commit 6c04665

Browse files
authored
Update api check logic (#2191)
* Update api check logic“ * Fix API folder change detection logic * Improve API folder change detection in workflow * Update API check step names in workflow
1 parent 6ecd65d commit 6c04665

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

.github/workflows/apichecks.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,36 @@ jobs:
4747
with:
4848
name: export-api-log
4949
path: ./export-api.log
50-
- name: Check for API Changes
51-
id: api-check
50+
- name: Diff API Changes
51+
id: api-check-diff
5252
run: |
5353
git status
5454
git diff --exit-code api/
5555
shell: bash
5656
continue-on-error: true
57-
# Add check-label step after api-check
57+
- name: API changed
58+
if: steps.api-check-diff.outcome == 'failure'
59+
run: |
60+
echo "API changes detected."
61+
echo "Please run powershell -ExecutionPolicy Bypass -File .\eng\Export-API.ps1 to update the API files"
62+
exit 1
63+
shell: bash
64+
- name: Check if 'api/' folder has changes
65+
id: api-check
66+
run: |
67+
changed_files=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }})
68+
69+
echo "Files changed in this PR:"
70+
echo "$changed_files"
71+
72+
if echo "$changed_files" | grep -q '^api/'; then
73+
echo "Changes detected in the 'api/' folder. Marking the step as failure."
74+
exit 1
75+
else
76+
echo "No changes in the 'api/' folder."
77+
fi
78+
shell: bash
79+
continue-on-error: true
5880
- name: Check for special label
5981
id: check_label
6082
if: steps.api-check.outcome == 'failure' && contains(github.event.pull_request.labels.*.name, 'api-breaking-change-signoff') # Run only if the api-check step failed

api/Microsoft.Azure.SignalR.AspNet.net462.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ public partial class ServiceOptions
1818
public ServiceOptions() { }
1919
public Microsoft.Azure.SignalR.AccessTokenAlgorithm AccessTokenAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
2020
public System.TimeSpan AccessTokenLifetime { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
21-
public System.Func<Microsoft.Owin.IOwinContext, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>> ClaimsProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
21+
public System.Func<Microsoft.Owin.IOwinContext, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>>? ClaimsProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
22+
public System.Action<System.Net.WebSockets.ClientWebSocketOptions>? ConfigureServiceConnectionWebSocketOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
2223
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
2324
[System.ObsoleteAttribute("Please use InitialHubServerConnectionCount instead.")]
2425
public int ConnectionCount { get { throw null; } set { } }
25-
public string ConnectionString { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
26-
public System.Func<Microsoft.Owin.IOwinContext, bool> DiagnosticClientFilter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
26+
public string? ConnectionString { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
27+
public System.Func<Microsoft.Owin.IOwinContext, bool>? DiagnosticClientFilter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
2728
public Microsoft.Azure.SignalR.ServiceEndpoint[] Endpoints { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
2829
public int InitialHubServerConnectionCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
2930
public int? MaxHubServerConnectionCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
3031
public int? MaxPollIntervalInSeconds { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
31-
public System.Net.IWebProxy Proxy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
32+
public System.Net.IWebProxy? Proxy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
3233
public Microsoft.Azure.SignalR.ServerStickyMode ServerStickyMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
3334
}
3435
}

0 commit comments

Comments
 (0)