diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index 66c9bf7181f1..1dd6d50fced7 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -24,7 +24,7 @@ jobs: with: issue-number: ${{ github.event.client_payload.pull_request.number }} body: | - The provided command lacks any tags. Please execute '/ok-to-test' again, specifying the tags you want to include or use `@tag.All` to run all specs. + The provided command lacks any tags. Please execute '/ok-to-test' again, specifying the tags you want to include or use `/ok-to-test tags="@tag.All"` to run all specs. Explore the tags documentation [here](https://www.notion.so/appsmith/Ok-to-test-With-Tags-7c0fc64d4efb4afebf53348cd6252918) - name: Stop the workflow run if tags are not present @@ -36,7 +36,9 @@ jobs: id: checkAll run: | tags="${{ github.event.client_payload.slash_command.args.named.tags }}" - if [[ $tags == *"@tag.All"* ]]; then + if [[ ($tags == *"ALL"* || $tags == *"All"* || $tags == *"all"*) && $tags != *"@tag.All"* ]]; then + echo "invalid_tags_all=$tags" >> $GITHUB_OUTPUT + elif [[ $tags == *"@tag.All"* ]]; then echo "tags=" >> $GITHUB_OUTPUT echo "matrix=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]" >> $GITHUB_OUTPUT else @@ -44,6 +46,19 @@ jobs: echo "matrix=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]" >> $GITHUB_OUTPUT fi + - name: Add comment to use correct @tag.All format + if: steps.checkAll.outputs.invalid_tags_all != '' + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.client_payload.pull_request.number }} + body: | + Please use `/ok-to-test tags="@tag.All"` to run all specs. + Explore the tags documentation [here](https://www.notion.so/appsmith/Ok-to-test-With-Tags-7c0fc64d4efb4afebf53348cd6252918) + + - name: Stop the workflow run if given @tag.All format is wrong + if: steps.checkAll.outputs.invalid_tags_all != '' + run: exit 1 + # This step creates a comment on the PR with a link to this workflow run. - name: Add a comment on the PR with link to workflow run if: steps.checkTags.outputs.tags == 'true'