nullforge 0.1.0__tar.gz
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.
- nullforge-0.1.0/.gitattributes +1 -0
- nullforge-0.1.0/.github/CODEOWNERS +1 -0
- nullforge-0.1.0/.github/CONTRIBUTING.md +124 -0
- nullforge-0.1.0/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml +49 -0
- nullforge-0.1.0/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yaml +31 -0
- nullforge-0.1.0/.github/ISSUE_TEMPLATE/config.yaml +1 -0
- nullforge-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +47 -0
- nullforge-0.1.0/.github/dependabot.yml +43 -0
- nullforge-0.1.0/.github/labeler.yaml +50 -0
- nullforge-0.1.0/.github/labels.yaml +89 -0
- nullforge-0.1.0/.github/release.yaml +49 -0
- nullforge-0.1.0/.github/workflows/check-commit-message-pr.yaml +93 -0
- nullforge-0.1.0/.github/workflows/ci-code-quality.yaml +80 -0
- nullforge-0.1.0/.github/workflows/ci-tests.yaml +68 -0
- nullforge-0.1.0/.github/workflows/label-prs.yaml +31 -0
- nullforge-0.1.0/.github/workflows/labels.yaml +27 -0
- nullforge-0.1.0/.github/workflows/release-please.yaml +199 -0
- nullforge-0.1.0/.gitignore +224 -0
- nullforge-0.1.0/.pre-commit-config.yaml +42 -0
- nullforge-0.1.0/.release-please-manifest.json +3 -0
- nullforge-0.1.0/CHANGELOG.md +22 -0
- nullforge-0.1.0/CODE_OF_CONDUCT.md +128 -0
- nullforge-0.1.0/LICENSE +7 -0
- nullforge-0.1.0/PKG-INFO +39 -0
- nullforge-0.1.0/README.md +23 -0
- nullforge-0.1.0/nullforge/__init__.py +1 -0
- nullforge-0.1.0/nullforge/foundry/README.md +0 -0
- nullforge-0.1.0/nullforge/foundry/__init__.py +7 -0
- nullforge-0.1.0/nullforge/foundry/full_cast.py +22 -0
- nullforge-0.1.0/nullforge/inventories/README.md +0 -0
- nullforge-0.1.0/nullforge/inventories/example.py +87 -0
- nullforge-0.1.0/nullforge/models/__init__.py +1 -0
- nullforge-0.1.0/nullforge/models/containers.py +60 -0
- nullforge-0.1.0/nullforge/models/dns.py +222 -0
- nullforge-0.1.0/nullforge/models/monitoring/__init__.py +29 -0
- nullforge-0.1.0/nullforge/models/monitoring/base.py +19 -0
- nullforge-0.1.0/nullforge/models/monitoring/nezha.py +13 -0
- nullforge-0.1.0/nullforge/models/netsec.py +43 -0
- nullforge-0.1.0/nullforge/models/profiles.py +33 -0
- nullforge-0.1.0/nullforge/models/system.py +15 -0
- nullforge-0.1.0/nullforge/models/users.py +9 -0
- nullforge-0.1.0/nullforge/models/warp.py +65 -0
- nullforge-0.1.0/nullforge/models/zerotrust.py +9 -0
- nullforge-0.1.0/nullforge/molds/__init__.py +38 -0
- nullforge-0.1.0/nullforge/molds/base_mold.py +59 -0
- nullforge-0.1.0/nullforge/molds/containers.py +26 -0
- nullforge-0.1.0/nullforge/molds/defaults.py +10 -0
- nullforge-0.1.0/nullforge/molds/dns.py +70 -0
- nullforge-0.1.0/nullforge/molds/features.py +75 -0
- nullforge-0.1.0/nullforge/molds/haproxy.py +23 -0
- nullforge-0.1.0/nullforge/molds/monitoring/__init__.py +45 -0
- nullforge-0.1.0/nullforge/molds/monitoring/nezha.py +118 -0
- nullforge-0.1.0/nullforge/molds/netsec.py +237 -0
- nullforge-0.1.0/nullforge/molds/profiles.py +30 -0
- nullforge-0.1.0/nullforge/molds/system.py +140 -0
- nullforge-0.1.0/nullforge/molds/telemt.py +140 -0
- nullforge-0.1.0/nullforge/molds/tor.py +28 -0
- nullforge-0.1.0/nullforge/molds/user.py +77 -0
- nullforge-0.1.0/nullforge/molds/utils.py +115 -0
- nullforge-0.1.0/nullforge/molds/warp.py +54 -0
- nullforge-0.1.0/nullforge/molds/xray.py +16 -0
- nullforge-0.1.0/nullforge/molds/zerotrust.py +59 -0
- nullforge-0.1.0/nullforge/runes/__init__.py +46 -0
- nullforge-0.1.0/nullforge/runes/base.py +327 -0
- nullforge-0.1.0/nullforge/runes/containers.py +212 -0
- nullforge-0.1.0/nullforge/runes/dns.py +256 -0
- nullforge-0.1.0/nullforge/runes/haproxy.py +135 -0
- nullforge-0.1.0/nullforge/runes/monitoring.py +21 -0
- nullforge-0.1.0/nullforge/runes/netsec.py +547 -0
- nullforge-0.1.0/nullforge/runes/prepare.py +30 -0
- nullforge-0.1.0/nullforge/runes/profiles.py +583 -0
- nullforge-0.1.0/nullforge/runes/telemt.py +252 -0
- nullforge-0.1.0/nullforge/runes/tor.py +57 -0
- nullforge-0.1.0/nullforge/runes/users.py +159 -0
- nullforge-0.1.0/nullforge/runes/warp.py +273 -0
- nullforge-0.1.0/nullforge/runes/xray.py +81 -0
- nullforge-0.1.0/nullforge/runes/zerotrust.py +91 -0
- nullforge-0.1.0/nullforge/smithy/__init__.py +1 -0
- nullforge-0.1.0/nullforge/smithy/admin.py +40 -0
- nullforge-0.1.0/nullforge/smithy/arch.py +36 -0
- nullforge-0.1.0/nullforge/smithy/blocky.py +37 -0
- nullforge-0.1.0/nullforge/smithy/cloudflare.py +32 -0
- nullforge-0.1.0/nullforge/smithy/github.py +256 -0
- nullforge-0.1.0/nullforge/smithy/http.py +85 -0
- nullforge-0.1.0/nullforge/smithy/install.py +149 -0
- nullforge-0.1.0/nullforge/smithy/monitoring/__init__.py +1 -0
- nullforge-0.1.0/nullforge/smithy/monitoring/nezha/__init__.py +0 -0
- nullforge-0.1.0/nullforge/smithy/monitoring/nezha/agent.py +54 -0
- nullforge-0.1.0/nullforge/smithy/monitoring/nezha/dashboard.py +137 -0
- nullforge-0.1.0/nullforge/smithy/monitoring/nezha/deploy.py +81 -0
- nullforge-0.1.0/nullforge/smithy/network.py +95 -0
- nullforge-0.1.0/nullforge/smithy/packages.py +176 -0
- nullforge-0.1.0/nullforge/smithy/service.py +37 -0
- nullforge-0.1.0/nullforge/smithy/sni.py +358 -0
- nullforge-0.1.0/nullforge/smithy/swap.py +132 -0
- nullforge-0.1.0/nullforge/smithy/system.py +86 -0
- nullforge-0.1.0/nullforge/smithy/versions.py +282 -0
- nullforge-0.1.0/nullforge/templates/__init__.py +32 -0
- nullforge-0.1.0/nullforge/templates/cloudflared/tunnel.yml.j2 +6 -0
- nullforge-0.1.0/nullforge/templates/dns/blocky.yaml.j2 +11 -0
- nullforge-0.1.0/nullforge/templates/dns/dns.yaml.j2 +6 -0
- nullforge-0.1.0/nullforge/templates/dns/resolv.conf.j2 +1 -0
- nullforge-0.1.0/nullforge/templates/dns/resolved.conf.j2 +13 -0
- nullforge-0.1.0/nullforge/templates/etc/default/zramswap.j2 +13 -0
- nullforge-0.1.0/nullforge/templates/nvim/nvim_patch.lua.j2 +5 -0
- nullforge-0.1.0/nullforge/templates/profiles/direnv.toml +2 -0
- nullforge-0.1.0/nullforge/templates/profiles/starship.toml +186 -0
- nullforge-0.1.0/nullforge/templates/profiles/tmux.conf +32 -0
- nullforge-0.1.0/nullforge/templates/profiles/zshrc.j2 +46 -0
- nullforge-0.1.0/nullforge/templates/scripts/telemt-synfix.sh +89 -0
- nullforge-0.1.0/nullforge/templates/scripts/teleproxy-warp.sh +127 -0
- nullforge-0.1.0/nullforge/templates/scripts/warp-v6-policy.sh +118 -0
- nullforge-0.1.0/nullforge/templates/scripts/zt-tunnel-warp.sh +28 -0
- nullforge-0.1.0/nullforge/templates/systemd/blocky.service.j2 +19 -0
- nullforge-0.1.0/nullforge/templates/systemd/cloudflare-tunnel.service.j2 +27 -0
- nullforge-0.1.0/nullforge/templates/systemd/cloudflare-warp.service.j2 +21 -0
- nullforge-0.1.0/nullforge/templates/systemd/dns-internal.service.j2 +15 -0
- nullforge-0.1.0/nullforge/templates/systemd/telemt.service.j2 +36 -0
- nullforge-0.1.0/nullforge/templates/telemt/telemt.toml.j2 +49 -0
- nullforge-0.1.0/nullforge/templates/tor/torrc.j2 +5 -0
- nullforge-0.1.0/pyproject.toml +44 -0
- nullforge-0.1.0/release-please-config.json +18 -0
- nullforge-0.1.0/uv.lock +662 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @wlix13
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Contribution Guidelines
|
|
2
|
+
|
|
3
|
+
First of all, thank you for your interest in the project.
|
|
4
|
+
|
|
5
|
+
Regardless of whether you are thinking about creating an issue or opening a pull request, I truly appreciate the help.
|
|
6
|
+
Without communication, I cannot know what the community wants, what they use or how they use it.
|
|
7
|
+
Pull requests and issues are exactly what gives me the visibility I need, so thank you.
|
|
8
|
+
|
|
9
|
+
## Getting started
|
|
10
|
+
|
|
11
|
+
While following the exact process is neither mandatory nor enforced, it is recommended to try following it as it may help avoid wasted efforts.
|
|
12
|
+
|
|
13
|
+
### Creating an issue
|
|
14
|
+
|
|
15
|
+
Whether you have a **question**, found a **bug**, would like to see a **new feature** added or anything along those lines, creating an issue is
|
|
16
|
+
going to be the first step. The issue templates will help guide you, but simply creating an issue with the reason for the creation
|
|
17
|
+
of said issue is perfectly fine.
|
|
18
|
+
|
|
19
|
+
Furthermore, if you don't want to fix the problem or implement the feature yourself, that's completely fine.
|
|
20
|
+
Creating an issue alone will give both the maintainers as well as the other members of the community visibility on said issue,
|
|
21
|
+
which is a lot more likely to get the issue resolved than if the problem/request was left untold.
|
|
22
|
+
|
|
23
|
+
### Solving an issue
|
|
24
|
+
|
|
25
|
+
Looking to contribute? Awesome! Look through the open issues in the repository, preferably those that are already labelled.
|
|
26
|
+
|
|
27
|
+
If you found one that interests you, try to make sure nobody's already working on it.
|
|
28
|
+
Adding a comment to the issue asking the maintainer if you can tackle it is a perfectly acceptable way of doing that!
|
|
29
|
+
|
|
30
|
+
If there's no issue yet for what you want to solve, start by [Creating an issue](#creating-an-issue), specify
|
|
31
|
+
you'd like to take a shot at solving it, and finally, wait for the maintainer to comment on the issue.
|
|
32
|
+
|
|
33
|
+
You don't _have_ to wait for the maintainer to comment on the issue before starting to work on it if you're sure that there's no other
|
|
34
|
+
similar existing issues, open or closed, but if the maintainer has commented, it means the maintainer has, based on the comment itself,
|
|
35
|
+
acknowledged the issue.
|
|
36
|
+
|
|
37
|
+
## Development Setup
|
|
38
|
+
|
|
39
|
+
### Package Management
|
|
40
|
+
|
|
41
|
+
This project **only** supports the `uv` installation method. Other tools, such as `conda`
|
|
42
|
+
or `pip`, don't provide any guarantees that they will install the correct
|
|
43
|
+
dependency versions. You will almost certainly have _random bugs, error messages,_, and other problems if you don't use `uv`.
|
|
44
|
+
Please _do not report any issues_ if you use non-standard installations, since almost all such issues are invalid.
|
|
45
|
+
|
|
46
|
+
Furthermore, `uv` is [up to 115x faster](https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md)
|
|
47
|
+
than `pip`, which is another _great_ reason to embrace the new industry-standard
|
|
48
|
+
for Python project management.
|
|
49
|
+
|
|
50
|
+
**Quick & Easy Installation Method:**
|
|
51
|
+
|
|
52
|
+
There are many convenient ways to install the uv command on your computer. Please check the link below to see all options.
|
|
53
|
+
|
|
54
|
+
[Installation Guide](https://docs.astral.sh/uv/getting-started/installation/)
|
|
55
|
+
|
|
56
|
+
Alternatively, if you want a very quick and easy method, you can install it as follows:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install -U uv
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Pre-commit Hooks (via prek)
|
|
63
|
+
|
|
64
|
+
This project uses pre-commit hooks to ensure code quality and consistency. Before making any commits, please install and set up prek:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Install prek (if not already installed)
|
|
68
|
+
uv tool install prek
|
|
69
|
+
# or use with uv run (as dev environment already has it covered)
|
|
70
|
+
uv run prek
|
|
71
|
+
|
|
72
|
+
# Install the pre-commit hooks
|
|
73
|
+
prek install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The pre-commit hooks will automatically run on each commit to check for:
|
|
77
|
+
|
|
78
|
+
- Code formatting
|
|
79
|
+
- Linting issues
|
|
80
|
+
- Other quality checks
|
|
81
|
+
|
|
82
|
+
If any hooks fail, please fix the issues before committing. You can manually run all hooks with:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
prek run --all-files
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Commits
|
|
89
|
+
|
|
90
|
+
All commits are expected to follow the conventional commits specification.
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
<type>[scope]: <description>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
It's not a really big deal if you don't, but the commits in your PR might be squashed into a single commit
|
|
97
|
+
with the appropriate format at the reviewer's discretion.
|
|
98
|
+
|
|
99
|
+
Here's a few examples of good commit messages:
|
|
100
|
+
|
|
101
|
+
- `feat(api): Add endpoint to retrieve images`
|
|
102
|
+
- `fix(alerting): Remove bad parameter from Slack alerting provider`
|
|
103
|
+
- `test(security): Add tests for basic auth with bcrypt`
|
|
104
|
+
- `docs: Add paragraph on running the application locally`
|
|
105
|
+
|
|
106
|
+
## Pull requests
|
|
107
|
+
|
|
108
|
+
The **pull request title** should be a short, meaningful summary of the change as a
|
|
109
|
+
whole, written in the imperative mood. GitHub pre-fills it with your first commit
|
|
110
|
+
message — please replace that with something descriptive. Examples:
|
|
111
|
+
|
|
112
|
+
- `Add tor rune with bridge support`
|
|
113
|
+
- `Improve CI/CD caching and test matrix`
|
|
114
|
+
- `Fix swap sizing on small hosts`
|
|
115
|
+
|
|
116
|
+
A good title reads cleanly in the PR list and the project history. The individual
|
|
117
|
+
**commits** inside the PR still follow Conventional Commits (see [Commits](#commits));
|
|
118
|
+
because PRs are merged with a merge/rebase strategy, those commit messages — not the
|
|
119
|
+
title — drive the release changelog, so the title itself does not need a `type:` prefix.
|
|
120
|
+
|
|
121
|
+
PRs are labelled automatically from the files they touch (e.g. `runes`, `molds`,
|
|
122
|
+
`ci-cd`, `docs`) and from the **Type of change** checklist in the PR template — tick the
|
|
123
|
+
boxes that apply and the matching `feature` / `bug` / `enhancement` / `refactor` /
|
|
124
|
+
`breaking-change` / `security` label is added. Dependabot PRs are labelled `dependencies`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: "Bug report"
|
|
2
|
+
description: "Found something that's not working as expected? Provide detailed information about the issue to help get it resolved."
|
|
3
|
+
labels:
|
|
4
|
+
- bug
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- id: description
|
|
8
|
+
type: textarea
|
|
9
|
+
validations:
|
|
10
|
+
required: true
|
|
11
|
+
attributes:
|
|
12
|
+
label: "Describe the bug"
|
|
13
|
+
description: "Tell what went wrong and how it's affecting your work."
|
|
14
|
+
|
|
15
|
+
- id: what-you-see
|
|
16
|
+
type: textarea
|
|
17
|
+
attributes:
|
|
18
|
+
label: "What do you see?"
|
|
19
|
+
description: "Share what's actually happening - error messages, unexpected behavior, or missing functionality. Screenshots are welcome!"
|
|
20
|
+
|
|
21
|
+
- id: what-you-expect
|
|
22
|
+
type: textarea
|
|
23
|
+
attributes:
|
|
24
|
+
label: "What do you expect to see?"
|
|
25
|
+
description: "Describe the intended behavior - what should have happened instead?"
|
|
26
|
+
|
|
27
|
+
- id: steps-to-reproduce
|
|
28
|
+
type: textarea
|
|
29
|
+
validations:
|
|
30
|
+
required: false
|
|
31
|
+
attributes:
|
|
32
|
+
label: "List the steps that must be taken to reproduce this issue"
|
|
33
|
+
description: "Provide exact steps to recreate this bug. Include any code snippets, configuration files, or commands used. The easier it is to reproduce, the quicker it can be fixed!"
|
|
34
|
+
placeholder: |
|
|
35
|
+
1. Run `nullforge cast -i inventory.py -r dns`
|
|
36
|
+
2. Inspect the deploy output or the target host state
|
|
37
|
+
3. Observe unexpected output or error
|
|
38
|
+
|
|
39
|
+
- id: version
|
|
40
|
+
type: input
|
|
41
|
+
attributes:
|
|
42
|
+
label: "Version"
|
|
43
|
+
description: "Which version of NullForge are you using? (check the release tags or pyproject.toml if unsure)"
|
|
44
|
+
|
|
45
|
+
- id: additional-information
|
|
46
|
+
type: textarea
|
|
47
|
+
attributes:
|
|
48
|
+
label: "Additional information"
|
|
49
|
+
description: "Anything else that might help solve this? Environment details, related issues, or workarounds you've tried."
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: "Feature request"
|
|
2
|
+
description: "Have an idea that could improve this project? Share your suggestion and help shape the future development."
|
|
3
|
+
labels:
|
|
4
|
+
- feature
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- id: description
|
|
8
|
+
type: textarea
|
|
9
|
+
validations:
|
|
10
|
+
required: true
|
|
11
|
+
attributes:
|
|
12
|
+
label: "Describe the feature request"
|
|
13
|
+
description: "Describe the feature or improvement you'd like to see. Be as specific as possible about what it should do and how it should work."
|
|
14
|
+
|
|
15
|
+
- id: reason
|
|
16
|
+
type: textarea
|
|
17
|
+
attributes:
|
|
18
|
+
label: "Why would this feature be valuable?"
|
|
19
|
+
description: "Explain the problem this feature would solve or the benefit it would provide. Include use cases or scenarios where this would be helpful."
|
|
20
|
+
|
|
21
|
+
- id: usage-duration
|
|
22
|
+
type: input
|
|
23
|
+
attributes:
|
|
24
|
+
label: "How long have you been using this project?"
|
|
25
|
+
description: "This helps provide context for your request. Feel free to skip if you prefer not to answer."
|
|
26
|
+
|
|
27
|
+
- id: additional-information
|
|
28
|
+
type: textarea
|
|
29
|
+
attributes:
|
|
30
|
+
label: "Additional information"
|
|
31
|
+
description: "Any other details that might be relevant? Similar features in other tools, implementation ideas, or potential challenges to consider."
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
PR TITLE: write a short, meaningful summary of the change as a whole, in the
|
|
3
|
+
imperative mood - don't leave the auto-filled first-commit message. Examples:
|
|
4
|
+
* Add tor rune with bridge support
|
|
5
|
+
* Improve CI/CD caching and test matrix
|
|
6
|
+
* Fix swap sizing on small hosts
|
|
7
|
+
Individual commits should still follow Conventional Commits (see CONTRIBUTING.md);
|
|
8
|
+
on merge/rebase those commits drive the release changelog.
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
## Type of change
|
|
12
|
+
|
|
13
|
+
<!-- Please check all that apply - this drives the PR's type labels. -->
|
|
14
|
+
|
|
15
|
+
- [ ] **Bug fix** (fixes an issue in a rune, mold or deploy behaviour)
|
|
16
|
+
- [ ] **Feature** (adds a new rune, mold or CLI capability)
|
|
17
|
+
- [ ] **Enhancement** (improves existing provisioning logic or output)
|
|
18
|
+
- [ ] **Refactor** (restructures code without changing behaviour)
|
|
19
|
+
- [ ] **Breaking change** (changes existing mold schemas, CLI usage, or deploy behaviour)
|
|
20
|
+
- [ ] **Security** (security-related fix or hardening)
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
### Why is this change needed?
|
|
25
|
+
|
|
26
|
+
<!-- Explain the motivation and context for this change -->
|
|
27
|
+
|
|
28
|
+
### Related Issues
|
|
29
|
+
|
|
30
|
+
<!-- Link to related issues using "Fixes #123", "Closes #123", or "Relates to #123" -->
|
|
31
|
+
|
|
32
|
+
## Testing
|
|
33
|
+
|
|
34
|
+
<!-- Describe how you tested your changes -->
|
|
35
|
+
|
|
36
|
+
- [ ] Unit tests added or updated (`uv run poe tests`)
|
|
37
|
+
- [ ] Deployed to a real host
|
|
38
|
+
- [ ] No testing required (documentation changes only)
|
|
39
|
+
|
|
40
|
+
## Checklist
|
|
41
|
+
|
|
42
|
+
<!-- Ensure all applicable items are completed before requesting review -->
|
|
43
|
+
|
|
44
|
+
- [ ] Code follows project style guidelines
|
|
45
|
+
- [ ] Self-review completed
|
|
46
|
+
- [ ] Linter and type checker pass (`uv run poe check`)
|
|
47
|
+
- [ ] Documentation updated (if applicable)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "chore"
|
|
9
|
+
include: "scope"
|
|
10
|
+
labels:
|
|
11
|
+
- "dependencies"
|
|
12
|
+
groups:
|
|
13
|
+
actions:
|
|
14
|
+
patterns:
|
|
15
|
+
- "*"
|
|
16
|
+
|
|
17
|
+
- package-ecosystem: "uv"
|
|
18
|
+
directory: "/"
|
|
19
|
+
schedule:
|
|
20
|
+
interval: "weekly"
|
|
21
|
+
commit-message:
|
|
22
|
+
prefix: "chore"
|
|
23
|
+
include: "scope"
|
|
24
|
+
labels:
|
|
25
|
+
- "dependencies"
|
|
26
|
+
groups:
|
|
27
|
+
python-deps:
|
|
28
|
+
patterns:
|
|
29
|
+
- "*"
|
|
30
|
+
|
|
31
|
+
- package-ecosystem: "pre-commit"
|
|
32
|
+
directory: "/"
|
|
33
|
+
schedule:
|
|
34
|
+
interval: "weekly"
|
|
35
|
+
commit-message:
|
|
36
|
+
prefix: "chore"
|
|
37
|
+
include: "scope"
|
|
38
|
+
labels:
|
|
39
|
+
- "dependencies"
|
|
40
|
+
groups:
|
|
41
|
+
pre-commit:
|
|
42
|
+
patterns:
|
|
43
|
+
- "*"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
labels:
|
|
3
|
+
# --- by PR "Type of change" checklist ---
|
|
4
|
+
- label: "feature"
|
|
5
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Feature\b'
|
|
6
|
+
- label: "bug"
|
|
7
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Bug fix\b'
|
|
8
|
+
- label: "enhancement"
|
|
9
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Enhancement\b'
|
|
10
|
+
- label: "refactor"
|
|
11
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Refactor\b'
|
|
12
|
+
- label: "breaking-change"
|
|
13
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Breaking change\b'
|
|
14
|
+
- label: "security"
|
|
15
|
+
body: '(?m)^\s*-\s*\[[xX]\]\s+\**Security\b'
|
|
16
|
+
|
|
17
|
+
# --- by changed paths ---
|
|
18
|
+
- label: "docs"
|
|
19
|
+
files:
|
|
20
|
+
- '^README\.md$'
|
|
21
|
+
- "^docs/"
|
|
22
|
+
- label: "ci-cd"
|
|
23
|
+
files:
|
|
24
|
+
- '^\.github/'
|
|
25
|
+
- label: "tests"
|
|
26
|
+
files:
|
|
27
|
+
- "^tests/"
|
|
28
|
+
- label: "dependencies"
|
|
29
|
+
files:
|
|
30
|
+
- '^uv\.lock$'
|
|
31
|
+
- label: "molds"
|
|
32
|
+
files:
|
|
33
|
+
- "^nullforge/molds/"
|
|
34
|
+
- "^nullforge/models/"
|
|
35
|
+
- label: "runes"
|
|
36
|
+
files:
|
|
37
|
+
- "^nullforge/runes/"
|
|
38
|
+
- label: "smithy"
|
|
39
|
+
files:
|
|
40
|
+
- "^nullforge/smithy/"
|
|
41
|
+
- label: "foundry"
|
|
42
|
+
files:
|
|
43
|
+
- "^nullforge/foundry/"
|
|
44
|
+
- "^nullforge/inventories/"
|
|
45
|
+
- label: "templates"
|
|
46
|
+
files:
|
|
47
|
+
- "^nullforge/templates/"
|
|
48
|
+
- label: "cli"
|
|
49
|
+
files:
|
|
50
|
+
- "^nullforge/cli/"
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Core Labels
|
|
2
|
+
- name: "bug"
|
|
3
|
+
description: "Something is not working"
|
|
4
|
+
color: "d73a4a"
|
|
5
|
+
|
|
6
|
+
- name: "feature"
|
|
7
|
+
description: "New feature or request"
|
|
8
|
+
color: "a2eeef"
|
|
9
|
+
|
|
10
|
+
- name: "enhancement"
|
|
11
|
+
description: "Improvement to existing functionality"
|
|
12
|
+
color: "0e8a16"
|
|
13
|
+
|
|
14
|
+
- name: "docs"
|
|
15
|
+
description: "Documentation updates"
|
|
16
|
+
color: "0075ca"
|
|
17
|
+
|
|
18
|
+
- name: "breaking-change"
|
|
19
|
+
description: "Breaking changes"
|
|
20
|
+
color: "b60205"
|
|
21
|
+
|
|
22
|
+
- name: "core"
|
|
23
|
+
description: "Core & Architecture changes"
|
|
24
|
+
color: "006b75"
|
|
25
|
+
|
|
26
|
+
- name: "molds"
|
|
27
|
+
description: "Configuration molds and domain models"
|
|
28
|
+
color: "1d76db"
|
|
29
|
+
|
|
30
|
+
- name: "runes"
|
|
31
|
+
description: "Provisioning runes"
|
|
32
|
+
color: "fbca04"
|
|
33
|
+
|
|
34
|
+
- name: "smithy"
|
|
35
|
+
description: "Cross-distro helpers and shared provisioning logic"
|
|
36
|
+
color: "bfdadc"
|
|
37
|
+
|
|
38
|
+
- name: "foundry"
|
|
39
|
+
description: "Foundry entrypoints and inventories"
|
|
40
|
+
color: "5319e7"
|
|
41
|
+
|
|
42
|
+
- name: "templates"
|
|
43
|
+
description: "Templates updates"
|
|
44
|
+
color: "c2e0c6"
|
|
45
|
+
|
|
46
|
+
- name: "security"
|
|
47
|
+
description: "Security-related changes"
|
|
48
|
+
color: "ee0701"
|
|
49
|
+
|
|
50
|
+
- name: "refactor"
|
|
51
|
+
description: "Code refactoring"
|
|
52
|
+
color: "cccccc"
|
|
53
|
+
|
|
54
|
+
- name: "cli"
|
|
55
|
+
description: "CLI & Commands"
|
|
56
|
+
color: "f9d0c4"
|
|
57
|
+
|
|
58
|
+
- name: "tests"
|
|
59
|
+
description: "Testing"
|
|
60
|
+
color: "e99695"
|
|
61
|
+
|
|
62
|
+
- name: "ci-cd"
|
|
63
|
+
description: "CI/CD and automation"
|
|
64
|
+
color: "0052cc"
|
|
65
|
+
|
|
66
|
+
- name: "dependencies"
|
|
67
|
+
description: "Changes to dependencies"
|
|
68
|
+
color: "a569bd"
|
|
69
|
+
|
|
70
|
+
- name: "automated"
|
|
71
|
+
description: "Automated changes (bots, scheduled workflows)"
|
|
72
|
+
color: "ededed"
|
|
73
|
+
|
|
74
|
+
- name: "skip-changelog"
|
|
75
|
+
description: "Exclude from changelog"
|
|
76
|
+
color: "d4c5f9"
|
|
77
|
+
|
|
78
|
+
# PR Labels
|
|
79
|
+
- name: "duplicate"
|
|
80
|
+
description: "This issue or PR already exists"
|
|
81
|
+
color: "cfd3d7"
|
|
82
|
+
|
|
83
|
+
- name: "invalid"
|
|
84
|
+
description: "This doesn't seem right"
|
|
85
|
+
color: "e4e669"
|
|
86
|
+
|
|
87
|
+
- name: "wontfix"
|
|
88
|
+
description: "This will not be worked on"
|
|
89
|
+
color: "ffffff"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
exclude:
|
|
3
|
+
labels:
|
|
4
|
+
- duplicate
|
|
5
|
+
- invalid
|
|
6
|
+
- wontfix
|
|
7
|
+
- skip-changelog
|
|
8
|
+
authors:
|
|
9
|
+
- dependabot
|
|
10
|
+
- dependabot[bot]
|
|
11
|
+
- github-actions[bot]
|
|
12
|
+
- renovate[bot]
|
|
13
|
+
|
|
14
|
+
categories:
|
|
15
|
+
- title: 💥 Breaking Changes
|
|
16
|
+
labels:
|
|
17
|
+
- breaking-change
|
|
18
|
+
- title: ✨ Features & Enhancements
|
|
19
|
+
labels:
|
|
20
|
+
- feature
|
|
21
|
+
- enhancement
|
|
22
|
+
- title: 🐛 Bug Fixes
|
|
23
|
+
labels:
|
|
24
|
+
- bug
|
|
25
|
+
- title: 🏗️ Core & Architecture
|
|
26
|
+
labels:
|
|
27
|
+
- core
|
|
28
|
+
- refactor
|
|
29
|
+
- title: ⚙️ CLI & Commands
|
|
30
|
+
labels:
|
|
31
|
+
- cli
|
|
32
|
+
- title: 📝 Templates
|
|
33
|
+
labels:
|
|
34
|
+
- templates
|
|
35
|
+
- title: 🔧 CI
|
|
36
|
+
labels:
|
|
37
|
+
- ci-cd
|
|
38
|
+
- title: 📚 Documentation
|
|
39
|
+
labels:
|
|
40
|
+
- docs
|
|
41
|
+
- title: 📦 Dependencies
|
|
42
|
+
labels:
|
|
43
|
+
- dependencies
|
|
44
|
+
- title: 🧪 Testing
|
|
45
|
+
labels:
|
|
46
|
+
- tests
|
|
47
|
+
- title: 📝 Other
|
|
48
|
+
labels:
|
|
49
|
+
- "*"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: 🔍 Check commit message in PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- edited
|
|
8
|
+
- reopened
|
|
9
|
+
- synchronize
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pull-requests: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
check-commit-message:
|
|
17
|
+
name: 🔍 Check commit message in PR
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 5
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
with:
|
|
24
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
|
|
27
|
+
- name: Check for fixup commits
|
|
28
|
+
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0
|
|
29
|
+
with:
|
|
30
|
+
pattern: "^(?!fixup!).*$"
|
|
31
|
+
flags: "si"
|
|
32
|
+
excludeDescription: "true"
|
|
33
|
+
excludeTitle: "false"
|
|
34
|
+
checkAllCommitMessages: "true"
|
|
35
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
+
error: |
|
|
37
|
+
Fixup commits are not allowed in pull requests.
|
|
38
|
+
|
|
39
|
+
Found commit message starting with "fixup!" which must be squashed before merging.
|
|
40
|
+
|
|
41
|
+
To squash fixup commits, use:
|
|
42
|
+
git rebase -i --autosquash origin/${{ github.event.pull_request.base.ref }}
|
|
43
|
+
|
|
44
|
+
Or manually squash the fixup commits with their target commits.
|
|
45
|
+
|
|
46
|
+
After squashing, force push the updated branch:
|
|
47
|
+
git push --force-with-lease origin ${{ github.event.pull_request.head.ref }}
|
|
48
|
+
|
|
49
|
+
- name: Check for Cyrillic characters
|
|
50
|
+
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0
|
|
51
|
+
with:
|
|
52
|
+
pattern: "^[^А-Яа-яёЁ]*$"
|
|
53
|
+
flags: "si"
|
|
54
|
+
excludeDescription: "false"
|
|
55
|
+
excludeTitle: "false"
|
|
56
|
+
checkAllCommitMessages: "true"
|
|
57
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
58
|
+
error: |
|
|
59
|
+
The commit message must contain only Latin characters.
|
|
60
|
+
Ensure there are no Cyrillic characters in the commit title or description.
|
|
61
|
+
|
|
62
|
+
- name: Check for conventional commit message
|
|
63
|
+
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0
|
|
64
|
+
with:
|
|
65
|
+
pattern: '^((feat|fix|build|chore|ci|docs|refactor|perf|style|test|revert)(\([\w\/-]+\))?!?: [^\n]+(\n\n(BREAKING CHANGE: [^\n]+|.+))?)$'
|
|
66
|
+
flags: "si"
|
|
67
|
+
excludeDescription: "true"
|
|
68
|
+
excludeTitle: "true"
|
|
69
|
+
checkAllCommitMessages: "true"
|
|
70
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
71
|
+
error: |
|
|
72
|
+
The commit message does not follow the conventional commit format.
|
|
73
|
+
|
|
74
|
+
A conventional commit message should be in the format:
|
|
75
|
+
<type>[optional scope]: <description>
|
|
76
|
+
|
|
77
|
+
[optional body]
|
|
78
|
+
|
|
79
|
+
[optional BREAKING CHANGE footer]
|
|
80
|
+
|
|
81
|
+
Example:
|
|
82
|
+
feat(api): add new endpoint
|
|
83
|
+
|
|
84
|
+
Or for a breaking change:
|
|
85
|
+
feat!: send an email to the customer
|
|
86
|
+
|
|
87
|
+
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
|
|
88
|
+
|
|
89
|
+
Allowed types are: feat, fix, build, chore, ci, docs, refactor, perf, style, test, revert.
|
|
90
|
+
A '!' can be added after the type/scope for breaking changes (e.g., feat!:, feat(api)!:).
|
|
91
|
+
Alternatively, a 'BREAKING CHANGE:' footer can be used in the commit body.
|
|
92
|
+
|
|
93
|
+
Please rebase and amend the commit messages.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: 🔍 Check code quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
quality:
|
|
20
|
+
name: 🔍 Code Quality
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 10
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
25
|
+
with:
|
|
26
|
+
persist-credentials: false
|
|
27
|
+
|
|
28
|
+
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
cache-dependency-glob: uv.lock
|
|
32
|
+
|
|
33
|
+
- run: uv sync --all-groups
|
|
34
|
+
|
|
35
|
+
- name: Check formatting
|
|
36
|
+
run: uv run ruff format --check .
|
|
37
|
+
|
|
38
|
+
- name: Lint code
|
|
39
|
+
run: uv run ruff check .
|
|
40
|
+
|
|
41
|
+
- name: Type check
|
|
42
|
+
run: uv run ty check
|
|
43
|
+
|
|
44
|
+
hooks:
|
|
45
|
+
name: 🪝 prek hooks
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
timeout-minutes: 10
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
50
|
+
with:
|
|
51
|
+
persist-credentials: false
|
|
52
|
+
|
|
53
|
+
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
54
|
+
with:
|
|
55
|
+
enable-cache: true
|
|
56
|
+
cache-dependency-glob: uv.lock
|
|
57
|
+
|
|
58
|
+
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
59
|
+
with:
|
|
60
|
+
path: ~/.cache/prek
|
|
61
|
+
key: prek-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
62
|
+
|
|
63
|
+
- name: Run prek
|
|
64
|
+
run: uv run --group dev prek run --all-files --show-diff-on-failure
|
|
65
|
+
env:
|
|
66
|
+
# skip ruff duplicates here
|
|
67
|
+
SKIP: ruff-check,ruff-format
|
|
68
|
+
|
|
69
|
+
quality-gate:
|
|
70
|
+
name: ✅ Code quality passed
|
|
71
|
+
if: always()
|
|
72
|
+
needs: [quality, hooks]
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
timeout-minutes: 5
|
|
75
|
+
steps:
|
|
76
|
+
- name: Fail if any quality job did not pass
|
|
77
|
+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
78
|
+
run: |
|
|
79
|
+
echo "::error::one or more code quality jobs failed or were cancelled"
|
|
80
|
+
exit 1
|