Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ Your contributions help make adapter development better for the entire ioBroker
**🚀 Fully Automated Setup** (Recommended for all users):

### For New Repositories or Comprehensive Setup
1. **Create an automated setup issue** using the [Initial Setup Automation Template](templates/initial-setup-automation.md)
1. **Create an automated setup issue** with this simple content:
```
Title: 🤖 Setup ioBroker GitHub Copilot Instructions

GitHub Copilot: Please help me set up GitHub Copilot instructions for my ioBroker adapter repository using the template from:
templates/initial-setup-automation.md
```
2. **Let GitHub Copilot handle everything**:
- ✅ Validates existing setup
- 📥 Downloads and customizes latest template
Expand All @@ -41,7 +47,13 @@ Your contributions help make adapter development better for the entire ioBroker
- 🛡️ Preserves any existing customizations

### For Quick Updates Only
1. **Use the** [Copy-Paste Template](templates/copy-paste-template.md) for existing setups
1. **Create a quick update issue** with this simple content:
```
Title: 🤖 Update ioBroker Copilot Instructions Template

GitHub Copilot: Please help me update my ioBroker Copilot instructions using the template from:
templates/copy-paste-template.md
```
2. **GitHub Copilot will merge** the latest template while preserving your customizations

## 📚 Documentation
Expand Down
7 changes: 5 additions & 2 deletions config/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"automation": {
"workflow_file": ".github/workflows/check-copilot-template.yml",
"cron_schedule": "0 0 * * 0",
"labels": ["template-update", "automation"]
"labels": [
"template-update",
"automation"
]
}
}
}
43 changes: 15 additions & 28 deletions docs/automated-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide provides fully automated methods to validate and update your ioBroker Copilot instructions template using GitHub Copilot, ensuring all custom sections are preserved.

## 🚀 Quick Start (Copy-Paste Method)
## 🚀 Quick Start (Simple Reference Method)

**Prerequisites**: Ensure GitHub Copilot is active in your repository first. If you haven't set up GitHub Copilot yet, create an issue in your repository with the title "🤖 Setup GitHub Copilot" and content "GitHub Copilot: Please help me set up GitHub Copilot for this repository and create initial .github/copilot-instructions.md file."

Expand All @@ -13,35 +13,14 @@ The fastest way to update your template:
1. Go to your ioBroker adapter repository on GitHub
2. Click "Issues" → "New Issue"
3. Use title: **🤖 Update ioBroker Copilot Instructions Template**
4. Copy and paste this content:

```markdown
**GitHub Copilot**: Please help me update my ioBroker Copilot instructions template to the latest version while preserving all custom sections.

## Task
Update `.github/copilot-instructions.md` using this prompt:
4. Use this simple content:

```
"Merge the ioBroker template from https://github.com/DrozmotiX/ioBroker-Copilot-Instructions/blob/main/template.md with my existing .github/copilot-instructions.md.
GitHub Copilot: Please help me update my ioBroker Copilot instructions template using the guide from:
docs/automated-updates.md

REQUIREMENTS:
1. Preserve ALL [CUSTOMIZE] sections exactly as they are
2. Keep all project-specific context and custom instructions
3. Add latest ioBroker best practices from the new template
4. Update version to match latest template version
5. Maintain Template Source reference

Show me the changes before applying them."
```

## Validation
After update, confirm:
- [ ] All [CUSTOMIZE] sections preserved
- [ ] Version updated to latest
- [ ] Custom content intact
- [ ] Template structure complete

**Reference**: https://github.com/DrozmotiX/ioBroker-Copilot-Instructions
Reference the copy-paste template for specific requirements:
templates/copy-paste-template.md
```

### Step 2: Let GitHub Copilot Handle the Update
Expand Down Expand Up @@ -79,7 +58,15 @@ This script will:
For repositories with existing automation workflows, use the full template:

### Template File Location
Copy from: [`templates/automated-template-update.md`](../templates/automated-template-update.md)
Reference: [`templates/automated-template-update.md`](../templates/automated-template-update.md)

Create an issue with this simple content:
```
Title: 🤖 Update ioBroker Copilot Instructions Template

GitHub Copilot: Please help me update my template using the detailed guide from:
templates/automated-template-update.md
```

This provides:
- Detailed step-by-step automation
Expand Down
16 changes: 14 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,25 @@ This guide walks you through setting up GitHub Copilot for ioBroker adapter deve
**Best for**: Both initial setup and ongoing maintenance

1. **For Initial Setup or Updates**
- Use the [Initial Setup Automation Template](../templates/initial-setup-automation.md)
- Create an issue with this simple content:
```
Title: 🤖 Setup ioBroker GitHub Copilot Instructions

GitHub Copilot: Please help me set up GitHub Copilot instructions using:
templates/initial-setup-automation.md
```
- Creates comprehensive setup with validation and monitoring
- Handles both new installations and updates automatically
- Preserves all custom content during updates

2. **For Quick Updates Only**
- Use the [Copy-Paste Template](../templates/copy-paste-template.md) for existing setups
- Create an issue with this simple content:
```
Title: 🤖 Update ioBroker Copilot Instructions Template

GitHub Copilot: Please help me update my template using:
templates/copy-paste-template.md
```
- Focuses specifically on template merging
- Ideal when you just need to update an existing template

Expand Down
31 changes: 25 additions & 6 deletions templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,33 @@ This directory contains templates and automation files for setting up and mainta
## Usage Recommendations

