From e302c22d933eec437444eb4aa1be93c1c1ee6aec 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 | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 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..4d4d53342b --- /dev/null +++ b/.github/workflows/CommitMessage.yml @@ -0,0 +1,35 @@ +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" + lint_output=$(cat cmlint.log) + echo "$lint_output" + echo "THIS Just ain't working" >> "$GETHUB_ENV" + echo "$lint_output" >> "$GITHUB_ENV" + echo "###LINT_DELIMITER###" >> "$GITHUB_ENV" + echo "$lint_output" >> $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