Skip to content

Commit 6705d6f

Browse files
committed
feat: nested stack as per subnet group
1 parent e91a8d8 commit 6705d6f

File tree

13 files changed

+1295
-830
lines changed

13 files changed

+1295
-830
lines changed

.eslintrc.json

Lines changed: 31 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Auto-approve Dependabot PRs
2+
# Based on GitHub's official documentation for Dependabot automation
3+
4+
name: Dependabot auto-approve
5+
on:
6+
pull_request:
7+
types: [opened, reopened, synchronize]
8+
workflow_run:
9+
workflows: ["Dependabot auto-label"]
10+
types: [completed]
11+
12+
permissions:
13+
pull-requests: write
14+
15+
jobs:
16+
dependabot:
17+
runs-on: arc-runner-set
18+
if: |
19+
(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]') ||
20+
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
steps:
24+
- name: Dependabot metadata
25+
id: metadata
26+
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
27+
with:
28+
github-token: "${{ secrets.GITHUB_TOKEN }}"
29+
30+
- name: Auto-approve and add automerge label for patch updates
31+
if: |
32+
steps.metadata.outputs.update-type == 'version-update:semver-patch' &&
33+
steps.metadata.outputs.update-type != null
34+
run: |
35+
gh pr review --approve "$PR_URL"
36+
gh pr edit "$PR_URL" --add-label "automerge"
37+
env:
38+
PR_URL: ${{github.event.pull_request.html_url}}
39+
40+
- name: Auto-approve and add automerge label for minor updates
41+
if: |
42+
steps.metadata.outputs.update-type == 'version-update:semver-minor' &&
43+
steps.metadata.outputs.update-type != null
44+
run: |
45+
gh pr review --approve "$PR_URL"
46+
gh pr edit "$PR_URL" --add-label "automerge"
47+
env:
48+
PR_URL: ${{github.event.pull_request.html_url}}
49+
50+
- name: Auto-approve and add automerge label for indirect dependencies
51+
if: steps.metadata.outputs.dependency-type == 'indirect'
52+
run: |
53+
gh pr review --approve "$PR_URL"
54+
gh pr edit "$PR_URL" --add-label "automerge"
55+
env:
56+
PR_URL: ${{github.event.pull_request.html_url}}
57+
58+
- name: Comment on major updates (require manual review)
59+
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
60+
run: |
61+
gh pr comment "$PR_URL" --body "⚠️ **Major version update detected** - This requires manual review before approval."
62+
env:
63+
PR_URL: ${{github.event.pull_request.html_url}}
64+
65+
- name: Comment on unknown updates (require manual review)
66+
if: steps.metadata.outputs.update-type == null || steps.metadata.outputs.update-type == ''
67+
run: |
68+
gh pr comment "$PR_URL" --body "❓ **Unknown update type** - This requires manual review before approval."
69+
env:
70+
PR_URL: ${{github.event.pull_request.html_url}}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Auto-label Dependabot PRs based on dependency type and update type
2+
# Based on GitHub's official documentation for Dependabot automation
3+
4+
name: Dependabot auto-label
5+
on:
6+
pull_request:
7+
types: [opened, reopened, synchronize]
8+
9+
permissions:
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
dependabot:
15+
runs-on: arc-runner-set
16+
if: github.event.pull_request.user.login == 'dependabot[bot]'
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
steps:
20+
- name: Dependabot metadata
21+
id: metadata
22+
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
23+
with:
24+
github-token: "${{ secrets.GITHUB_TOKEN }}"
25+
26+
- name: Add production dependency label
27+
if: steps.metadata.outputs.dependency-type == 'direct:production'
28+
run: gh pr edit "$PR_URL" --add-label "production"
29+
env:
30+
PR_URL: ${{github.event.pull_request.html_url}}
31+
32+
- name: Add development dependency label
33+
if: steps.metadata.outputs.dependency-type == 'direct:development'
34+
run: gh pr edit "$PR_URL" --add-label "dev-dependency"
35+
env:
36+
PR_URL: ${{github.event.pull_request.html_url}}
37+
38+
- name: Add indirect dependency label
39+
if: steps.metadata.outputs.dependency-type == 'indirect'
40+
run: gh pr edit "$PR_URL" --add-label "indirect-dependency"
41+
env:
42+
PR_URL: ${{github.event.pull_request.html_url}}
43+
44+
- name: Add patch update label
45+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
46+
run: gh pr edit "$PR_URL" --add-label "patch"
47+
env:
48+
PR_URL: ${{github.event.pull_request.html_url}}
49+
50+
- name: Add minor update label
51+
if: steps.metadata.outputs.update-type == 'version-update:semver-minor'
52+
run: gh pr edit "$PR_URL" --add-label "minor"
53+
env:
54+
PR_URL: ${{github.event.pull_request.html_url}}
55+
56+
- name: Add major update label
57+
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
58+
run: gh pr edit "$PR_URL" --add-label "major"
59+
env:
60+
PR_URL: ${{github.event.pull_request.html_url}}
61+
62+
- name: Add unknown update label
63+
if: steps.metadata.outputs.update-type == null || steps.metadata.outputs.update-type == ''
64+
run: gh pr edit "$PR_URL" --add-label "unknown-update"
65+
env:
66+
PR_URL: ${{github.event.pull_request.html_url}}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Auto-merge Dependabot PRs
2+
# Based on GitHub's official documentation for Dependabot automation
3+
4+
name: Dependabot auto-merge
5+
on:
6+
pull_request:
7+
types: [opened, reopened, synchronize, labeled]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
dependabot:
15+
runs-on: arc-runner-set
16+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'mr-robot-in'
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
steps:
20+
- name: Dependabot metadata
21+
id: metadata
22+
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
23+
with:
24+
github-token: "${{ secrets.GITHUB_TOKEN }}"
25+
26+
- name: Enable auto-merge for patch updates
27+
if: |
28+
steps.metadata.outputs.update-type == 'version-update:semver-patch' &&
29+
contains(github.event.pull_request.labels.*.name, 'automerge') &&
30+
steps.metadata.outputs.update-type != null
31+
run: gh pr merge --auto --merge "$PR_URL"
32+
env:
33+
PR_URL: ${{github.event.pull_request.html_url}}
34+
35+
- name: Enable auto-merge for minor updates
36+
if: |
37+
steps.metadata.outputs.update-type == 'version-update:semver-minor' &&
38+
contains(github.event.pull_request.labels.*.name, 'automerge') &&
39+
steps.metadata.outputs.update-type != null
40+
run: gh pr merge --auto --merge "$PR_URL"
41+
env:
42+
PR_URL: ${{github.event.pull_request.html_url}}
43+
44+
- name: Enable auto-merge for indirect dependencies
45+
if: |
46+
steps.metadata.outputs.dependency-type == 'indirect' &&
47+
contains(github.event.pull_request.labels.*.name, 'automerge')
48+
run: gh pr merge --auto --merge "$PR_URL"
49+
env:
50+
PR_URL: ${{github.event.pull_request.html_url}}
51+
52+
- name: Comment on major updates (no auto-merge)
53+
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
54+
run: |
55+
gh pr comment "$PR_URL" --body "🚨 **Major version update** - Auto-merge disabled for major updates. Please review manually."
56+
env:
57+
PR_URL: ${{github.event.pull_request.html_url}}
58+
59+
- name: Comment on unknown updates (no auto-merge)
60+
if: steps.metadata.outputs.update-type == null || steps.metadata.outputs.update-type == ''
61+
run: |
62+
gh pr comment "$PR_URL" --body "❓ **Unknown update type** - Auto-merge disabled. Please review manually."
63+
env:
64+
PR_URL: ${{github.event.pull_request.html_url}}

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)