From 9441ea940c8f861bbc6b142fee2ab0dfb08473a6 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Thu, 10 Feb 2022 13:41:01 -0800 Subject: [PATCH 1/3] Workflows: Augment workflow to ensure failure with invalid change notes --- .github/workflows/check-change-note.yml | 1 + .github/workflows/validate-change-notes.yml | 31 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/validate-change-notes.yml diff --git a/.github/workflows/check-change-note.yml b/.github/workflows/check-change-note.yml index 5701e751923..9324b794654 100644 --- a/.github/workflows/check-change-note.yml +++ b/.github/workflows/check-change-note.yml @@ -8,6 +8,7 @@ on: - "*/ql/src/**/*.qll" - "!**/experimental/**" - "!ql/**" + - ".github/workflows/check-change-not.yml" jobs: check-change-note: diff --git a/.github/workflows/validate-change-notes.yml b/.github/workflows/validate-change-notes.yml new file mode 100644 index 00000000000..b8c59c792c5 --- /dev/null +++ b/.github/workflows/validate-change-notes.yml @@ -0,0 +1,31 @@ +name: Validate change notes + +on: + push: + paths: + - "*/ql/*/change-notes/**/*" + - ".github/workflows/validate-change-notes.yml" + branches: + - main + - "rc/*" + pull_request: + paths: + - "*/ql/*/change-notes/**/*" + - ".github/workflows/validate-change-notes.yml" + +jobs: + check-change-note: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup CodeQL + uses: ./.github/actions/fetch-codeql + + - name: Fail if there are any errors with existing change notes + if: | + github.event.pull_request.draft == false + + run: | + codeql pack release --groups cpp,csharp,java,javascript,python,ruby,-examples,-test,-experimental From cba9e0b2672e905eca76b887c7a10c5830730449 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Thu, 10 Feb 2022 14:36:23 -0800 Subject: [PATCH 2/3] Fix paths in check-change-note Library pack changes were being ignored. --- .github/workflows/check-change-note.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-change-note.yml b/.github/workflows/check-change-note.yml index 9324b794654..672202444bb 100644 --- a/.github/workflows/check-change-note.yml +++ b/.github/workflows/check-change-note.yml @@ -6,9 +6,11 @@ on: paths: - "*/ql/src/**/*.ql" - "*/ql/src/**/*.qll" + - "*/ql/lib/**/*.ql" + - "*/ql/lib/**/*.qll" - "!**/experimental/**" - "!ql/**" - - ".github/workflows/check-change-not.yml" + - ".github/workflows/check-change-note.yml" jobs: check-change-note: From 50924931607ef6c3be18237aceffe6201aeec2f2 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 11 Feb 2022 08:41:20 -0800 Subject: [PATCH 3/3] Update .github/workflows/validate-change-notes.yml --- .github/workflows/validate-change-notes.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/validate-change-notes.yml b/.github/workflows/validate-change-notes.yml index b8c59c792c5..2547b34d6a8 100644 --- a/.github/workflows/validate-change-notes.yml +++ b/.github/workflows/validate-change-notes.yml @@ -24,8 +24,6 @@ jobs: uses: ./.github/actions/fetch-codeql - name: Fail if there are any errors with existing change notes - if: | - github.event.pull_request.draft == false run: | codeql pack release --groups cpp,csharp,java,javascript,python,ruby,-examples,-test,-experimental