@wopr-network/platform-core 1.14.1 → 1.14.3

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.
@@ -6,5 +6,52 @@ on:
6
6
 
7
7
  jobs:
8
8
  auto-merge:
9
- uses: wopr-network/.github/.github/workflows/dependabot-auto-merge.yml@main
10
- secrets: inherit
9
+ runs-on: [self-hosted, Linux, X64]
10
+ if: github.actor == 'dependabot[bot]'
11
+ permissions:
12
+ contents: write
13
+ pull-requests: write
14
+
15
+ steps:
16
+ - name: Get PR metadata
17
+ id: meta
18
+ uses: actions/github-script@v7
19
+ with:
20
+ script: |
21
+ const pr = context.payload.pull_request;
22
+ if (!pr) { core.setOutput('skip', 'true'); return; }
23
+
24
+ const { data: details } = await github.rest.pulls.get({
25
+ owner: context.repo.owner,
26
+ repo: context.repo.repo,
27
+ pull_number: pr.number,
28
+ });
29
+
30
+ // Only auto-merge patch and minor updates (not major)
31
+ const title = details.title;
32
+ const fromMajor = title.match(/from (\d+)\.\d/)?.[1];
33
+ const toMajor = title.match(/to (\d+)\.\d/)?.[1];
34
+ const isMajor = fromMajor !== undefined &&
35
+ toMajor !== undefined &&
36
+ fromMajor !== toMajor;
37
+
38
+ core.setOutput('skip', isMajor ? 'true' : 'false');
39
+ core.setOutput('pr_number', String(pr.number));
40
+
41
+ - name: Approve PR
42
+ if: steps.meta.outputs.skip != 'true'
43
+ uses: actions/github-script@v7
44
+ with:
45
+ script: |
46
+ await github.rest.pulls.createReview({
47
+ owner: context.repo.owner,
48
+ repo: context.repo.repo,
49
+ pull_number: parseInt('${{ steps.meta.outputs.pr_number }}'),
50
+ event: 'APPROVE',
51
+ });
52
+
53
+ - name: Enable auto-merge
54
+ if: steps.meta.outputs.skip != 'true'
55
+ env:
56
+ GH_TOKEN: ${{ github.token }}
57
+ run: gh pr merge --auto --squash ${{ steps.meta.outputs.pr_number }} --repo ${{ github.repository }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wopr-network/platform-core",
3
- "version": "1.14.1",
3
+ "version": "1.14.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",