Commit a1ce028
committed
Alert users about incomplete release PRs
Currently we use the `is-release` action to determine whether a commit
merged to `main` is a release commit, and if so, we run the release
workflow. A commit becomes a release commit when:
- the root package version is bumped
- the subject of the merged commit matches "Release X.Y.Z",
"Release/X.Y.Z", or something similar
However, oftentimes engineers will create a PR and bump some packages'
versions but forget to bump the root version. When this PR is merged,
the release workflow won't run — but by then it is too late, and the
engineer is forced to revert the PR and recreate it correctly. This is
painful.
To prevent this, this commit replaces the `is-action` with a custom
workflow that looks at three things:
- whether the root package is bumped
- whether the title of the release is well-formed
- whether any of the packages in the monorepo have been bumped
As before, this workflow runs when a release commit is merged, and the
result is used to determine whether to run the release workflow. But
now, this workflow also runs on each pull request and acts as a gate:
- If the engineer bumps the root package but does not fulfill
the other two requirements, then the workflow will fail and the PR
will not be mergeable.
- If the engineer does not bump the root package but fulfills one or
both of the other two requirements, then the workflow will not fail,
but it will show a warning so that the engineer can double-check.
- (Pull requests that do not fulfill any of the three requirements will
be ignored.)1 parent 43a6816 commit a1ce028
File tree
5 files changed
+604
-32
lines changed- .github/workflows
- scripts
5 files changed
+604
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 43 | | |
76 | 44 | | |
77 | 45 | | |
| |||
97 | 65 | | |
98 | 66 | | |
99 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments