1
0
mirror of synced 2026-01-05 21:04:17 -05:00

Simple merge queue (#22992)

This commit is contained in:
Rachael Sewell
2021-11-18 20:41:08 -08:00
committed by GitHub
parent 33c5ce2d36
commit ca614134cb
3 changed files with 140 additions and 16 deletions

View File

@@ -1,20 +1,22 @@
name: Autoupdate branch
# **What it does**: Any pull requests with automerge will get main branch updates.
# **Why we have it**: So we don't have to watch pull requests and click update branch 100x.
# **What it does**: The next pull request in the merge queue will get its
# branch updated with main. Only updating one branch ensures that pull requests
# in the queue are merged sequentially.
# **Why we have it**: So we don't have to watch pull requests and click
# update branch 1000x.
# **Who does it impact**: Our health.
#
# This workflow checks all open PRs targeting `main` as their base branch and
# will attempt to update them if they have automerge.
# It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR
# was merged or a force-push was done).
# The merge queue consists of any pull requests with automerge enabled and
# are mergeable. There is a label that can be used to skip to the front of
# the queue (`skip-to-front-of-merge-queue`).
#
# It should work on all PRs created from source branches within the repo itself
# but is unlikely to work for PRs created from forked repos.
# This workflow is triggered when a `push` event occurs ON the `main` branch
# (e.g. a PR was merged or a force-push was done).
#
# It is still worthwhile to leave it enabled for the `docs` open source repo as
# it should at least be running on `repo-sync` branch PRs.
# This workflow runs on all PRs created from source branches within the
# public and private docs repos but is won't work for PRs created from
# forked repos.
#
on:
@@ -28,8 +30,7 @@ jobs:
name: autoupdate
runs-on: ubuntu-latest
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
- name: Update next PR in queue
env:
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
PR_FILTER: auto_merge
MERGE_MSG: 'Autoupdate branch'
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
run: node .github/actions-scripts/update-merge-queue-branch.js