From 064f3f6212e9449200aad08e72ee8d17a662b750 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Thu, 4 Jan 2024 15:33:51 +0800 Subject: [PATCH] feat(ci): trigger a workflow for reviewing patches (#12277) This commit adds a workflow that opens a companion PR (the link being displayed as mentioning current PR) when developer opens a PR that modifies openresty patches. The companion PR automatically creates and updates in-place when the PR at kong or kong-ee updates, and displays only the diffs for patches files to help reviewer understand the changes better. --- .../workflows/openresty-patches-companion.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/openresty-patches-companion.yml diff --git a/.github/workflows/openresty-patches-companion.yml b/.github/workflows/openresty-patches-companion.yml new file mode 100644 index 00000000000..4d79a227635 --- /dev/null +++ b/.github/workflows/openresty-patches-companion.yml @@ -0,0 +1,20 @@ +name: Openresty patches review companion +on: + pull_request: + paths: + - 'build/openresty/patches/**' + +jobs: + create-pr: + runs-on: ubuntu-latest + steps: + - name: Dispatch the workflow + uses: benc-uk/workflow-dispatch@798e70c97009500150087d30d9f11c5444830385 # v1 + with: + workflow: create-pr.yml + repo: kong/openresty-patches-review + ref: master + token: ${{ secrets.PAT }} + inputs: | + {"pr-branch":"${{ github.event.pull_request.head.repo.owner.login }}:${{ github.head_ref }}", "pr-base":"${{ github.base_ref }}", "ee":${{ contains(github.repository, 'kong-ee') && 'true' || 'false' }}, "pr-id":"${{ github.event.pull_request.number }}"} +