Skip to content

Commit 14d6da9

Browse files
committed
Revert "fix: Use user/repo/branch format"
This reverts commit d0c913f. As Ericsson/codechecker#3536 got merged, we can return to using `:`.
1 parent be26db7 commit 14d6da9

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ jobs:
274274

275275
store: true
276276
store-url: 'http://0.0.0.0:8001/Default'
277-
store-run-name: 'test-run'
278277
- name: "Do the second analysis that finds a new result"
279278
uses: ./
280279
id: codechecker-diff
@@ -285,7 +284,6 @@ jobs:
285284

286285
diff: true
287286
diff-url: 'http://0.0.0.0:8001/Default'
288-
diff-run-name: 'test-run'
289287
- uses: actions/upload-artifact@v2
290288
if: ${{ steps.codechecker-diff.outputs.warnings-in-diff == 'true' }}
291289
with:

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -282,27 +282,27 @@ runs:
282282

283283
🔓 Checking the analysis results against the contents of a server requires the `PRODUCT_VIEW` permission, if the server is requiring authentication.
284284

285-
| Variable | Default | Description |
286-
|-----------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
287-
| `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. |
288-
| `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`. |
289-
| `diff-username` | | If the server requires authentication to access, specify the username which the check should log in with. |
290-
| `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. |
291-
| `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 `\:`.) |
285+
| Variable | Default | Description |
286+
|-----------------|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
287+
| `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. |
288+
| `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`. |
289+
| `diff-username` | | If the server requires authentication to access, specify the username which the check should log in with. |
290+
| `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. |
291+
| `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. |
292292

293293
### Store configuration
294294

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

297297
🔓 Storing runs to a server requires the `PRODUCT_STORE` permission, if the server is requiring authentication.
298298

299-
| Variable | Default | Description |
300-
|------------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
301-
| `store` | `false` | If set to `true`, the script will upload the findings to a CodeChecker server. Usually, other flags need to be configured too! |
302-
| `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`. |
303-
| `store-username` | | If the server requires authentication to access, specify the username which the upload should log in with. |
304-
| `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. |
305-
| `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. |
299+
| Variable | Default | Description |
300+
|------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
301+
| `store` | `false` | If set to `true`, the script will upload the findings to a CodeChecker server. Usually, other flags need to be configured too! |
302+
| `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`. |
303+
| `store-username` | | If the server requires authentication to access, specify the username which the upload should log in with. |
304+
| `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. |
305+
| `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. |
306306

307307
## Action *`outputs`* to use in further steps
308308

src/diff-pre.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ fi
3030

3131
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3232
echo "Auto-generating run name for a PULL REQUEST's target (base)."
33-
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_BASE_REF"
33+
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY\: $GITHUB_BASE_REF"
3434
echo "::set-output name=DIFF_CONFIGURED::true"
3535
exit 0
3636
elif [[ "$GITHUB_REF_TYPE" == "branch" ]]; then
3737
echo "Auto-generating run name for a BRANCH."
38-
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_REF_NAME"
38+
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY\: $GITHUB_REF_NAME"
3939
echo "::set-output name=DIFF_CONFIGURED::true"
4040
exit 0
4141
elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then

src/store-pre.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131

3232
if [[ "$GITHUB_REF_TYPE" == "branch" ]]; then
3333
echo "Auto-generating run name for a BRANCH."
34-
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY/$GITHUB_REF_NAME"
34+
echo "::set-output name=RUN_NAME::$GITHUB_REPOSITORY: $GITHUB_REF_NAME"
3535
echo "::set-output name=RUN_TAG::$GITHUB_SHA"
3636
echo "::set-output name=STORE_CONFIGURED::true"
3737
exit 0

0 commit comments

Comments
 (0)