From 2f9047d8f7fa651712f1d4dd9a7d8e9de7bd4d2d Mon Sep 17 00:00:00 2001 From: Rizina Date: Sun, 29 Oct 2023 02:38:47 +0545 Subject: [PATCH 1/4] docs: update notes about pullrequest triggers --- .../using-workflows/events-that-trigger-workflows.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/content/actions/using-workflows/events-that-trigger-workflows.md b/content/actions/using-workflows/events-that-trigger-workflows.md index fdd00839be59..38bc1dc68c6f 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -590,15 +590,13 @@ on: {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." +- **Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." -{% endnote %} - -{% note %} +- **Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. -**Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. + Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target). -Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target). +- **Note:** The `pull_request` webhook event payload is empty for merged pull requests and pull requests that come from forked repositories. {% endnote %} From 7093f360ff2746fc8cbce9688ee83964e4504074 Mon Sep 17 00:00:00 2001 From: Rizina Date: Sun, 29 Oct 2023 02:43:53 +0545 Subject: [PATCH 2/4] fix: remove unnecessary space causing build failure --- .../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 38bc1dc68c6f..aa2223c820c7 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -592,7 +592,7 @@ on: - **Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." -- **Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. +- **Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target). From 72daf34208cc9638c2f3c65982da02f100b58eb5 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Tue, 31 Oct 2023 09:31:15 -0500 Subject: [PATCH 3/4] Start list with "Notes" --- .../using-workflows/events-that-trigger-workflows.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/actions/using-workflows/events-that-trigger-workflows.md b/content/actions/using-workflows/events-that-trigger-workflows.md index aa2223c820c7..7ba186ca71aa 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -590,13 +590,14 @@ on: {% note %} -- **Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." +**Notes**: +- {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." -- **Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. +- Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target). -- **Note:** The `pull_request` webhook event payload is empty for merged pull requests and pull requests that come from forked repositories. +- The `pull_request` webhook event payload is empty for merged pull requests and pull requests that come from forked repositories. {% endnote %} From 9fc6ef1273048d3f946e01daacbcb91613812aa1 Mon Sep 17 00:00:00 2001 From: Laura Coursen Date: Tue, 31 Oct 2023 09:34:28 -0500 Subject: [PATCH 4/4] Remove trailing space --- .../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 7ba186ca71aa..6dce8082191d 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -590,7 +590,7 @@ on: {% note %} -**Notes**: +**Notes**: - {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes)." - Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first.