diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 213d1d0..ac74918 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -274,7 +274,6 @@ jobs: store: true store-url: 'http://0.0.0.0:8001/Default' - store-run-name: 'test-run' - name: "Do the second analysis that finds a new result" uses: ./ id: codechecker-diff @@ -285,7 +284,6 @@ jobs: diff: true diff-url: 'http://0.0.0.0:8001/Default' - diff-run-name: 'test-run' - uses: actions/upload-artifact@v2 if: ${{ steps.codechecker-diff.outputs.warnings-in-diff == 'true' }} with: diff --git a/README.md b/README.md index 225273b..d4a30d7 100644 --- a/README.md +++ b/README.md @@ -282,13 +282,13 @@ runs: 🔓 Checking the analysis results against the contents of a server requires the `PRODUCT_VIEW` permission, if the server is requiring authentication. -| Variable | Default | Description | -|-----------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `diff` | `false` | If set to `true`, the job will compute a diff of the current analysis results against the results stored on a remote server. | -| `diff-url` | | The URL of the CodeChecker product to check and diff against, **including** the [endpoint](http://codechecker.readthedocs.io/en/latest/web/user_guide/#product_url-format). Usually in the format of `http://example.com/ProductName`. Specifying this variable is **required** if `diff` was set to `true`. | -| `diff-username` | | If the server requires authentication to access, specify the username which the check should log in with. | -| `diff-password` | | The password or [generated access token](http://codechecker.readthedocs.io/en/latest/web/authentication/#personal-access-token) corresponding to the user. 🔐 **Note:** It is recommended that this is configured as a repository secret, and given as such: `${{ secrets.CODECHECKER_PASSWORD }}` when configuring the action. | -| `diff-run-name` | (auto-generated, in the format `user/repo/branchname`) | CodeChecker analysis executions are collected into _runs_. A run usually correlates to one configuration of the analysis. (FIXME: ⚠️ **Warning!** `CodeChecker cmd diff` understands `:` differently than the `CodeChecker store` command! If the run name contains a `:`, it must be escaped by saying `\:`.) | +| Variable | Default | Description | +|-----------------|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `diff` | `false` | If set to `true`, the job will compute a diff of the current analysis results against the results stored on a remote server. | +| `diff-url` | | The URL of the CodeChecker product to check and diff against, **including** the [endpoint](http://codechecker.readthedocs.io/en/latest/web/user_guide/#product_url-format). Usually in the format of `http://example.com/ProductName`. Specifying this variable is **required** if `diff` was set to `true`. | +| `diff-username` | | If the server requires authentication to access, specify the username which the check should log in with. | +| `diff-password` | | The password or [generated access token](http://codechecker.readthedocs.io/en/latest/web/authentication/#personal-access-token) corresponding to the user. 🔐 **Note:** It is recommended that this is configured as a repository secret, and given as such: `${{ secrets.CODECHECKER_PASSWORD }}` when configuring the action. | +| `diff-run-name` | (auto-generated, in the format `user/repo\: branchname`) | CodeChecker analysis executions are collected into _runs_. A run usually correlates to one configuration of the analysis. | ### Store configuration @@ -296,13 +296,13 @@ runs: 🔓 Storing runs to a server requires the `PRODUCT_STORE` permission, if the server is requiring authentication. -| Variable | Default | Description | -|------------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `store` | `false` | If set to `true`, the script will upload the findings to a CodeChecker server. Usually, other flags need to be configured too! | -| `store-url` | | The URL of the CodeChecker product to store to, **including** the [endpoint](http://codechecker.readthedocs.io/en/latest/web/user_guide/#product_url-format). Usually in the format of `http://example.com/ProductName`. Specifying this variable is **required** if `store` was set to `true`. | -| `store-username` | | If the server requires authentication to access, specify the username which the upload should log in with. | -| `store-password` | | The password or [generated access token](http://codechecker.readthedocs.io/en/latest/web/authentication/#personal-access-token) corresponding to the user. 🔐 **Note:** It is recommended that this is configured as a repository secret, and given as such: `${{ secrets.CODECHECKER_PASSWORD }}` when configuring the action. | -| `store-run-name` | (auto-generated, in the format `user/repo/branchname`) | CodeChecker analysis executions are collected into _runs_. A run usually correlates to one configuration of the analysis. Runs can be stored incrementally, in which case CodeChecker is able to annotate that reports got fixed. | +| Variable | Default | Description | +|------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `store` | `false` | If set to `true`, the script will upload the findings to a CodeChecker server. Usually, other flags need to be configured too! | +| `store-url` | | The URL of the CodeChecker product to store to, **including** the [endpoint](http://codechecker.readthedocs.io/en/latest/web/user_guide/#product_url-format). Usually in the format of `http://example.com/ProductName`. Specifying this variable is **required** if `store` was set to `true`. | +| `store-username` | | If the server requires authentication to access, specify the username which the upload should log in with. | +| `store-password` | | The password or [generated access token](http://codechecker.readthedocs.io/en/latest/web/authentication/#personal-access-token) corresponding to the user. 🔐 **Note:** It is recommended that this is configured as a repository secret, and given as such: `${{ secrets.CODECHECKER_PASSWORD }}` when configuring the action. | +| `store-run-name` | (auto-generated, in the format `user/repo: branchname`) | CodeChecker analysis executions are collected into _runs_. A run usually correlates to one configuration of the analysis. Runs can be stored incrementally, in which case CodeChecker is able to annotate that reports got fixed. | ## Action *`outputs`* to use in further steps diff --git a/src/diff-pre.sh b/src/diff-pre.sh index 088e252..b5b7895 100755 --- a/src/diff-pre.sh +++ b/src/diff-pre.sh @@ -30,12 +30,12 @@ fi if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then echo "Auto-generating run name for a PULL REQUEST's target (base)." - echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_BASE_REF" + echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY\: $GITHUB_BASE_REF" echo "::set-output name=DIFF_CONFIGURED::true" exit 0 elif [[ "$GITHUB_REF_TYPE" == "branch" ]]; then echo "Auto-generating run name for a BRANCH." - echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_REF_NAME" + echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY\: $GITHUB_REF_NAME" echo "::set-output name=DIFF_CONFIGURED::true" exit 0 elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then diff --git a/src/store-pre.sh b/src/store-pre.sh index 3c79131..142f913 100755 --- a/src/store-pre.sh +++ b/src/store-pre.sh @@ -31,7 +31,7 @@ fi if [[ "$GITHUB_REF_TYPE" == "branch" ]]; then echo "Auto-generating run name for a BRANCH." - echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_REF_NAME" + echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY: $GITHUB_REF_NAME" echo "::set-output name=RUN_TAG::$GITHUB_SHA" echo "::set-output name=STORE_CONFIGURED::true" exit 0