mirror of
https://github.com/home-assistant/frontend.git
synced 2026-07-06 22:15:19 +01:00
9de89278cd
* Move inline workflow mjs scripts to dedicated files, add to eslint config * Potential fix for pull request finding 'CodeQL / Incomplete multi-character sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Pull request standards
|
|
|
|
on:
|
|
pull_request_target: # zizmor: ignore[dangerous-triggers] -- safe: reads PR metadata from event payload only, checks out base repo scripts only, never PR head code
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- ready_for_review
|
|
branches:
|
|
- dev
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: Check pull request follows contribution standards
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: write # To label and comment on pull requests
|
|
steps:
|
|
- name: Check out workflow scripts
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: .github/scripts
|
|
- name: Check pull request standards
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
script: |
|
|
const { default: checkStandards } = await import(
|
|
`${process.env.GITHUB_WORKSPACE}/.github/scripts/check-pull-request-standards.mjs`
|
|
);
|
|
await checkStandards({ github, context, core });
|