-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add logic to Auto-Signoff open-api-specs with trivial changes #38744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AkhillaIlla (AkhilaIlla)
merged 59 commits into
main
from
ailla/auto_signoff_trivial_changes
Jan 26, 2026
Merged
Changes from 6 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
e9dc816
Add logic to auto-signoff open-api-specs with trivial changes
b9618b0
Updates based on comments, Refactor trivial check
71db523
Merge origin/main
be72bbb
Fix references with file move
056a31b
Fix invalid chars in upload artifact step
177dab9
Fix tests
422cd6a
Address comments, Add more tests
495559e
whitespace
mikeharder cf58b5d
Merge with main, Resolve conflicts
1a584be
Resolve merge conflict
189eaa8
minor changes based on comments
99b3e9c
rename step
mikeharder b55614c
Revert workflow title
mikeharder 0cd5fdd
Revert workflow title
mikeharder 6f96b9a
revert step title
mikeharder dfc2e2b
Refcatoring based on comments
d3f0d6a
Pull remote
40ae297
Merge branch 'main' into ailla/auto_signoff_trivial_changes
mikeharder 7a97f5d
fix missing token error
46dbf3d
Merge branch 'ailla/auto_signoff_trivial_changes' of https://github.c…
ac95780
Merge branch 'main' into ailla/auto_signoff_trivial_changes
mikeharder 9e903c0
Merge branch 'ailla/auto_signoff_trivial_changes' of https://github.c…
072d824
resolve merge conflict
mikeharder c653cde
Delete documentation/trivial-changes-auto-signoff.md
mikeharder ace0e72
Merge branch 'ailla/auto_signoff_trivial_changes' of https://github.c…
8370e9e
Merge branch 'main' into ailla/auto_signoff_trivial_changes
mikeharder 9c07141
remove unhelpful comment
mikeharder 55e2999
revert names
mikeharder 8562b2a
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
839b12e
whitespace
mikeharder f1daaf8
ARM auto-signoff: trivial changes + managed label actions
6e7211a
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
52c85df
formatting
mikeharder 9c77e73
yaml: "if" before "name"
mikeharder 1146025
Refactor dryrun mode and just add trivial-test label, Update PRChange…
ef4eea1
Pull remote changes
710184e
Refactor, updates based on PR comments
0028fc2
Merge branch 'main' into ailla/auto_signoff_trivial_changes
mikeharder 55ac6a5
Refactor pr-changes from struct to class, update the use cases, tests
d24335b
Merge branch 'ailla/auto_signoff_trivial_changes' of https://github.c…
827dffd
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
8b5b83a
Refactor naming, Fix lint errors
bef163e
Fix prettier errors
57cca4b
Fix prettier errors, Refactor trivial changes, minor updates
afa86d0
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
c9a2907
Fix prettier failures
902d29d
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
1816f7b
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
d8d3b38
Update log statements, Fix auto sign off label list
539cc10
Update trivial changes logic to evaluate functional changes
c5e62f8
Remove updated timeouts in test
f1bb347
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
41e4df1
Updates made to address feedback
e349a36
Fix prettier issue
8219f65
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
cccd378
fix space
b46058a
fix prettier issue
4977cd3
Merge branch 'main' into ailla/auto_signoff_trivial_changes
AkhilaIlla f940d86
Merge branch 'main' into ailla/auto_signoff_trivial_changes
AkhilaIlla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| /** | ||
| * Represents the types of changes present in a pull request. | ||
| * | ||
| * All properties are boolean flags that indicate presence of a change type. | ||
| * An empty PR would have all properties set to false. | ||
| * | ||
| * @typedef {Object} PullRequestChanges | ||
| * @property {boolean} documentation - True if PR contains documentation (.md) file changes | ||
| * @property {boolean} examples - True if PR contains example file changes (/examples/*.json) | ||
| * @property {boolean} functional - True if PR contains functional spec changes (API-impacting) | ||
| * @property {boolean} nonFunctional - True if PR contains non-functional spec changes (metadata only) | ||
|
AkhilaIlla marked this conversation as resolved.
Outdated
|
||
| * @property {boolean} other - True if PR contains other file types (config, scripts, etc.) | ||
| */ | ||
|
|
||
| /** | ||
| * Creates a PullRequestChanges object with all flags set to false | ||
| * @returns {PullRequestChanges} | ||
| */ | ||
| export function createEmptyPullRequestChanges() { | ||
| return { | ||
| documentation: false, | ||
| examples: false, | ||
| functional: false, | ||
| nonFunctional: false, | ||
| other: false, | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Checks if a PR qualifies as trivial based on its changes | ||
| * A PR is trivial if it contains only: | ||
| * - Documentation changes | ||
| * - Example changes | ||
| * - Non-functional spec changes | ||
| * And does NOT contain: | ||
| * - Functional spec changes | ||
| * - Other file types | ||
| * | ||
| * @param {PullRequestChanges} changes - The PR changes object | ||
| * @returns {boolean} - True if PR is trivial | ||
| */ | ||
| export function isTrivialPullRequest(changes) { | ||
| // Trivial if no functional changes and no other files | ||
| // Must have at least one of: documentation, examples, or nonFunctional | ||
| const hasNoBlockingChanges = !changes.functional && !changes.other; | ||
| const hasTrivialChanges = changes.documentation || changes.examples || changes.nonFunctional; | ||
|
|
||
| return hasNoBlockingChanges && hasTrivialChanges; | ||
| } | ||
|
|
||
| /** | ||
| * Checks if a PR contains only documentation changes | ||
| * @param {PullRequestChanges} changes - The PR changes object | ||
| * @returns {boolean} - True if only documentation changed | ||
| */ | ||
| export function isDocumentationOnly(changes) { | ||
| return changes.documentation && | ||
| !changes.examples && | ||
| !changes.functional && | ||
| !changes.nonFunctional && | ||
| !changes.other; | ||
| } | ||
|
|
||
| /** | ||
| * Checks if a PR contains only example changes | ||
| * @param {PullRequestChanges} changes - The PR changes object | ||
| * @returns {boolean} - True if only examples changed | ||
| */ | ||
| export function isExamplesOnly(changes) { | ||
| return !changes.documentation && | ||
| changes.examples && | ||
| !changes.functional && | ||
| !changes.nonFunctional && | ||
| !changes.other; | ||
| } | ||
|
|
||
| /** | ||
| * Checks if a PR contains only non-functional spec changes (with optional docs/examples) | ||
| * @param {PullRequestChanges} changes - The PR changes object | ||
| * @returns {boolean} - True if only non-functional changes (+ optional docs/examples) | ||
| */ | ||
| export function isNonFunctionalOnly(changes) { | ||
| return changes.nonFunctional && | ||
| !changes.functional && | ||
| !changes.other; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
mikeharder marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.