From 1921485a59fa631b678575e5271770c31668307a Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 27 Mar 2024 11:57:04 -0700 Subject: [PATCH] This is an error. followed by another and then followed by yet another error because this line is far too long for reading --- .github/workflows/CommitMessage.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/CommitMessage.yml diff --git a/.github/workflows/CommitMessage.yml b/.github/workflows/CommitMessage.yml new file mode 100644 index 0000000000..1265c57105 --- /dev/null +++ b/.github/workflows/CommitMessage.yml @@ -0,0 +1,32 @@ +name: Commit messages check +on: + pull_request: + +jobs: + gitlint: + name: Check commit messages + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install dependencies + run: | + pip install --upgrade gitlint + - name: Lint git commit messages + run: | + echo "lint_result<<$EOF" >> "$GITHUB_ENV" + gitlint --commits origin/$GITHUB_BASE_REF.. >> "$GITHUB_ENV" 2>&1 + echo "$EOF" >> "$GITHUB_ENV" + echo {{ env.lint_result }} >> $GITHUB_STEP_SUMMARY + - name: Comment on PR + if: failure() + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: Commit Comment + message: | + ``` + Testing + ${{ env.lint_result }} + ``` \ No newline at end of file