Skip to content

fix: fix prevrandao bug #71

fix: fix prevrandao bug

fix: fix prevrandao bug #71

Workflow file for this run

name: Commit Lint
on:
pull_request:
types: [opened, synchronize, reopened, edited]
push:
branches:
- '**'
jobs:
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: |
npm install --save-dev @commitlint/cli @commitlint/config-conventional
- name: Create commitlint config
run: |
cat > commitlint.config.js << 'EOL'
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [
'feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore'
]],
'scope-enum': [2, 'always', [
'core', 'stdlib', 'examples', 'docs', 'tools', 'deps', 'ci', 'test', 'lint', 'other',
]],
'body-max-line-length': [1, 'always', 100],
'subject-case': [0, 'never'],
},
helpUrl: 'https://github.com/DTVMStack/DTVM_SolSDK/blob/main/docs/COMMIT_CONVENTION.md',
};
EOL
- name: Lint commit messages
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
# For PR events, check all commits in the PR
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
else
# For push events, check only the new commits
npx commitlint --from ${{ github.event.before }} --to ${{ github.event.after }} --verbose
fi