-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathautomation-setup.yml
More file actions
160 lines (136 loc) · 6.53 KB
/
automation-setup.yml
File metadata and controls
160 lines (136 loc) · 6.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Centralized Initial Setup Configuration for ioBroker Copilot Instructions
# This file contains the configuration and prompts for automated setup
automation:
repository_detection:
indicators:
- "package.json contains iobroker"
- "io-package.json exists"
- "main.js or lib/ directory exists"
- "admin/ directory exists"
validation:
required_files:
- "package.json"
- "io-package.json"
- "README.md"
optional_files:
- "main.js"
- "lib/"
- "admin/"
copilot_status_check:
detection_methods:
- "Check .github/copilot-instructions.md existence"
- "Validate version information in copilot instructions"
- "Test Copilot responsiveness in repository"
status_levels:
- "not_initialized" # No copilot-instructions.md
- "needs_update" # Version mismatch
- "up_to_date" # Current version matches
template_integration:
source_references:
template_url: "https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md"
metadata_url: "https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/config/metadata.json"
repository_url: "https://github.com/DrozmotiX/ioBroker-Copilot-Instructions"
version_storage:
location: ".github/copilot-instructions.md"
format: "**Version:** X.Y.Z"
note: "Store in copilot instructions file, NOT package.json"
customization_sections:
preserve_tags: ["[CUSTOMIZE]"]
custom_content_types:
- "Adapter-specific API patterns"
- "Unique error codes and handling"
- "Custom device discovery patterns"
- "Authentication flows specific to service"
- "Testing scenarios beyond standard patterns"
github_action_setup:
workflow_file: ".github/workflows/check-copilot-template.yml"
template_source: "templates/centralized-version-check-action.yml"
features:
- "Weekly automated version checking"
- "Dynamic version detection from metadata.json"
- "Copilot-driven issue creation"
- "Custom section preservation"
- "Duplicate issue prevention"
prompts:
initial_setup:
analysis_prompt: |
Please analyze this repository and check:
1. **Repository Type Confirmation**:
- Confirm this is an ioBroker adapter repository
- Identify the adapter name and type
- Check existing structure and dependencies
2. **Copilot Status Assessment**:
- Verify if GitHub Copilot is active in this repository
- Check if .github/copilot-instructions.md exists
- Analyze any existing Copilot configuration
3. **Setup Requirements**:
- Determine what needs to be configured
- Identify adapter-specific patterns to customize
- Plan the integration strategy
template_setup_prompt: |
Create a complete .github/copilot-instructions.md file:
1. **Download and process template**:
- Fetch: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md
- Remove template comment block (<!-- TEMPLATE FILE --> section)
- Get version from: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/config/metadata.json
2. **Version and source setup**:
- Set version from metadata.json (store in copilot instructions, NOT package.json)
- Add template source reference
- Include metadata reference for future updates
3. **Adapter-specific customization**:
- Customize all [CUSTOMIZE] sections for this specific adapter
- Add unique API patterns, error codes, authentication flows
- Include adapter-specific testing scenarios
- Remove any duplicate content that exists in standard template
workflow_setup_prompt: |
Create .github/workflows/check-copilot-template.yml:
1. **Use centralized template**:
- Copy from: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/templates/centralized-version-check-action.yml
- This provides dynamic version checking using metadata.json
- Includes Copilot-driven automation (no manual scripts)
2. **Weekly monitoring features**:
- Automatic version checking every Sunday
- Smart issue creation with duplicate prevention
- Custom section preservation during updates
- Manual trigger capability
update_process:
merge_prompt: |
Update .github/copilot-instructions.md by merging latest template:
TEMPLATE SOURCES:
- Template: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/template.md
- Version from: https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/config/metadata.json
PRESERVATION REQUIREMENTS:
1. Keep ALL [CUSTOMIZE] sections exactly as they are
2. Preserve adapter-specific context not in standard template
3. Maintain custom error handling, API patterns, authentication
4. Keep unique testing scenarios and configuration instructions
5. REMOVE duplicate content from [CUSTOMIZE] that exists in standard template
6. Store version in copilot instructions, NOT package.json
UPDATE REQUIREMENTS:
1. Integrate latest best practices from new template
2. Update version number from metadata.json
3. Refresh template source references
4. Add missing standard sections
5. Clean up [CUSTOMIZE] sections to avoid duplication
validation:
success_criteria:
setup:
- ".github/copilot-instructions.md created"
- "Version stored in copilot instructions (not package.json)"
- "Template source reference included"
- "[CUSTOMIZE] sections populated with adapter-specific content"
- "Weekly monitoring workflow created"
- "Enhanced Copilot suggestions working"
update:
- "All [CUSTOMIZE] sections preserved"
- "Version updated from metadata.json"
- "Custom content intact"
- "New best practices integrated"
- "No duplicate content between [CUSTOMIZE] and standard sections"
- "Template source references updated"
testing_steps:
- "Test enhanced Copilot suggestions (try typing 'this.setState(' in .js file)"
- "Verify template version matches metadata.json"
- "Confirm custom sections contain only unique content"
- "Check GitHub Action workflow syntax"
- "Validate issue template functionality"