@wopr-network/platform-core 1.14.1 → 1.14.2

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,49 @@ 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 isMajor = /from \d+ to \d+/.test(title) &&
33
+ title.match(/from (\d+)/)?.[ 1] !== title.match(/to (\d+)/)?.[ 1];
34
+
35
+ core.setOutput('skip', isMajor ? 'true' : 'false');
36
+ core.setOutput('pr_number', String(pr.number));
37
+
38
+ - name: Approve PR
39
+ if: steps.meta.outputs.skip != 'true'
40
+ uses: actions/github-script@v7
41
+ with:
42
+ script: |
43
+ await github.rest.pulls.createReview({
44
+ owner: context.repo.owner,
45
+ repo: context.repo.repo,
46
+ pull_number: parseInt('${{ steps.meta.outputs.pr_number }}'),
47
+ event: 'APPROVE',
48
+ });
49
+
50
+ - name: Enable auto-merge
51
+ if: steps.meta.outputs.skip != 'true'
52
+ env:
53
+ GH_TOKEN: ${{ github.token }}
54
+ run: gh pr merge --auto --squash ${{ steps.meta.outputs.pr_number }} || true
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.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",