From fd8a2d467f735c5d83e0fda7ec1a3c14e3b06f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Friedrich=20Gro=C3=9Fe?= Date: Mon, 18 Mar 2024 22:34:15 +0100 Subject: [PATCH] Some more tweaking of input and variable naming --- README.md | 4 ++-- action.yml | 8 ++++---- scripts/github-action.sh | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 089eb69..4b96174 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ inputs: default: "v1.0.0" sha256sum: - description: 'Expected SHA256 checksum of the tarball when downloading the go-coverage-report binary.' + description: 'Optional SHA256 checksum of the tarball when downloading the go-coverage-report binary.' required: false coverage-artifact-name: @@ -128,7 +128,7 @@ inputs: required: true default: "coverage.txt" - repo-import-path: + root-package: description: | The Go import path of the tested repository to add as a prefix to all paths of the changed files. This is useful to map the changed files (e.g., ["foo/my_file.go"] diff --git a/action.yml b/action.yml index 570a7ff..afcaf80 100644 --- a/action.yml +++ b/action.yml @@ -7,12 +7,12 @@ branding: inputs: version: - description: 'The exact version of the go-coverage-report tool to use.' + description: 'The exact version tag of the go-coverage-report tool to use.' required: true default: "v1.0.0" sha256sum: - description: 'Expected SHA256 checksum of the tarball when downloading the go-coverage-report binary.' + description: 'Optional SHA256 checksum of the tarball when downloading the go-coverage-report binary.' required: false coverage-artifact-name: @@ -25,7 +25,7 @@ inputs: required: true default: "coverage.txt" - repo-import-path: + root-package: description: | The Go import path of the tested repository to add as a prefix to all paths of the changed files. This is useful to map the changed files (e.g., ["foo/my_file.go"] @@ -74,5 +74,5 @@ runs: CHANGED_FILES_PATH: .github/outputs/all_changed_files.json COVERAGE_ARTIFACT_NAME: ${{ inputs.coverage-artifact-name }} COVERAGE_FILE_NAME: ${{ inputs.coverage-file-name }} - REPOSITORY_IMPORT_PATH: ${{ inputs.repo-import-path }} + ROOT_PACKAGE: ${{ inputs.root-package }} TRIM_PACKAGE: ${{ inputs.trim }} diff --git a/scripts/github-action.sh b/scripts/github-action.sh index 6f2d503..7230850 100755 --- a/scripts/github-action.sh +++ b/scripts/github-action.sh @@ -29,7 +29,7 @@ You can use the following environment variables to configure the script: - COVERAGE_ARTIFACT_NAME: The name of the artifact containing the code coverage results (default: code-coverage) - COVERAGE_FILE_NAME: The name of the file containing the code coverage results (default: coverage.txt) - CHANGED_FILES_PATH: The path to the file containing the list of changed files (default: .github/outputs/all_changed_files.json) -- REPOSITORY_IMPORT_PATH: The import path of the tested repository to add as a prefix to all paths of the changed files (optional) +- ROOT_PACKAGE: The import path of the tested repository to add as a prefix to all paths of the changed files (optional) - TRIM_PACKAGE: Trim a prefix in the \"Impacted Packages\" column of the markdown report (optional) " @@ -96,7 +96,7 @@ end_group start_group "Compare code coverage results" go-coverage-report \ - -root="$REPOSITORY_IMPORT_PATH" \ + -root="$ROOT_PACKAGE" \ -trim="$TRIM_PACKAGE" \ "$OLD_COVERAGE_PATH" \ "$NEW_COVERAGE_PATH" \