diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index 2bd80f627a..b103ec6afe 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -17,6 +17,7 @@ on: # unlike 'pull_request_target', these only have secrets if the pull # request creator has permission to access secrets. pull_request_target: + merge_group: workflow_dispatch: inputs: PR_NUMBER: @@ -27,9 +28,6 @@ on: description: 'The commit SHA to build' type: string required: true - push: - branches: - - gh-readonly-queue/main/** permissions: contents: read @@ -200,7 +198,7 @@ jobs: - name: Run ARM deploy # This 'if' will be truth, if this workflow is... # - run as a workflow_dispatch - # - run because of a push to main (or gh-readonly-queue/main) + # - run because of a push to main (or when added to a merge queue) # - run as a regular pull request # But if it's a pull request, *and* for whatever reason, the pull # request has "Auto-merge" enabled, don't bother. diff --git a/.github/workflows/dry-run-elasticsearch-indexing.yml b/.github/workflows/dry-run-elasticsearch-indexing.yml index 86bdf6f8ba..06b62ce42b 100644 --- a/.github/workflows/dry-run-elasticsearch-indexing.yml +++ b/.github/workflows/dry-run-elasticsearch-indexing.yml @@ -5,9 +5,7 @@ name: Dry run Elasticsearch indexing # **Who does it impact**: Docs engineering. on: - push: - branches: - - gh-readonly-queue/main/** + merge_group: pull_request: paths: - script/search/index-elasticsearch.mjs diff --git a/.github/workflows/link-check-all.yml b/.github/workflows/link-check-all.yml index 38c615312f..5c51fa0069 100644 --- a/.github/workflows/link-check-all.yml +++ b/.github/workflows/link-check-all.yml @@ -6,10 +6,10 @@ name: 'Link Checker: All English' on: workflow_dispatch: + merge_group: push: branches: - main - - gh-readonly-queue/main/** pull_request: permissions: diff --git a/.github/workflows/repo-freeze-check.yml b/.github/workflows/repo-freeze-check.yml index a680269f41..4be314879c 100644 --- a/.github/workflows/repo-freeze-check.yml +++ b/.github/workflows/repo-freeze-check.yml @@ -6,6 +6,7 @@ name: Repo Freeze Check on: workflow_dispatch: + merge_group: pull_request_target: types: - opened @@ -15,9 +16,6 @@ on: - unlocked branches: - main - push: - branches: - - gh-readonly-queue/main/** permissions: contents: none diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df10beb410..fd05cb92a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,8 @@ name: Node.js Tests on: workflow_dispatch: + merge_group: pull_request: - push: - branches: - - gh-readonly-queue/main/** permissions: contents: read diff --git a/.github/workflows/triage-unallowed-internal-changes.yml b/.github/workflows/triage-unallowed-internal-changes.yml index 45bc281c32..b1ba9895da 100644 --- a/.github/workflows/triage-unallowed-internal-changes.yml +++ b/.github/workflows/triage-unallowed-internal-changes.yml @@ -5,6 +5,7 @@ name: Check for unallowed internal changes # **Who does it impact**: Docs engineering and content writers. on: + merge_group: pull_request: types: - labeled @@ -12,9 +13,6 @@ on: - opened - reopened - synchronize - push: - branches: - - gh-readonly-queue/main/** permissions: # This is needed by dorny/paths-filter diff --git a/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md b/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md index 7d14b8bd72..bd3fd55f70 100644 --- a/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md +++ b/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md @@ -27,7 +27,7 @@ topics: {% data reusables.actions.example-table-intro %} | **Feature** | **Implementation** | -| --- | --- | +| --- | --- | {% data reusables.actions.workflow-dispatch-table-entry %} {% data reusables.actions.pull-request-table-entry %} {% data reusables.actions.cron-table-entry %} @@ -66,10 +66,8 @@ name: Node.js Tests on: workflow_dispatch: + merge_group: pull_request: - push: - branches: - - gh-readonly-queue/main/** permissions: contents: read @@ -277,12 +275,12 @@ Add the `pull_request` event, so that the workflow runs automatically every time ```yaml{:copy} push: branches: - - gh-readonly-queue/main/** + - main ``` -Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch matching the filter `gh-readonly-queue/main/**`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push). +Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch matching the filter `main`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push). diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue.md b/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue.md index a48d44bf82..061016f935 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue.md @@ -19,20 +19,25 @@ redirect_from: {% data reusables.pull_requests.merge-queue-overview %} -The merge queue creates temporary branches with a special prefix to validate pull request changes. The changes in the pull request are then grouped with the latest version of the `base_branch` as well as changes ahead of it in the queue. {% data variables.product.product_name %} will merge all these changes into `base_branch` once the checks required by the branch protections of `base_branch` pass. +The merge queue creates temporary branches with a special prefix to validate pull request changes. The changes in the pull request are then grouped with the latest version of the `base_branch` as well as changes ahead of it in the queue. {% data variables.product.product_name %} will merge all these changes into `base_branch` once the checks required by the branch protections of `base_branch` pass. -You may need to update your Continuous Integration (CI) configuration to trigger builds on branch names that begin with the special prefix `gh-readonly-queue/{base_branch}` after the group is created. +You may need to update your Continuous Integration (CI) configuration to trigger builds on this event to report the status of required checks when a pull request is queued to merge. -For example, with {% data variables.product.prodname_actions %}, a workflow with the following trigger will run each time a pull request that targets the base branch `main` is queued to merge. +### Triggering merge queue checks with {% data variables.product.prodname_actions %} + +With {% data variables.product.prodname_actions %} there is a dedicated event called `merge_group` which will trigger a workflow. Note that this is a different event from the `pull_request` and `push` events. + +A workflow that reports a check which is required by the target branch's protections would look like this: ```yaml on: - push: - branches: - - gh-readonly-queue/main/** + pull_request: + merge_group: ``` -{% data reusables.pull_requests.merge-queue-merging-method %} +### Triggering merge queue checks with other CI providers + +With other CI providers, you may need to update your configuration when a branch that begin with the special prefix `gh-readonly-queue/{base_branch}` is created. For information about merge methods, see "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)."