fix(openapi): nullable default values in operation openapi definition #156
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Commit Lint | |
on: | |
pull_request_target: | |
types: [opened, reopened, synchronize] | |
jobs: | |
commitlint: | |
if: github.event_name == 'pull_request_target' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch PR head | |
run: git fetch origin pull/${{ github.event.pull_request.number }}/head:pr_head | |
- name: Run commitlint | |
run: | | |
merge_base_sha=$(git merge-base HEAD pr_head) | |
first_commit_sha=$(git rev-list --no-merges --reverse $merge_base_sha..pr_head | head -n 1) | |
if [ -z "$first_commit_sha" ]; then | |
echo "Could not determine the first commit of the PR. Skipping." | |
exit 0 | |
fi | |
commit_message=$(git log -1 --pretty=%B $first_commit_sha) | |
# we can't use npx see https://github.com/conventional-changelog/commitlint/issues/613 | |
echo '{}' > package.json | |
npm install --no-fund --no-audit @commitlint/config-conventional @commitlint/cli | |
echo "$commit_message" | ./node_modules/.bin/commitlint -g .commitlintrc | |