From b67ab0fd2d8d8888bae3c06c7eb23d3c39b75436 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 | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 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..7402600718 --- /dev/null +++ b/.github/workflows/CommitMessage.yml @@ -0,0 +1,34 @@ +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: | + gitlint --commits origin/$GITHUB_BASE_REF.. >> cmlint.log 2>&1 + echo "lint_result=<<###LINT_DELIMITER###" >> "$GITHUB_ENV" + cat cmlint.log + cat cmlint.log >> "$GITHUB_ENV" + echo "THIS Just ain't working" >> "$GETHUB_ENV" + echo "###LINT_DELIMITER###" >> "$GITHUB_ENV" + cat cmlint.log >> $GITHUB_STEP_SUMMARY + - name: Comment on PR + if: failure() + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: Commit Comment + message: | + ``` + ${{ env.lint_result }} + ``` \ No newline at end of file