From b91cf4257010d498cfda1ca82460b8cd4f400f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ciesielski?= Date: Tue, 11 Nov 2025 10:51:18 +0100 Subject: [PATCH] Modifiy workflow to add PR's author and URL to the event payload --- .github/workflows/developer-hub.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/developer-hub.yml b/.github/workflows/developer-hub.yml index c3126d1c4..c6a4a495f 100644 --- a/.github/workflows/developer-hub.yml +++ b/.github/workflows/developer-hub.yml @@ -1,12 +1,13 @@ -name: Dispatch Developer Hub Workflow +name: Dispatch Developer Hub on PR merge on: - push: - branches: - - main + pull_request: + types: [closed] jobs: dispatch: + # Only run this job if the pull request was merged into the main branch + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' runs-on: ubuntu-latest steps: - name: Send repository_dispatch to phrase/developer-hub @@ -15,4 +16,10 @@ jobs: token: ${{ secrets.DISPATCH_DEVELOPER_HUB_TOKEN }} repository: phrase/developer-hub event-type: trigger-strings-workflow - client-payload: '{"source": "phrase/openapi", "type": "update"}' + client-payload: >- + { + "source": "phrase/openapi", + "type": "update", + "pr_author": "${{ github.event.pull_request.user.login }}", + "pr_url": "${{ github.event.pull_request.html_url }}" + }