Skip to content

chore(dependabot): bump tj-actions/changed-files from 45.0.1 to 45.0.2 #1027

chore(dependabot): bump tj-actions/changed-files from 45.0.1 to 45.0.2

chore(dependabot): bump tj-actions/changed-files from 45.0.1 to 45.0.2 #1027

name: PR Github Checks
on:
pull_request_target:
branches:
- "main"
- "release-*"
types:
- opened
- reopened
- edited
- synchronize
- labeled
- milestoned
workflow_dispatch:
jobs:
pr-milestone-check:
runs-on: ubuntu-latest
steps:
- name: Check for milestone
env:
MILESTONE: ${{ toJSON(github.event.pull_request.milestone) }}
run: |
echo "${MILESTONE}" | jq -e '.!=null' || (echo "Milestone is not set"; exit 1)
pr-label-check:
runs-on: ubuntu-latest
steps:
- name: Check for area label
if: always()
run: |
gh api --jq '.labels.[].name' /repos/${{ github.repository }}/pulls/${{ github.event.number }} | \
grep -q '^area/' || (echo "area label missing"; exit 1)
env:
GH_TOKEN: ${{ github.token }}
- name: Check for kind label
if: always()
run: |
gh api --jq '.labels.[].name' /repos/${{ github.repository }}/pulls/${{ github.event.number }} | \
grep -q '^kind/' || (echo "kind label missing"; exit 1)
env:
GH_TOKEN: ${{ github.token }}
- name: Check if kind label matches pr title prefix
run: |
kind_label=$( gh api --jq '.labels.[].name' /repos/${{ github.repository }}/pulls/${{ github.event.number }} | grep '^kind/')
kind_label_to_pr_title_prefix='{"kind/bug":"fix","kind/feature":"feat","kind/docs":"docs","kind/chore":"chore","kind/flaky-test":"test","kind/missing-test":"test","kind/failing-test":"test","kind/deps":"deps"}'
prefix=$(echo $kind_label_to_pr_title_prefix | jq -r ".\"$kind_label\"")
echo "${{ github.event.pull_request.title }}" | grep '^'$prefix || (echo "PR title should start with $prefix"; exit 1)
env:
GH_TOKEN: ${{ github.token }}
pr-title-check:
runs-on: ubuntu-latest
steps:
- name: Validate title
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
deps
chore
docs
feat
fix
test
requireScope: false
subjectPattern: ^([A-Z].*[^.]|bump .*)$
PR-Github-Checks-Success:
needs: [pr-milestone-check, pr-label-check, pr-title-check]
runs-on: ubuntu-latest
steps:
- name: PR Github Checks Success
run: echo "All checks passed"