Skip to content

Commit ff5e32d

Browse files
authored
fix(ci): run required checks when undrafting PRs (#428)
We just merged `release-please` support in 023c802. The user this runs as is the default Actions bot user. One thing about this user in particular is that it doesn't trigger workflows to run. This means that its release PRs aren't actually mergeable, since we have a couple of required checks which come from Actions runs. Fortunately we don't have to switch to an app. We can use the fact that the PRs are created in draft mode. To make a release, the process will be 1. Make PR ready for review. 2. Add PR to merge queue. Workflows can be triggered by the `ready_for_review` activity type on the `pull_request` event. So they will be kicked off when a human does step 1.
1 parent 023c802 commit ff5e32d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/lint-pr-title.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ name: Lint PR title
22

33
on:
44
pull_request:
5-
types: [opened, edited, synchronize]
5+
types:
6+
- edited
7+
- opened
8+
- ready_for_review
9+
- synchronize
10+
611
merge_group:
712

813
jobs:

.github/workflows/lint-shared-workflows.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
on:
22
push:
33
branches:
4-
- "main"
4+
- main
55

66
pull_request:
7+
types:
8+
- edited
9+
- opened
10+
- ready_for_review
11+
- synchronize
12+
713
merge_group:
814

15+
name: Lint shared-workflows
16+
917
permissions:
1018
contents: read
1119
actions: write
1220

1321
jobs:
1422
lint:
23+
name: Lint all shared workflows
1524
runs-on: ubuntu-latest
1625
steps:
1726
- name: Checkout
@@ -29,6 +38,8 @@ jobs:
2938

3039
# A separate job so we can run in the `yq` container
3140
lint-action-yaml:
41+
name: Lint action YAMLs
42+
3243
runs-on: ubuntu-latest
3344

3445
container:

0 commit comments

Comments
 (0)