Skip to content

Commit

Permalink
ci: use latest pr title when validating in pr checks workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranroneill committed Oct 31, 2024
1 parent e3e3c96 commit c909cad
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/pull_request_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@ jobs:
uses: actions/checkout@v4
- name: "🔧 Setup"
uses: ./.github/actions/use-dependencies
- name: "📥 Get PR Title"
id: get_pr_title
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const { data } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
return data.title;
- name: "✅ Validate"
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint
run: echo "${{ steps.get_pr_title.outputs.result }}" | yarn commitlint

lint:
name: "Lint"
Expand Down

0 comments on commit c909cad

Please sign in to comment.