Skip to content
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

Add force-commit-sha input #83

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions action.yml
Expand Up @@ -21,6 +21,9 @@ inputs:
force-coverage-parser:
description: 'Optionally force using a specific coverage report parser'
required: false
force-commit-sha:
description: 'Optionally force commit associated to the coverage data'
required: false
coverage-reporter-version:
description: 'Optionally force using a specific coverage reporter version'
required: false
Expand Down Expand Up @@ -62,6 +65,7 @@ runs:
if [ -n "${{ inputs.project-token }}" ]; then auth="--project-token ${{ inputs.project-token }}"; fi
if [ -n "${{ inputs.force-coverage-parser }}" ]; then force_parser="--force-coverage-parser ${{ inputs.force-coverage-parser }}"; else force_parser=""; fi
if [ -n "${{ inputs.language }}" ]; then lang="--language ${{ inputs.language }}"; else lang=""; fi
if [ -n "${{ inputs.force-commit-sha }}" ]; then force_commit="--commit-uuid ${{ inputs.force-commit-sha }}"; else force_commit=""; fi

bash <(curl -Ls https://coverage.codacy.com/get.sh) report $lang $force_parser $auth $params --partial &&\
bash <(curl -Ls https://coverage.codacy.com/get.sh) final $auth
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $lang $force_parser $force_commit $auth $params --partial &&\
bash <(curl -Ls https://coverage.codacy.com/get.sh) final $force_commit $auth