Skip to content

Add logic to Auto-Signoff open-api-specs with trivial changes#38744

Merged
AkhilaIlla merged 59 commits intomainfrom
ailla/auto_signoff_trivial_changes
Jan 26, 2026
Merged

Add logic to Auto-Signoff open-api-specs with trivial changes#38744
AkhilaIlla merged 59 commits intomainfrom
ailla/auto_signoff_trivial_changes

Conversation

@AkhilaIlla
Copy link
Contributor

@AkhilaIlla AkhilaIlla commented Nov 12, 2025

This is a WIP PR that implements automatic detection of trivial changes (documentation, examples, non-functional JSON)
to enable auto sign-off and reduce manual review overhead for low-risk changes.

What Changed

New Features

  • Trivial Changes Detection: Auto-identifies documentation, examples, and non-functional JSON changes
  • Enhanced Auto Sign-Off: Expands eligibility beyond TypeSpec incremental changes
  • Smart JSON Analysis: Distinguishes functional vs non-functional property changes

Files Modified

  • New: .github/workflows/src/trivial-changes-check.js - Core detection logic
  • New: .github/workflows/test/trivial-changes-check.test.js - Test suite
  • Renamed: arm-incremental-typespec.yamlarm-auto-signoff-analysis.yaml
  • Updated: arm-auto-signoff.js - New label types and human-label protection
  • Updated: arm-auto-signoff.yaml - Enhanced workflow orchestration

Trivial Changes Detected

  1. Documentation (.md files) → ARMAutoSignedOff-Trivial
  2. Examples (/examples/*.json) → ARMAutoSignedOff-Trivial
  3. Non-functional JSON (descriptions, titles, client annotations) → ARMAutoSignedOff-Trivial
  4. TypeSpec Incremental (existing functionality) → ARMAutoSignedOff-IncrementalTSP

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named Protected Files has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

Copy link
Member

@mikeharder mikeharder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@mikeharder
Copy link
Member

mikeharder commented Dec 9, 2025

This PR is getting difficult to review, since it combines file moves/renames with code changes. I will create another PR will just the moves/renames, we can merge first, to make it easier to see the actual code changes in your PR. #Resolved

mikeharder added a commit that referenced this pull request Dec 9, 2025
Copy link
Member

@mikeharder mikeharder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see new comments

@AkhilaIlla AkhilaIlla merged commit 0130554 into main Jan 26, 2026
44 of 46 checks passed
@AkhilaIlla AkhilaIlla deleted the ailla/auto_signoff_trivial_changes branch January 26, 2026 17:36
xiong-qiao pushed a commit that referenced this pull request Jan 28, 2026
* Add logic to auto-signoff open-api-specs with trivial changes

* Updates based on comments, Refactor trivial check

* Fix references with file move

* Fix invalid chars in upload artifact step

* Fix tests

* Address comments, Add more tests

* whitespace

* minor changes based on comments

* rename step

* Revert workflow title

* Revert workflow title

* revert step title

* Refcatoring based on comments

* fix missing token error

* resolve merge conflict

* Delete documentation/trivial-changes-auto-signoff.md

* remove unhelpful comment

* revert names

* whitespace

* ARM auto-signoff: trivial changes + managed label actions

* formatting

* yaml: "if" before "name"

* Refactor dryrun mode and just add trivial-test label, Update PRChanges output to include RM specific fields vs other

* Refactor, updates based on PR comments

* Refactor pr-changes from struct to class, update the use cases, tests

* Refactor naming, Fix lint errors

* Fix prettier errors

* Fix prettier errors, Refactor trivial changes, minor updates

* Fix prettier failures

* Update log statements, Fix auto sign off label list

* Update trivial changes logic to evaluate functional changes

* Remove updated timeouts in test

* Updates made to address feedback

* Fix prettier issue

* fix space

* fix prettier issue

---------

Co-authored-by: akhilailla <akhilailla@microsoft.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>
return {
incremental: incrementalTypeSpecResult,
trivial: isTrivial,
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @AkhilaIlla , @mikeharder , @raosuhas, could the incremental TypeSpec detection be extended to support PRs that only modify .tsp files?

Currently, arm-incremental-typespec.js maps changed files to spec directories using only swagger(), example() and readme() filters, so .tsp-only PRs always result in an empty changedSpecDirs and return false. This means TypeSpec-only changes to an existing TypeSpec RP can't receive ARMAutoSignedOff-IncrementalTSP and must wait for manual ARM review.

Adding .tsp files (via the existing typespec() filter) to the changedSpecDirs computation would address this, and the existing base-branch check (verifying TypeSpec-generated swagger already exists) would still guard against false positives.

This would significantly reduce review wait times for teams working in TypeSpec. We recently migrated from raw swagger to TypeSpec, and we're working on refactoring the tsp files to resolve some FIXMEs left by the auto conversion tool. These updates will not alter the generated swagger, ensuring we don't introduce any unintended changes. For instance, this is PR #40221, along with the current outcome from 'Checking for incremental TypeSpec changes'.

2026-02-09T02:57:36.268Z simple-git [GitExecutor] [SPAWN] git [ 'diff', '--name-status', 'HEAD^', 'HEAD' ]
Could not map changed files to any spec directories
Incremental TypeSpec result: false

Created an issue #40384 to track this and thanks for considering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants