Skip to content

feat: add operation to hydra response #2985

feat: add operation to hydra response

feat: add operation to hydra response #2985

Workflow file for this run

name: Commit Lint

Check warning on line 1 in .github/workflows/commitlint.yml

View workflow run for this annotation

GitHub Actions / Commit Lint

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
commitlint:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.base.ref }}
- 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