From c13ae1af86ef2e142c57240c71167cb13d814252 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 19 Jan 2024 14:49:17 -0800 Subject: [PATCH 1/2] Don't run the postgres submodule check on label changes --- .github/workflows/pull-request-meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-meta.yml b/.github/workflows/pull-request-meta.yml index 0126615448c..e753d3b9fa1 100644 --- a/.github/workflows/pull-request-meta.yml +++ b/.github/workflows/pull-request-meta.yml @@ -2,7 +2,7 @@ name: Pull Request Meta on: pull_request: - types: [opened, edited, synchronize, labeled, closed] + types: [opened, edited, synchronize] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} From f647468af3af6f568a53ec2561a912d5e60891af Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 19 Jan 2024 15:31:54 -0800 Subject: [PATCH 2/2] ... and fix a shell injection bug --- .github/workflows/pull-request-meta.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-meta.yml b/.github/workflows/pull-request-meta.yml index e753d3b9fa1..e6c9c85e3af 100644 --- a/.github/workflows/pull-request-meta.yml +++ b/.github/workflows/pull-request-meta.yml @@ -19,12 +19,13 @@ jobs: submodules: false - name: Verify that postgres/ was not changed unintentionally + env: + PR_TITLE: ${{ github.event.pull_request.title }} shell: bash run: | required_prefix="Update bundled PostgreSQL" - title="${{ github.event.pull_request.title }}" - if [[ $title == $required_prefix* ]]; then + if [[ "$PR_TITLE" == $required_prefix* ]]; then exit 0 fi