-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Changes from all commits
e9dc816
b9618b0
71db523
be72bbb
056a31b
177dab9
422cd6a
495559e
cf58b5d
1a584be
189eaa8
99b3e9c
b55614c
0cd5fdd
6f96b9a
dfc2e2b
d3f0d6a
40ae297
7a97f5d
46dbf3d
ac95780
9e903c0
072d824
c653cde
ace0e72
8370e9e
9c07141
55e2999
8562b2a
839b12e
f1daaf8
6e7211a
52c85df
9c77e73
1146025
ef4eea1
710184e
0028fc2
55ac6a5
d24335b
827dffd
8b5b83a
bef163e
57cca4b
afa86d0
c9a2907
902d29d
1816f7b
d8d3b38
539cc10
c5e62f8
f1bb347
41e4df1
e349a36
8219f65
cccd378
b46058a
4977cd3
f940d86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { incrementalTypeSpec } from "./arm-incremental-typespec.js"; | ||
| import { checkTrivialChanges } from "./trivial-changes-check.js"; | ||
|
|
||
| /** @typedef {import("./pr-changes.js").PullRequestChanges} PullRequestChanges */ | ||
|
|
||
| /** | ||
| * Main entry point for ARM Auto Signoff Code workflow. | ||
| * | ||
| * This module orchestrates all checks to determine if a PR qualifies for auto sign-off. | ||
| * It combines results from: | ||
| * - Incremental TypeSpec check | ||
| * - Trivial changes check | ||
| * | ||
| * @param {import("@actions/github-script").AsyncFunctionArguments} args | ||
| * @returns {Promise<{ incremental: boolean, trivial: boolean }>} | ||
| */ | ||
| export default async function armAutoSignoffCode({ core }) { | ||
| core.info("Starting ARM Auto Signoff Code analysis."); | ||
|
|
||
| // Run incremental TypeSpec check | ||
| core.startGroup("Checking for incremental TypeSpec changes"); | ||
| const incrementalTypeSpecResult = await incrementalTypeSpec(core); | ||
| core.info(`Incremental TypeSpec result: ${incrementalTypeSpecResult}`); | ||
| core.endGroup(); | ||
|
|
||
| // Run trivial changes check | ||
| core.startGroup("Checking for trivial changes"); | ||
| const trivialChangesResult = await checkTrivialChanges(core); | ||
| core.endGroup(); | ||
|
|
||
| const isTrivial = trivialChangesResult.isTrivial(); | ||
|
|
||
| // Combine results | ||
| const combined = { | ||
| incrementalTypeSpec: incrementalTypeSpecResult, | ||
| trivialChanges: trivialChangesResult, | ||
| }; | ||
|
|
||
| core.info(`Combined result: ${JSON.stringify(combined, null, 2)}`); | ||
|
|
||
| // Return a JSON object for downstream workflow logic. | ||
| return { | ||
| incremental: incrementalTypeSpecResult, | ||
| trivial: isTrivial, | ||
| }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Adding .tsp files (via the existing 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'.
Created an issue #40384 to track this and thanks for considering! |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * ARM auto-signoff label names. | ||
| * @readonly | ||
| * @enum {string} | ||
| */ | ||
| export const ArmAutoSignoffLabel = Object.freeze({ | ||
| ArmSignedOff: "ARMSignedOff", | ||
| ArmAutoSignedOff: "ARMAutoSignedOff", | ||
| ArmAutoSignedOffIncrementalTSP: "ARMAutoSignedOff-IncrementalTSP", | ||
| ArmAutoSignedOffTrivialTest: "ARMAutoSignedOff-Trivial-Test", | ||
| }); |
Uh oh!
There was an error while loading. Please reload this page.