From 4334e263bac7c58d79ae72d9ea1dd00e240c7114 Mon Sep 17 00:00:00 2001 From: Edward Chernenko Date: Mon, 18 Dec 2023 17:45:16 +0300 Subject: [PATCH] (tests) Warn if description of the pull request has quote symbols The reason why double quote symbols (") are not wanted in PR text is that this text often contains changelog entries, which are then copy-pasted into _FUversioning.config (JSON file), into the string that is enclosed with double quote symbols ("), and additional double quote symbols will cause a syntax error there. Using single quote symbols (') is safe. --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 760b1edcec4..eadd93eb22f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,12 @@ jobs: - name: RUN -- npm test run: ( cd tests/travis && npm test ) + - name: Check description of pull request + env: + PRDESC: ${{ github.event.pull_request.body }} + run: | + echo "$PRDESC" | grep -qv '"' || ( echo "::error:: Description of Pull Request shouldn't contain quote symbols [\"], please replace them with single quote [']."; false ) + # Check Lua files with "luacheck" tool (Lua static analyzer). luacheck: runs-on: ubuntu-20.04