@mokoconsulting/mcp-windows 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/.gitattributes +94 -0
  2. package/.gitmessage +9 -0
  3. package/.mokogitea/ISSUE_TEMPLATE/adr.md +110 -0
  4. package/.mokogitea/ISSUE_TEMPLATE/bug_report.md +48 -0
  5. package/.mokogitea/ISSUE_TEMPLATE/config.yml +18 -0
  6. package/.mokogitea/ISSUE_TEMPLATE/documentation.md +52 -0
  7. package/.mokogitea/ISSUE_TEMPLATE/feature_request.md +51 -0
  8. package/.mokogitea/ISSUE_TEMPLATE/mcp_api_integration.md +48 -0
  9. package/.mokogitea/ISSUE_TEMPLATE/mcp_connection_issue.md +67 -0
  10. package/.mokogitea/ISSUE_TEMPLATE/mcp_tool_request.md +49 -0
  11. package/.mokogitea/ISSUE_TEMPLATE/question.md +82 -0
  12. package/.mokogitea/ISSUE_TEMPLATE/rfc.md +126 -0
  13. package/.mokogitea/ISSUE_TEMPLATE/security.md +51 -0
  14. package/.mokogitea/ISSUE_TEMPLATE/version.md +24 -0
  15. package/.mokogitea/branch-protection.yml +251 -0
  16. package/.mokogitea/workflows/auto-assign.yml +76 -0
  17. package/.mokogitea/workflows/auto-bump.yml +66 -0
  18. package/.mokogitea/workflows/auto-dev-issue.yml +207 -0
  19. package/.mokogitea/workflows/auto-release.yml +421 -0
  20. package/.mokogitea/workflows/branch-cleanup.yml +48 -0
  21. package/.mokogitea/workflows/cascade-dev.yml +10 -0
  22. package/.mokogitea/workflows/changelog-validation.yml +101 -0
  23. package/.mokogitea/workflows/ci-generic.yml +191 -0
  24. package/.mokogitea/workflows/cleanup.yml +87 -0
  25. package/.mokogitea/workflows/codeql-analysis.yml +115 -0
  26. package/.mokogitea/workflows/copilot-agent.yml +44 -0
  27. package/.mokogitea/workflows/deploy-manual.yml +126 -0
  28. package/.mokogitea/workflows/enterprise-firewall-setup.yml +758 -0
  29. package/.mokogitea/workflows/gitleaks.yml +92 -0
  30. package/.mokogitea/workflows/issue-branch.yml +73 -0
  31. package/.mokogitea/workflows/mcp-auto-release.yml +278 -0
  32. package/.mokogitea/workflows/mcp-build-test.yml +65 -0
  33. package/.mokogitea/workflows/mcp-sdk-check.yml +109 -0
  34. package/.mokogitea/workflows/mcp-tool-inventory.yml +61 -0
  35. package/.mokogitea/workflows/notify.yml +70 -0
  36. package/.mokogitea/workflows/npm-publish.yml +113 -0
  37. package/.mokogitea/workflows/pr-check.yml +534 -0
  38. package/.mokogitea/workflows/pre-release.yml +252 -0
  39. package/.mokogitea/workflows/rc-revert.yml +66 -0
  40. package/.mokogitea/workflows/repo-health.yml +712 -0
  41. package/.mokogitea/workflows/repository-cleanup.yml +525 -0
  42. package/.mokogitea/workflows/security-audit.yml +82 -0
  43. package/.mokogitea/workflows/standards-compliance.yml +2614 -0
  44. package/.mokogitea/workflows/sync-version-on-merge.yml +133 -0
  45. package/.mokogitea/workflows/update-server.yml +312 -0
  46. package/.mokogitea/workflows/workflow-sync-trigger.yml +73 -0
  47. package/CHANGELOG.md +130 -0
  48. package/CLAUDE.md +49 -0
  49. package/CONTRIBUTING.md +161 -0
  50. package/ISSUES.md +601 -0
  51. package/Makefile +70 -0
  52. package/README.md +80 -0
  53. package/automation/ci-issue-reporter.sh +237 -0
  54. package/config.example.json +18 -0
  55. package/dist/index.d.ts +3 -0
  56. package/dist/index.js +111 -0
  57. package/dist/shell.d.ts +50 -0
  58. package/dist/shell.js +209 -0
  59. package/dist/tools/apps.d.ts +3 -0
  60. package/dist/tools/apps.js +63 -0
  61. package/dist/tools/audio.d.ts +3 -0
  62. package/dist/tools/audio.js +142 -0
  63. package/dist/tools/audio_apps.d.ts +3 -0
  64. package/dist/tools/audio_apps.js +86 -0
  65. package/dist/tools/automation.d.ts +3 -0
  66. package/dist/tools/automation.js +261 -0
  67. package/dist/tools/bluetooth.d.ts +3 -0
  68. package/dist/tools/bluetooth.js +96 -0
  69. package/dist/tools/clipboard.d.ts +3 -0
  70. package/dist/tools/clipboard.js +118 -0
  71. package/dist/tools/config.d.ts +3 -0
  72. package/dist/tools/config.js +85 -0
  73. package/dist/tools/dialog.d.ts +3 -0
  74. package/dist/tools/dialog.js +72 -0
  75. package/dist/tools/display.d.ts +3 -0
  76. package/dist/tools/display.js +256 -0
  77. package/dist/tools/drives.d.ts +3 -0
  78. package/dist/tools/drives.js +98 -0
  79. package/dist/tools/environment.d.ts +3 -0
  80. package/dist/tools/environment.js +129 -0
  81. package/dist/tools/execute.d.ts +3 -0
  82. package/dist/tools/execute.js +28 -0
  83. package/dist/tools/filesystem.d.ts +3 -0
  84. package/dist/tools/filesystem.js +230 -0
  85. package/dist/tools/firewall.d.ts +3 -0
  86. package/dist/tools/firewall.js +108 -0
  87. package/dist/tools/hosts.d.ts +3 -0
  88. package/dist/tools/hosts.js +119 -0
  89. package/dist/tools/maintenance.d.ts +3 -0
  90. package/dist/tools/maintenance.js +236 -0
  91. package/dist/tools/netstat.d.ts +3 -0
  92. package/dist/tools/netstat.js +56 -0
  93. package/dist/tools/network.d.ts +3 -0
  94. package/dist/tools/network.js +70 -0
  95. package/dist/tools/notification.d.ts +3 -0
  96. package/dist/tools/notification.js +41 -0
  97. package/dist/tools/power.d.ts +3 -0
  98. package/dist/tools/power.js +104 -0
  99. package/dist/tools/printer.d.ts +3 -0
  100. package/dist/tools/printer.js +97 -0
  101. package/dist/tools/process.d.ts +3 -0
  102. package/dist/tools/process.js +54 -0
  103. package/dist/tools/process_kill.d.ts +3 -0
  104. package/dist/tools/process_kill.js +48 -0
  105. package/dist/tools/recycle_bin.d.ts +3 -0
  106. package/dist/tools/recycle_bin.js +108 -0
  107. package/dist/tools/registry.d.ts +3 -0
  108. package/dist/tools/registry.js +136 -0
  109. package/dist/tools/scheduler.d.ts +3 -0
  110. package/dist/tools/scheduler.js +116 -0
  111. package/dist/tools/service.d.ts +3 -0
  112. package/dist/tools/service.js +79 -0
  113. package/dist/tools/startup.d.ts +3 -0
  114. package/dist/tools/startup.js +159 -0
  115. package/dist/tools/storage.d.ts +3 -0
  116. package/dist/tools/storage.js +129 -0
  117. package/dist/tools/system.d.ts +3 -0
  118. package/dist/tools/system.js +84 -0
  119. package/dist/tools/system_mgmt.d.ts +3 -0
  120. package/dist/tools/system_mgmt.js +174 -0
  121. package/dist/tools/terminal.d.ts +3 -0
  122. package/dist/tools/terminal.js +80 -0
  123. package/dist/tools/theme.d.ts +3 -0
  124. package/dist/tools/theme.js +165 -0
  125. package/dist/tools/usb.d.ts +3 -0
  126. package/dist/tools/usb.js +52 -0
  127. package/dist/tools/virtual_desktop.d.ts +3 -0
  128. package/dist/tools/virtual_desktop.js +112 -0
  129. package/dist/tools/wifi.d.ts +3 -0
  130. package/dist/tools/wifi.js +136 -0
  131. package/dist/tools/window.d.ts +3 -0
  132. package/dist/tools/window.js +189 -0
  133. package/dist/tools/winget.d.ts +3 -0
  134. package/dist/tools/winget.js +79 -0
  135. package/dist/tools/wsl.d.ts +3 -0
  136. package/dist/tools/wsl.js +99 -0
  137. package/docs/API.md +63 -0
  138. package/docs/ARCHITECTURE.md +73 -0
  139. package/docs/INSTALLATION.md +102 -0
  140. package/docs/index.md +12 -0
  141. package/package.json +35 -0
  142. package/scripts/setup.mjs +123 -0
  143. package/src/index.ts +125 -0
  144. package/src/shell.ts +253 -0
  145. package/src/tools/apps.ts +76 -0
  146. package/src/tools/audio.ts +161 -0
  147. package/src/tools/audio_apps.ts +98 -0
  148. package/src/tools/automation.ts +297 -0
  149. package/src/tools/bluetooth.ts +114 -0
  150. package/src/tools/clipboard.ts +138 -0
  151. package/src/tools/config.ts +105 -0
  152. package/src/tools/dialog.ts +87 -0
  153. package/src/tools/display.ts +285 -0
  154. package/src/tools/drives.ts +124 -0
  155. package/src/tools/environment.ts +146 -0
  156. package/src/tools/execute.ts +35 -0
  157. package/src/tools/filesystem.ts +273 -0
  158. package/src/tools/firewall.ts +125 -0
  159. package/src/tools/hosts.ts +135 -0
  160. package/src/tools/maintenance.ts +299 -0
  161. package/src/tools/netstat.ts +72 -0
  162. package/src/tools/network.ts +84 -0
  163. package/src/tools/notification.ts +50 -0
  164. package/src/tools/power.ts +123 -0
  165. package/src/tools/printer.ts +114 -0
  166. package/src/tools/process.ts +80 -0
  167. package/src/tools/process_kill.ts +57 -0
  168. package/src/tools/recycle_bin.ts +126 -0
  169. package/src/tools/registry.ts +165 -0
  170. package/src/tools/scheduler.ts +140 -0
  171. package/src/tools/service.ts +102 -0
  172. package/src/tools/startup.ts +180 -0
  173. package/src/tools/storage.ts +141 -0
  174. package/src/tools/system.ts +99 -0
  175. package/src/tools/system_mgmt.ts +190 -0
  176. package/src/tools/terminal.ts +117 -0
  177. package/src/tools/theme.ts +205 -0
  178. package/src/tools/usb.ts +65 -0
  179. package/src/tools/virtual_desktop.ts +122 -0
  180. package/src/tools/wifi.ts +157 -0
  181. package/src/tools/window.ts +211 -0
  182. package/src/tools/winget.ts +100 -0
  183. package/src/tools/wsl.ts +112 -0
  184. package/tsconfig.json +19 -0
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: Request for Comments (RFC)
3
+ about: Propose a significant change for community discussion
4
+ title: '[RFC] '
5
+ labels: 'rfc, discussion'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
11
+ ## RFC Summary
12
+ One-paragraph summary of the proposal.
13
+
14
+ ## Motivation
15
+ Why are we doing this? What use cases does it support? What is the expected outcome?
16
+
17
+ ## Detailed Design
18
+ ### Overview
19
+ Provide a detailed explanation of the proposed change.
20
+
21
+ ### API Changes (if applicable)
22
+ ```php
23
+ // Before
24
+ function oldApi($param1) { }
25
+
26
+ // After
27
+ function newApi($param1, $param2) { }
28
+ ```
29
+
30
+ ### User Experience Changes
31
+ Describe how users will interact with this change.
32
+
33
+ ### Implementation Approach
34
+ High-level implementation strategy.
35
+
36
+ ## Drawbacks
37
+ Why should we *not* do this?
38
+
39
+ ## Alternatives
40
+ What other designs have been considered? What is the impact of not doing this?
41
+
42
+ ### Alternative 1
43
+ - Description
44
+ - Trade-offs
45
+
46
+ ### Alternative 2
47
+ - Description
48
+ - Trade-offs
49
+
50
+ ## Adoption Strategy
51
+ How will existing users adopt this? Is this a breaking change?
52
+
53
+ ### Migration Guide
54
+ ```bash
55
+ # Steps to migrate
56
+ ```
57
+
58
+ ### Deprecation Timeline
59
+ - **Announcement**:
60
+ - **Deprecation**:
61
+ - **Removal**:
62
+
63
+ ## Unresolved Questions
64
+ - Question 1
65
+ - Question 2
66
+
67
+ ## Future Possibilities
68
+ What future work does this enable?
69
+
70
+ ## Impact Assessment
71
+ ### Performance
72
+ Expected performance impact.
73
+
74
+ ### Security
75
+ Security considerations and implications.
76
+
77
+ ### Compatibility
78
+ - **Backward Compatible**: [Yes / No]
79
+ - **Breaking Changes**: [List]
80
+
81
+ ### Maintenance
82
+ Long-term maintenance considerations.
83
+
84
+ ## Community Input
85
+ ### Stakeholders
86
+ - [ ] Core team
87
+ - [ ] Module developers
88
+ - [ ] End users
89
+ - [ ] Enterprise customers
90
+
91
+ ### Feedback Period
92
+ **Duration**: [e.g., 2 weeks]
93
+ **Deadline**: [date]
94
+
95
+ ## Implementation Timeline
96
+ ### Phase 1: Design
97
+ - [ ] RFC discussion
98
+ - [ ] Design finalization
99
+ - [ ] Approval
100
+
101
+ ### Phase 2: Implementation
102
+ - [ ] Core implementation
103
+ - [ ] Tests
104
+ - [ ] Documentation
105
+
106
+ ### Phase 3: Release
107
+ - [ ] Beta release
108
+ - [ ] Feedback collection
109
+ - [ ] Stable release
110
+
111
+ ## Success Metrics
112
+ How will we measure success?
113
+ - Metric 1
114
+ - Metric 2
115
+
116
+ ## References
117
+ - Related RFCs:
118
+ - External documentation:
119
+ - Prior art:
120
+
121
+ ## Open Questions for Community
122
+ 1. Question 1?
123
+ 2. Question 2?
124
+
125
+ ---
126
+ **Note**: This RFC is open for community discussion. Please provide feedback in the comments below.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: Security Vulnerability Report
3
+ about: Report a security vulnerability (use only for non-critical issues)
4
+ title: '[SECURITY] '
5
+ labels: 'security'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
11
+ ## ⚠️ IMPORTANT: Private Disclosure Required
12
+
13
+ **For critical security vulnerabilities, DO NOT use this template.**
14
+ Follow the process in [SECURITY.md](../SECURITY.md) for responsible disclosure.
15
+
16
+ Use this template only for:
17
+ - Security improvements
18
+ - Non-critical security suggestions
19
+ - Security documentation updates
20
+
21
+ ---
22
+
23
+ ## Security Issue
24
+
25
+ **Severity**:
26
+ <!-- Low, Medium, or informational only -->
27
+
28
+ ## Description
29
+ <!-- Describe the security concern or improvement suggestion -->
30
+
31
+ ## Affected Components
32
+ <!-- List the affected files, features, or components -->
33
+
34
+ ## Suggested Mitigation
35
+ <!-- Describe how this could be addressed -->
36
+
37
+ ## Standards Reference
38
+ Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
39
+ - [ ] SPDX license identifiers
40
+ - [ ] Secret management
41
+ - [ ] Dependency security
42
+ - [ ] Access control
43
+ - [ ] Other: [specify]
44
+
45
+ ## Additional Context
46
+ <!-- Add any other context about the security concern -->
47
+
48
+ ## Checklist
49
+ - [ ] This is NOT a critical vulnerability requiring private disclosure
50
+ - [ ] I have reviewed the SECURITY.md policy
51
+ - [ ] I have provided sufficient detail for evaluation
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Version Bump
3
+ about: Request or track a version change
4
+ title: '[VERSION] '
5
+ labels: 'version, type: version'
6
+ assignees: 'jmiller'
7
+ ---
8
+
9
+ ## Version Change
10
+
11
+ **Current version**: <!-- e.g., 01.02.03 -->
12
+ **Requested version**: <!-- e.g., 01.03.00 -->
13
+ **Change type**: <!-- patch / minor / major -->
14
+
15
+ ## Reason
16
+
17
+ <!-- Why is this version bump needed? -->
18
+
19
+ ## Checklist
20
+
21
+ - [ ] README.md `VERSION:` field updated
22
+ - [ ] CHANGELOG.md entry added
23
+ - [ ] Module descriptor version updated (Dolibarr: `$this->version`, Joomla: `<version>`)
24
+ - [ ] All file headers will be auto-propagated by `sync-version-on-merge` workflow
@@ -0,0 +1,251 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ # FILE INFORMATION
4
+ # DEFGROUP: Gitea.Workflow
5
+ # INGROUP: moko-platform.Automation
6
+ # REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
7
+ # PATH: /.gitea/workflows/branch-protection.yml
8
+ # BRIEF: Apply standardised branch protection rules to all governed repositories
9
+ #
10
+ # +========================================================================+
11
+ # | BRANCH PROTECTION SETUP |
12
+ # +========================================================================+
13
+ # | |
14
+ # | Applies protection rules for: main, dev, rc, beta, alpha |
15
+ # | |
16
+ # | main — Require PR, block rejected reviews, no force push |
17
+ # | dev — Allow push, no force push, no delete |
18
+ # | rc — Allow push, no force push, no delete |
19
+ # | beta — Allow push, no force push, no delete |
20
+ # | alpha — Allow push, no force push, no delete |
21
+ # | |
22
+ # | jmiller has override authority on all branches. |
23
+ # | |
24
+ # +========================================================================+
25
+
26
+ name: Branch Protection Setup
27
+
28
+ on:
29
+ schedule:
30
+ - cron: '0 2 * * 1' # Weekly Monday 02:00 UTC
31
+ workflow_dispatch:
32
+ inputs:
33
+ dry_run:
34
+ description: 'Preview mode (no changes)'
35
+ required: false
36
+ type: boolean
37
+ default: false
38
+ repos:
39
+ description: 'Comma-separated repo names (empty = all governed repos)'
40
+ required: false
41
+ type: string
42
+ default: ''
43
+
44
+ env:
45
+ GITEA_URL: https://git.mokoconsulting.tech
46
+ GITEA_ORG: MokoConsulting
47
+
48
+ permissions:
49
+ contents: read
50
+
51
+ jobs:
52
+ protect:
53
+ name: Apply Branch Protection Rules
54
+ runs-on: ubuntu-latest
55
+
56
+ steps:
57
+ - name: Determine target repos
58
+ id: repos
59
+ env:
60
+ GA_TOKEN: ${{ secrets.GA_TOKEN }}
61
+ run: |
62
+ API="${GITEA_URL}/api/v1"
63
+
64
+ # Platform/standards/infra repos to exclude
65
+ EXCLUDE="gitea-org-config org-profile gitea-private .mokogitea-private MokoStandards moko-platform MokoTesting"
66
+ EXCLUDE="$EXCLUDE MokoStandards-Template-Client MokoStandards-Template-Dolibarr MokoStandards-Template-Generic MokoStandards-Template-Joomla MokoDoliProjTemplate"
67
+
68
+ if [ -n "${{ inputs.repos }}" ]; then
69
+ # User-specified repos
70
+ REPOS=$(echo "${{ inputs.repos }}" | tr ',' ' ')
71
+ else
72
+ # Fetch all org repos
73
+ PAGE=1
74
+ REPOS=""
75
+ while true; do
76
+ BATCH=$(curl -sS \
77
+ -H "Authorization: token ${GA_TOKEN}" \
78
+ "${API}/orgs/${GITEA_ORG}/repos?page=${PAGE}&limit=50" \
79
+ | jq -r '.[].name // empty')
80
+ [ -z "$BATCH" ] && break
81
+ REPOS="$REPOS $BATCH"
82
+ PAGE=$((PAGE + 1))
83
+ done
84
+
85
+ # Filter out excluded repos
86
+ FILTERED=""
87
+ for REPO in $REPOS; do
88
+ SKIP=false
89
+ for EX in $EXCLUDE; do
90
+ if [ "$REPO" = "$EX" ]; then
91
+ SKIP=true
92
+ break
93
+ fi
94
+ done
95
+ if [ "$SKIP" = "false" ]; then
96
+ FILTERED="$FILTERED $REPO"
97
+ fi
98
+ done
99
+ REPOS="$FILTERED"
100
+ fi
101
+
102
+ echo "repos=$REPOS" >> "$GITHUB_OUTPUT"
103
+ COUNT=$(echo "$REPOS" | wc -w)
104
+ echo "📋 Target repos (${COUNT}): $REPOS"
105
+
106
+ - name: Apply protection rules
107
+ env:
108
+ GA_TOKEN: ${{ secrets.GA_TOKEN }}
109
+ DRY_RUN: ${{ inputs.dry_run || 'false' }}
110
+ run: |
111
+ API="${GITEA_URL}/api/v1"
112
+ REPOS="${{ steps.repos.outputs.repos }}"
113
+
114
+ SUCCESS=0
115
+ FAILED=0
116
+ SKIPPED=0
117
+
118
+ # ── Rule definitions ──────────────────────────────────────
119
+ # Only the CI bot (jmiller token) can push directly.
120
+ # All human contributors must use PRs.
121
+ # Force push disabled on all branches.
122
+
123
+ RULE_MAIN='{
124
+ "rule_name": "main",
125
+ "enable_push": true,
126
+ "enable_push_whitelist": true,
127
+ "push_whitelist_usernames": ["jmiller"],
128
+ "enable_force_push": false,
129
+ "enable_force_push_allowlist": false,
130
+ "force_push_allowlist_usernames": [],
131
+ "enable_merge_whitelist": false,
132
+ "required_approvals": 0,
133
+ "dismiss_stale_approvals": true,
134
+ "block_on_rejected_reviews": true,
135
+ "block_on_outdated_branch": false,
136
+ "priority": 1
137
+ }'
138
+
139
+ RULE_DEV='{
140
+ "rule_name": "dev",
141
+ "enable_push": true,
142
+ "enable_push_whitelist": true,
143
+ "push_whitelist_usernames": ["jmiller"],
144
+ "enable_force_push": false,
145
+ "enable_force_push_allowlist": false,
146
+ "force_push_allowlist_usernames": [],
147
+ "enable_merge_whitelist": false,
148
+ "required_approvals": 0,
149
+ "block_on_rejected_reviews": false,
150
+ "priority": 2
151
+ }'
152
+
153
+ RULE_RC='{
154
+ "rule_name": "rc",
155
+ "enable_push": true,
156
+ "enable_push_whitelist": true,
157
+ "push_whitelist_usernames": ["jmiller"],
158
+ "enable_force_push": false,
159
+ "enable_force_push_allowlist": false,
160
+ "force_push_allowlist_usernames": [],
161
+ "enable_merge_whitelist": false,
162
+ "required_approvals": 0,
163
+ "block_on_rejected_reviews": false,
164
+ "priority": 3
165
+ }'
166
+
167
+ RULE_BETA='{
168
+ "rule_name": "beta",
169
+ "enable_push": true,
170
+ "enable_push_whitelist": true,
171
+ "push_whitelist_usernames": ["jmiller"],
172
+ "enable_force_push": false,
173
+ "enable_force_push_allowlist": false,
174
+ "force_push_allowlist_usernames": [],
175
+ "enable_merge_whitelist": false,
176
+ "required_approvals": 0,
177
+ "block_on_rejected_reviews": false,
178
+ "priority": 4
179
+ }'
180
+
181
+ RULE_ALPHA='{
182
+ "rule_name": "alpha",
183
+ "enable_push": true,
184
+ "enable_push_whitelist": true,
185
+ "push_whitelist_usernames": ["jmiller"],
186
+ "enable_force_push": false,
187
+ "enable_force_push_allowlist": false,
188
+ "force_push_allowlist_usernames": [],
189
+ "enable_merge_whitelist": false,
190
+ "required_approvals": 0,
191
+ "block_on_rejected_reviews": false,
192
+ "priority": 5
193
+ }'
194
+
195
+ RULES=("$RULE_MAIN" "$RULE_DEV" "$RULE_RC" "$RULE_BETA" "$RULE_ALPHA")
196
+ RULE_NAMES=("main" "dev" "rc" "beta" "alpha")
197
+
198
+ # ── Apply rules to each repo ──────────────────────────────
199
+ for REPO in $REPOS; do
200
+ echo ""
201
+ echo "═══ ${REPO} ═══"
202
+
203
+ for i in "${!RULES[@]}"; do
204
+ RULE="${RULES[$i]}"
205
+ NAME="${RULE_NAMES[$i]}"
206
+
207
+ if [ "$DRY_RUN" = "true" ]; then
208
+ echo " [DRY RUN] Would apply rule: ${NAME}"
209
+ SKIPPED=$((SKIPPED + 1))
210
+ continue
211
+ fi
212
+
213
+ # Delete existing rule if present (idempotent recreate)
214
+ ENCODED_NAME=$(echo "$NAME" | sed 's|/|%2F|g')
215
+ curl -sS -o /dev/null -w "" \
216
+ -X DELETE \
217
+ -H "Authorization: token ${GA_TOKEN}" \
218
+ "${API}/repos/${GITEA_ORG}/${REPO}/branch_protections/${ENCODED_NAME}" 2>/dev/null || true
219
+
220
+ # Create rule
221
+ RESPONSE=$(curl -sS -w "\n%{http_code}" \
222
+ -X POST \
223
+ -H "Authorization: token ${GA_TOKEN}" \
224
+ -H "Content-Type: application/json" \
225
+ -d "$RULE" \
226
+ "${API}/repos/${GITEA_ORG}/${REPO}/branch_protections")
227
+
228
+ HTTP=$(echo "$RESPONSE" | tail -1)
229
+ BODY=$(echo "$RESPONSE" | sed '$d')
230
+
231
+ if [ "$HTTP" = "201" ]; then
232
+ echo " ✅ ${NAME}"
233
+ SUCCESS=$((SUCCESS + 1))
234
+ else
235
+ echo " ❌ ${NAME} (HTTP ${HTTP}): $(echo "$BODY" | jq -r '.message // .' 2>/dev/null | head -1)"
236
+ FAILED=$((FAILED + 1))
237
+ fi
238
+ done
239
+ done
240
+
241
+ # ── Summary ───────────────────────────────────────────────
242
+ echo ""
243
+ echo "════════════════════════════════════════"
244
+ echo " ✅ Success: ${SUCCESS}"
245
+ echo " ❌ Failed: ${FAILED}"
246
+ echo " ⏭️ Skipped: ${SKIPPED}"
247
+ echo "════════════════════════════════════════"
248
+
249
+ if [ "$FAILED" -gt 0 ]; then
250
+ echo "::warning::${FAILED} rule(s) failed to apply"
251
+ fi
@@ -0,0 +1,76 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ #
4
+ # FILE INFORMATION
5
+ # DEFGROUP: GitHub.Workflow
6
+ # INGROUP: MokoStandards.Workflows.Shared
7
+ # REPO: https://github.com/mokoconsulting-tech/MokoStandards
8
+ # PATH: /.mokogitea/workflows/auto-assign.yml
9
+ # VERSION: 04.06.00
10
+ # BRIEF: Auto-assign jmiller to unassigned issues and PRs every 15 minutes
11
+
12
+ name: "Universal: Auto-Assign"
13
+
14
+ on:
15
+ issues:
16
+ types: [opened]
17
+ pull_request_target:
18
+ types: [opened]
19
+ schedule:
20
+ - cron: '0 */12 * * *'
21
+ workflow_dispatch:
22
+
23
+ permissions:
24
+ issues: write
25
+ pull-requests: write
26
+
27
+ jobs:
28
+ auto-assign:
29
+ name: Assign unassigned issues and PRs
30
+ runs-on: ubuntu-latest
31
+
32
+ steps:
33
+ - name: Assign unassigned issues
34
+ env:
35
+ GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }}
36
+ run: |
37
+ REPO="${{ github.repository }}"
38
+ ASSIGNEE="jmiller"
39
+
40
+ echo "## 🏷️ Auto-Assign Report" >> $GITHUB_STEP_SUMMARY
41
+ echo "" >> $GITHUB_STEP_SUMMARY
42
+
43
+ ASSIGNED_ISSUES=0
44
+ ASSIGNED_PRS=0
45
+
46
+ # Assign unassigned open issues
47
+ ISSUES=$(gh api "repos/$REPO/issues?state=open&per_page=100&assignee=none" --jq '.[].number' 2>/dev/null || true)
48
+ for NUM in $ISSUES; do
49
+ # Skip PRs (the issues endpoint returns PRs too)
50
+ IS_PR=$(gh api "repos/$REPO/issues/$NUM" --jq '.pull_request // empty' 2>/dev/null || true)
51
+ if [ -z "$IS_PR" ]; then
52
+ gh api "repos/$REPO/issues/$NUM/assignees" -X POST -f "assignees[]=$ASSIGNEE" --silent 2>/dev/null && {
53
+ ASSIGNED_ISSUES=$((ASSIGNED_ISSUES + 1))
54
+ echo " Assigned issue #$NUM"
55
+ } || true
56
+ fi
57
+ done
58
+
59
+ # Assign unassigned open PRs
60
+ PRS=$(gh api "repos/$REPO/pulls?state=open&per_page=100" --jq '.[] | select(.assignees | length == 0) | .number' 2>/dev/null || true)
61
+ for NUM in $PRS; do
62
+ gh api "repos/$REPO/issues/$NUM/assignees" -X POST -f "assignees[]=$ASSIGNEE" --silent 2>/dev/null && {
63
+ ASSIGNED_PRS=$((ASSIGNED_PRS + 1))
64
+ echo " Assigned PR #$NUM"
65
+ } || true
66
+ done
67
+
68
+ echo "| Type | Assigned |" >> $GITHUB_STEP_SUMMARY
69
+ echo "|------|----------|" >> $GITHUB_STEP_SUMMARY
70
+ echo "| Issues | $ASSIGNED_ISSUES |" >> $GITHUB_STEP_SUMMARY
71
+ echo "| Pull Requests | $ASSIGNED_PRS |" >> $GITHUB_STEP_SUMMARY
72
+
73
+ if [ "$ASSIGNED_ISSUES" -eq 0 ] && [ "$ASSIGNED_PRS" -eq 0 ]; then
74
+ echo "" >> $GITHUB_STEP_SUMMARY
75
+ echo "✅ All issues and PRs already have assignees" >> $GITHUB_STEP_SUMMARY
76
+ fi
@@ -0,0 +1,66 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ #
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+ #
5
+ # FILE INFORMATION
6
+ # DEFGROUP: Gitea.Workflow
7
+ # INGROUP: mokocli.Release
8
+ # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
9
+ # PATH: /.mokogitea/workflows/auto-bump.yml
10
+ # VERSION: 09.02.00
11
+ # BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
12
+
13
+ name: "Universal: Auto Version Bump"
14
+
15
+ on:
16
+ push:
17
+ branches:
18
+ - dev
19
+ - rc
20
+ - 'feature/**'
21
+ - 'patch/**'
22
+
23
+ env:
24
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
25
+ GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
26
+
27
+ permissions:
28
+ contents: write
29
+
30
+ jobs:
31
+ bump:
32
+ name: Version Bump
33
+ runs-on: release
34
+ if: >-
35
+ !contains(github.event.head_commit.message, '[skip ci]') &&
36
+ !contains(github.event.head_commit.message, '[skip bump]') &&
37
+ !startsWith(github.event.head_commit.message, 'Merge pull request')
38
+
39
+ steps:
40
+ - name: Checkout
41
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
42
+ with:
43
+ token: ${{ secrets.MOKOGITEA_TOKEN }}
44
+ fetch-depth: 1
45
+
46
+ - name: Setup mokocli tools
47
+ run: |
48
+ if ! command -v composer &> /dev/null; then
49
+ sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
50
+ fi
51
+ if [ -d "/opt/mokocli/cli" ]; then
52
+ echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV"
53
+ else
54
+ git clone --depth 1 --branch main --quiet \
55
+ "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \
56
+ /tmp/mokocli
57
+ cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
58
+ echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV"
59
+ fi
60
+
61
+ - name: Bump version
62
+ run: |
63
+ php ${MOKO_CLI}/version_auto_bump.php \
64
+ --path . --branch "${GITHUB_REF_NAME}" \
65
+ --token "${{ secrets.MOKOGITEA_TOKEN }}" \
66
+ --repo-url "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"