Skip to content

Commit

Permalink
Revert "fix: Use user/repo/branch format"
Browse files Browse the repository at this point in the history
This reverts commit d0c913f.

As Ericsson/codechecker#3536 got merged, we can return to using `:`.
  • Loading branch information
whisperity committed Dec 24, 2021
1 parent be26db7 commit af68e3d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,27 +282,27 @@ 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

🔖 Read more about [`CodeChecker store`](http://codechecker.readthedocs.io/en/latest/web/user_guide/#store) in the official documentation.

🔓 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

Expand Down
4 changes: 2 additions & 2 deletions src/diff-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/store-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af68e3d

Please sign in to comment.