File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
.opencode/skills/maintenance-pr Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : maintenance-pr
3+ description : Run maintenance.sh, automatically apply fixes on a new branch, and create a PR
4+ risk : low
5+ source : repository
6+ ---
7+
8+ # Maintenance PR Skill
9+
10+ This skill runs the project's maintenance script, automatically applies required fixes, and creates a pull request with the changes.
11+
12+ ## Workflow
13+
14+ ### Step 1: Run maintenance.sh
15+ Run the maintenance script to check for issues:
16+ ``` bash
17+ cd /home/andrea/Source/ateam && ./maintenance.sh
18+ ```
19+
20+ ### Step 2: Analyze output
21+ Parse the output for:
22+ - Unused dependencies (shown by cargo-machete)
23+ - Outdated dependencies (shown by cargo outdated)
24+ - Any errors or warnings
25+
26+ ### Step 3: Apply fixes
27+ For each issue found:
28+ - ** Unused dependencies** : Remove from ` Cargo.toml `
29+ - ** Outdated dependencies** : Update to latest versions using ` cargo update -p <package> ` or update version in ` Cargo.toml ` directly
30+
31+ ### Step 4: Create branch
32+ Create a new branch for the changes:
33+ ``` bash
34+ cd /home/andrea/Source/ateam && git checkout -b maintenance/$( date +%Y-%m-%d)
35+ ```
36+
37+ ### Step 5: Commit and push
38+ Commit the changes and push to remote:
39+ ``` bash
40+ git add -A && git commit -m " chore: apply maintenance fixes" && git push -u origin HEAD
41+ ```
42+
43+ ### Step 6: Create PR
44+ Create a pull request using gh CLI:
45+ ``` bash
46+ gh pr create --title " chore: apply maintenance fixes" --body " Automated maintenance fixes from ./maintenance.sh"
47+ ```
48+
49+ ## Requirements
50+
51+ - ` cargo-machete ` (replacement for cargo-udeps)
52+ - ` cargo-outdated ` (for checking outdated dependencies)
53+ - ` gh ` CLI (for creating PRs)
You can’t perform that action at this time.
0 commit comments