From cf5032a08507073d843f9179cf439e6f45787e5e Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 31 Jul 2024 15:27:59 +0200 Subject: [PATCH 1/4] ci: update Differential ShellCheck workflow use default inputs when running on `merge_group` --- .github/workflows/differential-shellcheck.yml | 8 ++------ docs/CHANGELOG.md | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml index fe26f76..337e9c9 100644 --- a/.github/workflows/differential-shellcheck.yml +++ b/.github/workflows/differential-shellcheck.yml @@ -6,15 +6,14 @@ on: pull_request: branches: [ main ] merge_group: - branches: - - main + types: [ checks_requested ] permissions: contents: read jobs: lint: - name: Test latest changes + name: Differential ShellCheck - test current changes runs-on: ubuntu-latest permissions: @@ -46,9 +45,6 @@ jobs: src/**.{zsh,osh} display-engine: sarif-fmt token: ${{ secrets.GITHUB_TOKEN }} - triggering-event: ${{ github.event_name == 'merge_group' && 'manual' || github.event_name }} - base: ${{ github.event.merge_group.base_sha }} - head: ${{ github.event.merge_group.head_sha }} - if: always() name: Upload artifact with defects in SARIF format diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8dc4c84..ed0158e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +* Native support for `merge_group` trigger event + ## v5.3.1 * Update `csutils` (`csdiff`) to 3.4.0 From 47b67ac2f5720b877bd70257dcfa9d153b7e163c Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 31 Jul 2024 15:33:35 +0200 Subject: [PATCH 2/4] lint: fix warnings --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ed0158e..43b2284 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -227,7 +227,7 @@ * Bugfixes: * Make directory /github/workspace git-save - * Remove double quotes to avoid git empty pathspec warnings + * Remove double quotes to avoid `git` empty pathspec warnings * Make GA tests ran on current version of repo/fork * Bump actions/checkout from 2 to 3 From 89349fa8930d01ef0a9e10e26fb89dadfb687b1c Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 31 Jul 2024 15:59:19 +0200 Subject: [PATCH 3/4] ci: run unit tests in merge queue --- .github/workflows/unit-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 908d227..990d7c1 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -6,6 +6,8 @@ on: branches: [ main ] push: branches: [ main ] + merge_group: + types: [ checks_requested ] permissions: contents: read From a494bfa10ae4700a78a2935ae178b03123066b22 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 31 Jul 2024 15:59:56 +0200 Subject: [PATCH 4/4] ci: run ShellCheck on push only if target branch is `main` --- .github/workflows/differential-shellcheck.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml index 337e9c9..1ebd019 100644 --- a/.github/workflows/differential-shellcheck.yml +++ b/.github/workflows/differential-shellcheck.yml @@ -3,6 +3,7 @@ name: Differential ShellCheck on: push: + branches: [ main ] pull_request: branches: [ main ] merge_group: