-
Notifications
You must be signed in to change notification settings - Fork 2
Implement centralized automation system for ioBroker Copilot Instructions setup #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+857
−263
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a8a966c
Initial plan
Copilot 39bac0f
Implement centralized automation setup system addressing issue requir…
Copilot d29cba5
Update tests/test-centralized-automation.sh
DutchmanNL 06e5ab2
Update config/metadata.json
DutchmanNL a31b626
Update templates/centralized-version-check-action.yml
DutchmanNL 3688d29
Update templates/centralized-version-check-action.yml
DutchmanNL 2bb63e0
Fix versions: keep below 1.0.0 and add version headers to template files
Copilot 836d0e0
Convert relative path to full HTML link for external automation acces…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| # Centralized Initial Setup Configuration for ioBroker Copilot Instructions | ||
| # Version: 0.5.0 | ||
| # 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.