diff --git a/.github/workflows/commit-lint-problem-matcher.json b/.github/workflows/commit-lint-problem-matcher.json deleted file mode 100644 index e90d54c..0000000 --- a/.github/workflows/commit-lint-problem-matcher.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "core-validate-commit", - "pattern": [ - { - "regexp": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)", - "message": 1 - } - ] - } - ] -} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 2b6c750..c93f852 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -1,23 +1,21 @@ -name: First commit message adheres to guidelines +name: Validate Commit Messages -on: [pull_request] - -env: - NODE_VERSION: lts/* - -permissions: - contents: read +on: + pull_request: + types: [opened, synchronize] jobs: - lint-commit-message: + validate-commit-message: runs-on: ubuntu-latest steps: - - name: Compute number of commits in the PR - id: nb-of-commits - run: | - echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT - echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT - - name: Validate commit message + - name: Check out code + uses: actions/checkout@v2 + + - name: Validate commit messages run: | - echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json" - git rev-parse HEAD~${{ steps.nb-of-commits.outputs.minusOne }} | xargs npx -q core-validate-commit --no-validate-metadata --tap + git log --format=%s ${{ github.event.before }}..${{ github.sha }} -- | while read -r line; do + if ! [[ "$line" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)$ ]]; then + echo "Invalid commit message format: $line" + exit 1 + fi + done diff --git a/gurubu-client/src/app/styles/variables.scss b/gurubu-client/src/app/styles/variables.scss index e9e3caa..1249730 100644 --- a/gurubu-client/src/app/styles/variables.scss +++ b/gurubu-client/src/app/styles/variables.scss @@ -113,4 +113,3 @@ $radius-large: 8px; $radius-xlarge: 12px; $radius-xxlarge: 16px; $radius-xxxlarge: 24px; -