From 66212fb9f0efbce76b01672158ccfb943905047e Mon Sep 17 00:00:00 2001 From: Pedro Amaral Date: Wed, 2 Mar 2022 16:55:30 +0000 Subject: [PATCH 1/2] fix: add support for --upload-batch-size parameter CY-5756 --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3122e29..645af94 100644 --- a/action.yml +++ b/action.yml @@ -43,6 +43,9 @@ inputs: upload: required: false description: "Upload analysis results to Codacy" + upload-batch-size: + required: false + description: "Size of result batches to be uploaded to Codacy" fail-if-incomplete: required: false description: "Fail the analysis if any tool fails to run" @@ -219,7 +222,7 @@ runs: - name: "Set Codacy CLI version" shell: bash - run: echo "CODACY_ANALYSIS_CLI_VERSION=7.0.5" >> $GITHUB_ENV + run: echo "CODACY_ANALYSIS_CLI_VERSION=7.5.0" >> $GITHUB_ENV - name: "Set script path environment variable" shell: bash run: echo "CLI_SCRIPT_PATH=${{ github.action_path }}/codacy-analysis-cli.sh" >> $GITHUB_ENV @@ -249,6 +252,7 @@ runs: $(if [ -n "${{ inputs.tool }}" ]; then echo "--tool ${{ inputs.tool }}"; fi) \ $(if [ -n "${{ inputs.tool-timeout }}" ]; then echo "--tool-timeout ${{ inputs.tool-timeout }}"; fi) \ $(if [ "${{ inputs.upload }}" = "true" ]; then echo "--upload"; fi) \ + $(if [ -n "${{ inputs.upload-batch-size }}" ]; then echo "--upload-batch-size ${{ inputs.upload-batch-size }}"; fi) \ $(if [ "${{ inputs.fail-if-incomplete }}" = "true" ]; then echo "--fail-if-incomplete"; fi) \ $(if [ "${{ inputs.allow-network }}" = "true" ]; then echo "--allow-network"; fi) \ $(if [ "${{ inputs.force-file-permissions }}" = "true" ]; then echo "--force-file-permissions"; fi) \ From 44a00299ccb9839df1b9076950d2d6de406f6dff Mon Sep 17 00:00:00 2001 From: Pedro Amaral Date: Fri, 4 Mar 2022 12:00:49 +0000 Subject: [PATCH 2/2] Apply suggestions from code review --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 645af94..c6ae42b 100644 --- a/action.yml +++ b/action.yml @@ -45,7 +45,7 @@ inputs: description: "Upload analysis results to Codacy" upload-batch-size: required: false - description: "Size of result batches to be uploaded to Codacy" + description: "Size (in number of results) of result batches to be uploaded to Codacy" fail-if-incomplete: required: false description: "Fail the analysis if any tool fails to run"