Commit 58d341f
authored
Add GitHub automation tools and custom structure templates (#62)
### Issue
Closes #61 - Enhance STRUCT with additional contrib structures for
GitHub automation and custom project scaffolding.
### Description
This PR introduces several new contrib structures and enhancements to
improve GitHub workflow automation and custom project setup
capabilities:
#### 🏷️ **GitHub Labeler Automation**
- **Enhanced labeler workflow**: Improved `github/workflows/labeler`
contrib with better YAML formatting and comprehensive label rules
- **Automatic PR labeling**: Labels PRs based on branch names
(`feature/*`, `bug/*`, `docs/*`) and file changes
- **File-based labeling**: Automatically labels PRs based on changed
files (documentation, source code, etc.)
- **Release detection**: Labels PRs targeting the default branch as
releases
#### 🏗️ **Custom Structures Template**
- **New contrib structure**: `project/custom-structures` for setting up
custom structure repositories
- **Mappings support**: Includes example mappings file for
environment-specific configurations (AWS account IDs, etc.)
- **DevOps workflow integration**: Pre-configured with essential GitHub
workflows (pre-commit, release-drafter, run-struct)
- **Development environment**: Includes devcontainer, prettier, and
editor config setups
#### 🤖 **GitHub Chat Modes**
- **Planning mode**: New `github/chatmodes/plan` contrib for generating
implementation plans
- **AI-powered planning**: Structured instructions for creating detailed
feature and refactoring plans
- **Testing guidance**: Includes sections for overview, requirements,
implementation steps, and testing
#### 🔧 **Project Integration**
- **Self-hosting**: Updated main `.struct.yaml` to include the new
labeler workflow
- **Consistency**: All new structures follow established YAML
conventions and formatting
### Key Benefits
- **Reduced manual work**: Automatic PR labeling saves time and ensures
consistency
- **Better project organization**: Custom structures template provides a
solid foundation for structure repositories
- **Improved planning**: Chat modes help generate comprehensive
implementation plans
- **Enhanced developer experience**: Better tooling integration and
automation
### Files Changed
- `.github/labeler.yml` - GitHub labeler configuration (generated by
workflow)
- `.github/workflows/labeler.yaml` - GitHub labeler workflow (generated
by workflow)
- `.struct.yaml` - Added labeler workflow to project structure
- `struct_module/contribs/github/chatmodes/plan.yaml` - Planning mode
instructions
- `struct_module/contribs/github/workflows/labeler.yaml` - Enhanced
labeler contrib
- `struct_module/contribs/project/custom-structures.yaml` - Custom
structures template
### Testing
- ✅ All new contrib structures validated with YAML schema
- ✅ Labeler workflow tested with various branch naming patterns
- ✅ Custom structures template generates complete project setup
- ✅ Planning mode instructions properly formatted for chat interface
### Checklist
- [x] I have read the [contributing
guidelines](https://github.com/httpdss/struct/blob/main/README.md#contributing).
- [x] My code follows the code style of this project.
- [x] I have performed a self-review of my own code.
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have updated the documentation accordingly.
### Additional Comments
This PR significantly enhances the STRUCT tool's capabilities for GitHub
automation and custom project scaffolding. The new contrib structures
provide valuable templates that can be immediately used by developers to
set up better organized and automated projects.
The labeler automation in particular will help maintain consistent PR
labeling across projects, while the custom structures template provides
a solid foundation for teams wanting to create their own structure
repositories with proper DevOps practices built-in.1 parent d2c4cd5 commit 58d341f
File tree
6 files changed
+118
-44
lines changed- .github
- workflows
- struct_module/contribs
- github
- chatmodes
- workflows
- project
6 files changed
+118
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
14 | 9 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
19 | 14 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
24 | 19 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
31 | 24 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
36 | 31 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
41 | 36 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 37 | + | |
| 38 | + | |
45 | 39 | | |
46 | | - | |
47 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments