Skip to content

deps(monorepo): replace devdependency eslint-plugin-node with eslint-plugin-n ^14.0.0 #1973

deps(monorepo): replace devdependency eslint-plugin-node with eslint-plugin-n ^14.0.0

deps(monorepo): replace devdependency eslint-plugin-node with eslint-plugin-n ^14.0.0 #1973

Workflow file for this run

---
name: Lint commit
on:
push:
pull_request:
merge_group:
branches:
- main
- next
- beta
- experimental
# Don't grant any access by default
permissions: {}
jobs:
commitlint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Setup workspace
uses: storm-software/action-setup@main
with:
package-manager: pnpm
package-manager-version: 9.10.0
storm-bot: Stormie-Bot
storm-bot-github-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
- name: Build Storm Nx-Plugin packages
run: pnpm build-plugins
shell: bash
- name: Set commit metadata
run: |
SET_INTERVAL_VALUES="true"
if [[ ${{ github.event_name }} == 'push' ]] || [[ ${{ github.event_name }} == 'merge_group' ]]; then
echo "Using default commit metadata"
SET_INTERVAL_VALUES="false"
elif [[ ${{ github.event_name }} == 'pull_request' ]]; then
FROM_INTERVAL_COMMITLINT=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }}
TO_INTERVAL_COMMITLINT=${{ github.event.pull_request.head.sha }}
else
echo "[ERROR] Event not supported when setting commit metadata"
exit 1
fi
if [ "${SET_INTERVAL_VALUES}" == "true" ]; then
if [ -z "${FROM_INTERVAL_COMMITLINT}" ]; then
echo "[ERROR] FROM_INTERVAL_COMMITLINT is empty"
exit 1
fi
if [ -z "${TO_INTERVAL_COMMITLINT}" ]; then
echo "[ERROR] TO_INTERVAL_COMMITLINT is empty"
exit 1
fi
{
echo "FROM_INTERVAL_COMMITLINT=${FROM_INTERVAL_COMMITLINT}"
echo "TO_INTERVAL_COMMITLINT=${TO_INTERVAL_COMMITLINT}"
} >> "${GITHUB_ENV}"
else
echo "Skip updating GITHUB_ENV. SET_INTERVAL_VALUES: ${SET_INTERVAL_VALUES}"
fi
- name: Build Git Tools
run: pnpm nx run git-tools:build
shell: bash
- name: Validate commit messages
run: |
pnpm node -r esbuild-register ./dist/packages/git-tools/bin/git.js commitlint
shell: bash