From ef41ed03032e948c65cff3b60e9ebcfa67d7bbec Mon Sep 17 00:00:00 2001 From: Kyle Laker Date: Fri, 1 Apr 2022 15:45:22 -0400 Subject: [PATCH] Fix `pull_request_target` if_merged example Within the workflow, the event object is still `github.event.pull_request`, so the `merged` key is at `github.event.pull_request.merged`. There _is not_ a `github.event.pull_request_target` object. This is also reflected in the table for this section in "Webhook event payload". --- .../actions/using-workflows/events-that-trigger-workflows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/using-workflows/events-that-trigger-workflows.md b/content/actions/using-workflows/events-that-trigger-workflows.md index 40f6cb00a3..580e79b244 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -899,7 +899,7 @@ on: jobs: if_merged: - if: github.event.pull_request_target.merged == true + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - run: |