### For New Repositories
1. Use [initial-setup-automation.md](initial-setup-automation.md)
2. Create an issue with the template content
3. Let GitHub Copilot handle everything automatically
1. Create an issue with this simple content:
```
Title: 🤖 Setup ioBroker GitHub Copilot Instructions

GitHub Copilot: Please help me set up using: templates/initial-setup-automation.md
```
2. Let GitHub Copilot handle everything automatically

### For Existing Repositories
1. **With monitoring needed**: Use [initial-setup-automation.md](initial-setup-automation.md)
2. **Quick updates only**: Use [copy-paste-template.md](copy-paste-template.md)
3. **Complex updates**: Use [automated-template-update.md](automated-template-update.md)
1. **With monitoring needed**: Create an issue:
```
Title: 🤖 Setup ioBroker GitHub Copilot Instructions

GitHub Copilot: Please help using: templates/initial-setup-automation.md
```
2. **Quick updates only**: Create an issue:
```
Title: 🤖 Update ioBroker Copilot Instructions Template

GitHub Copilot: Please help using: templates/copy-paste-template.md
```
3. **Complex updates**: Create an issue:
```
Title: 🤖 Update ioBroker Copilot Instructions Template

GitHub Copilot: Please help using: templates/automated-template-update.md
```

### For Manual GitHub Action Setup
Copy [weekly-version-check-action.yml](weekly-version-check-action.yml) to `.github/workflows/check-copilot-template.yml`
Expand Down
62 changes: 33 additions & 29 deletions templates/copy-paste-template.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
# Quick Copy-Paste Template for Template Updates
# Quick Template Update Guide

Copy and paste this content when creating a new issue in your ioBroker adapter repository to automatically update your Copilot instructions template:
This guide shows you how to create a simple GitHub issue that will automatically update your Copilot instructions template. No copy/paste required - just reference this file and let GitHub Copilot read the requirements dynamically.

---
## Simple Issue Creation

### Title:
```
🤖 Update ioBroker Copilot Instructions Template
```

## Title: 🤖 Update ioBroker Copilot Instructions Template
### Issue Content:
```
GitHub Copilot: Please help me update my ioBroker Copilot instructions template to the latest version while preserving all custom sections.

## Issue Content:
Please use the requirements from: templates/copy-paste-template.md
```

## Template Update Requirements

```markdown
**Prerequisites**: Ensure GitHub Copilot is active in your repository. If not set up yet, create an issue first: "🤖 Setup GitHub Copilot" with content "GitHub Copilot: Please help me set up GitHub Copilot for this repository."

**GitHub Copilot**: Please help me update my ioBroker Copilot instructions template to the latest version while preserving all custom sections.
### Update Requirements for GitHub Copilot:

## Task
Update `.github/copilot-instructions.md` using this prompt:
When GitHub Copilot processes the update request, it should:

```
"Merge the ioBroker template from https://github.com/DrozmotiX/ioBroker-Copilot-Instructions/blob/main/template.md with my existing .github/copilot-instructions.md.

REQUIREMENTS:
1. Preserve ALL [CUSTOMIZE] sections exactly as they are
2. Keep all project-specific context not already covered in the standard template
3. Add latest ioBroker best practices from the new template
4. Update version to match latest template version
5. Maintain Template Source reference
6. REMOVE any duplicate content from [CUSTOMIZE] sections that already exists in the standard template
7. Keep only truly unique, adapter-specific content in [CUSTOMIZE] sections

Show me the changes before applying them."
```
1. **Merge the latest template**: Fetch from https://github.com/DrozmotiX/ioBroker-Copilot-Instructions/blob/main/template.md
2. **Preserve ALL [CUSTOMIZE] sections exactly as they are**
3. **Keep all project-specific context** not already covered in the standard template
4. **Add latest ioBroker best practices** from the new template
5. **Update version** to match latest template version
6. **Maintain Template Source reference**
7. **REMOVE duplicate content** from [CUSTOMIZE] sections that already exists in the standard template
8. **Keep only truly unique, adapter-specific content** in [CUSTOMIZE] sections
9. **Show changes before applying them**

## Validation
After update, confirm:
## Validation Checklist

After the update, confirm:
- [ ] All [CUSTOMIZE] sections preserved
- [ ] Version updated to latest
- [ ] Custom content intact
- [ ] Custom content intact
- [ ] Template structure complete
- [ ] No duplicate content between [CUSTOMIZE] sections and standard template

**Reference**: https://github.com/DrozmotiX/ioBroker-Copilot-Instructions
```
## Reference
**Template Repository**: https://github.com/DrozmotiX/ioBroker-Copilot-Instructions

---

**Instructions**: Copy the content above (including the markdown code blocks) and paste it when creating a new issue in your repository. GitHub Copilot will automatically process this and help you update your template.
**Instructions for Users**: Create a GitHub issue with the title and content shown above. GitHub Copilot will automatically read this file and apply all the requirements without you needing to copy/paste anything.
2 changes: 1 addition & 1 deletion tests/test-automated-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fi
if [[ -f "$REPO_ROOT/templates/copy-paste-template.md" ]]; then
test_template_content "$REPO_ROOT/templates/copy-paste-template.md" "CUSTOMIZE" "Copy-paste template preserves CUSTOMIZE tags"
test_template_content "$REPO_ROOT/templates/copy-paste-template.md" "GitHub Copilot" "Copy-paste template includes GitHub Copilot instructions"
test_template_content "$REPO_ROOT/templates/copy-paste-template.md" "Copy and paste" "Copy-paste template has usage instructions"
test_template_content "$REPO_ROOT/templates/copy-paste-template.md" "Create a GitHub issue" "Copy-paste template has issue creation instructions"
fi

# Test automated-updates.md content
Expand Down