@rmartz/merge-safety 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -54
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,11 +6,13 @@ breaking-change, and conflict facts for a PR, posts them as the `merge-safety`
|
|
|
6
6
|
check-run, and re-holds every open PR when the base branch moves — so a PR only
|
|
7
7
|
auto-merges once it is genuinely safe against the current base.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Consuming repos adopt it through the composite action
|
|
10
|
+
[**`rmartz/merge-safety-action`**](https://github.com/rmartz/merge-safety-action),
|
|
11
|
+
distributed the same way as the fleet's other `-action` repos:
|
|
11
12
|
|
|
12
|
-
1. **Updates propagate automatically.** Consuming repos pin
|
|
13
|
-
|
|
13
|
+
1. **Updates propagate automatically.** Consuming repos pin the action by SHA;
|
|
14
|
+
Dependabot's `github-actions` ecosystem opens PRs to bump that pin, and each
|
|
15
|
+
action release pins a specific version of this CLI.
|
|
14
16
|
2. **The check-run name is a fleet contract.** Every consumer requires a status
|
|
15
17
|
check named exactly `merge-safety`; see
|
|
16
18
|
[docs/check-run-contract.md](docs/check-run-contract.md).
|
|
@@ -20,60 +22,22 @@ is:
|
|
|
20
22
|
|
|
21
23
|
## Using it in a consuming repo
|
|
22
24
|
|
|
23
|
-
Add
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
# .github/workflows/merge-safety.yml
|
|
30
|
-
name: merge-safety
|
|
31
|
-
on:
|
|
32
|
-
pull_request_target:
|
|
33
|
-
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
|
|
34
|
-
push:
|
|
35
|
-
branches: [main]
|
|
36
|
-
check_suite:
|
|
37
|
-
types: [completed]
|
|
38
|
-
workflow_dispatch:
|
|
39
|
-
inputs:
|
|
40
|
-
pr:
|
|
41
|
-
description: PR number to evaluate
|
|
42
|
-
required: true
|
|
43
|
-
permissions:
|
|
44
|
-
checks: write
|
|
45
|
-
statuses: write
|
|
46
|
-
pull-requests: write
|
|
47
|
-
contents: read
|
|
48
|
-
actions: write
|
|
49
|
-
packages: read
|
|
50
|
-
jobs:
|
|
51
|
-
merge-safety:
|
|
52
|
-
uses: rmartz/merge-safety/.github/workflows/merge-safety.yml@<sha> # vX.Y.Z
|
|
53
|
-
with:
|
|
54
|
-
pr: ${{ inputs.pr }}
|
|
55
|
-
secrets: inherit
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Then require the `merge-safety` status check on the default branch. Both the
|
|
59
|
-
caller and the Dependabot entry are seeded once by
|
|
60
|
-
[`@rmartz/bootstrap`](https://github.com/rmartz/ai-tools)
|
|
61
|
-
(`ai-ensure-project-config`); after that Dependabot maintains the pin. The
|
|
62
|
-
`@rmartz/merge-safety` CLI is public on npmjs, so installing it needs no token.
|
|
63
|
-
(Pins at v0.6.0 or earlier install from GitHub Packages instead, which is what the
|
|
64
|
-
`packages: read` permission above is for; it can be dropped once your pin is past
|
|
65
|
-
v0.6.0.)
|
|
25
|
+
Add the caller workflow from the action's
|
|
26
|
+
[consumer guide](https://github.com/rmartz/merge-safety-action/blob/main/docs/consuming.md),
|
|
27
|
+
create the labels merge-safety manages, and require the `merge-safety` status
|
|
28
|
+
check on the default branch. See [docs/consuming.md](docs/consuming.md) for what
|
|
29
|
+
the verdict expects of a repo and how it behaves.
|
|
66
30
|
|
|
67
|
-
>
|
|
68
|
-
>
|
|
69
|
-
>
|
|
31
|
+
> **The reusable workflow in this repo is deprecated.** Repos pinned to
|
|
32
|
+
> `rmartz/merge-safety/.github/workflows/merge-safety.yml` keep working and see a
|
|
33
|
+
> deprecation warning on each run; migrate them to the action.
|
|
70
34
|
|
|
71
35
|
## Requirements
|
|
72
36
|
|
|
73
37
|
- Node.js >= 20.11
|
|
74
38
|
- pnpm 9 (pinned via `packageManager`)
|
|
75
39
|
|
|
76
|
-
Consuming repos need neither — the
|
|
40
|
+
Consuming repos need neither — the action runs the published CLI on a
|
|
77
41
|
GitHub-hosted runner.
|
|
78
42
|
|
|
79
43
|
## Local development
|
|
@@ -98,9 +62,9 @@ OIDC trusted publishing with provenance — no npm token), and creates the git t
|
|
|
98
62
|
GitHub Release with generated notes — using only the built-in `GITHUB_TOKEN`, no
|
|
99
63
|
release-please and no PAT. There is deliberately **no
|
|
100
64
|
`@semantic-release/git`**: `package.json`'s `version` is a frozen `0.0.0` placeholder
|
|
101
|
-
and is never committed back. The version installed by the reusable
|
|
102
|
-
resolved at runtime from the **release tag at its own pinned commit**,
|
|
103
|
-
only in the git tag. Config: [`.releaserc.json`](.releaserc.json).
|
|
65
|
+
and is never committed back. The version installed by the deprecated reusable
|
|
66
|
+
workflow is resolved at runtime from the **release tag at its own pinned commit**,
|
|
67
|
+
so it lives only in the git tag; the action pins the version in its own lockfile. Config: [`.releaserc.json`](.releaserc.json).
|
|
104
68
|
|
|
105
69
|
**Version mapping (v0):** `feat:` → minor; `fix:`/`perf:` → patch. Pre-1.0, a
|
|
106
70
|
breaking change (`!`) is **capped at minor** so it can't auto-jump to `1.0.0`;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmartz/merge-safety",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The pre-auto-merge safety verdict for a PR (base-currency, breaking-change, and conflict facts), posted as the `merge-safety` check-run and distributed
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "The pre-auto-merge safety verdict for a PR (base-currency, breaking-change, and conflict facts), posted as the `merge-safety` check-run and distributed through the `rmartz/merge-safety-action` composite action kept current by Dependabot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
7
7
|
"merge-safety",
|
|
8
8
|
"auto-merge",
|
|
9
9
|
"github-actions",
|
|
10
|
-
"
|
|
10
|
+
"composite-action",
|
|
11
11
|
"check-run"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/rmartz/merge-safety#readme",
|