From 753b984fd594d711dd815c6f6c1a3c630854b555 Mon Sep 17 00:00:00 2001 From: Yuta Euchi <63095160+eucyt@users.noreply.github.com> Date: Wed, 25 Dec 2024 14:53:05 +0900 Subject: [PATCH] Show filenames of diff from auto-generated files in CI (#727) There is a test in the CI that checks for differences between the automatically generated files from OpenAPI. However, if this test fails, it doesn't indicate which files have differences. I will modify the CI to output this information. --- .github/workflows/generated-code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/generated-code.yml b/.github/workflows/generated-code.yml index 4640d8a1..ced6c1c8 100644 --- a/.github/workflows/generated-code.yml +++ b/.github/workflows/generated-code.yml @@ -33,6 +33,8 @@ jobs: - if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }} run: | echo "There are changes in the generated codes. Please run 'generate-code.py' and commit the changes." >&2 + echo "The files with differences are as follows." >&2 + echo "$(git --no-pager diff --name-only HEAD)" >&2 exit 1 ## Run if diff exists and event is not pull request, and make PR - if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}