Azure / Azure/azure-rest-api-specs

[Swagger PrettierCheck] Passes silently if "git diff" command fails

Open
#33,102 0 comments 0 reactions 1 assignee Claimed by @mikeharder View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

Check passes silently if "git diff" command fails:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=4632068&view=logs&j=011e1ec8-6569-5e69-4f06-baf193d1351e&t=0f4aa080-c997-58ca-481c-4930865ae0f8&l=12

I suspect the root cause is in our shared helper:

https://github.com/Azure/azure-rest-api-specs/blob/2c55edd612e91979735ba08b8736767f4a59028f/eng/scripts/ChangedFiles-Functions.ps1#L12

The best fix is probably to migrate SwaggerPrettierCheck to a github-script action that calls our JS-based git helper. It's only 50 lines of code:

https://github.com/Azure/azure-rest-api-specs/blob/main/eng/scripts/Swagger-Prettier-Check.ps1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.