mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
on:
|
|
pull_request_target:
|
|
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- "ql/src/**/*.ql"
|
|
- "ql/src/**/*.qll"
|
|
- "!**/experimental/**"
|
|
|
|
jobs:
|
|
check-change-note:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check if change note file is present
|
|
uses: dorny/paths-filter@7c0f15b688b020e95e00f15c61299b022f08ca95 # v2.8.0
|
|
id: paths_filter
|
|
with:
|
|
filters: |
|
|
change_note:
|
|
- '**/change-notes/*.md'
|
|
- name: Get PR labels
|
|
id: pr-labels
|
|
uses: joerick/pr-labels-action@0a4cc4ee0ab557ec0b1ae1157fa6fa7f9f4c494b # v1.0.6
|
|
- name: Fail if change note is missing
|
|
uses: actions/github-script@v3
|
|
if: |
|
|
github.event.pull_request.draft == false &&
|
|
steps.paths_filter.outputs.change_note == 'false' &&
|
|
!contains(steps.pr-labels.outputs.labels, ' no-change-note-required ')
|
|
with:
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
script: |
|
|
core.setFailed('No change note found.' +
|
|
' Either add one, or add the `no-change-note-required` label.')
|