chore: chore: cleanup
This commit is contained in:
@@ -53,5 +53,5 @@ php api/automation/push_files.php --repos MokoCRM --files "LICENSE" --yes --no-i
|
||||
- Creates a PR with the pushed files (unless `--direct` is used)
|
||||
- Creates/updates a tracking issue in each target repo
|
||||
- Cross-links the tracking issue to the PR in the Development sidebar
|
||||
- Assigns `jmiller-moko` to both PR and issue
|
||||
- Assigns `jmiller` to both PR and issue
|
||||
- Applies standard labels: `standards-update`, `mokostandards`, `type: chore`, `automation`
|
||||
|
||||
@@ -79,7 +79,7 @@ The `custom/` directory is auto-created by the cleanup workflow if it doesn't ex
|
||||
### Authorization
|
||||
|
||||
- **Schedule:** Always authorized (runs as gitea-actions[bot])
|
||||
- **Manual dispatch:** `jmiller-moko` and `gitea-actions[bot]` always authorized; others need admin/maintain role
|
||||
- **Manual dispatch:** `jmiller` and `gitea-actions[bot]` always authorized; others need admin/maintain role
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ At least one of `DEMO_FTP_KEY` or `DEMO_FTP_PASSWORD` must be set.
|
||||
|
||||
## Behaviour
|
||||
|
||||
1. **Permission check** — `jmiller-moko` and `gitea-actions[bot]` are always authorized; other actors need `admin` or `maintain` role
|
||||
1. **Permission check** — `jmiller` and `gitea-actions[bot]` are always authorized; other actors need `admin` or `maintain` role
|
||||
2. **Skip on chore/ branches** — PRs from `chore/` branches do not trigger deployment
|
||||
3. **Skip if DEMO_FTP_SUFFIX not set** — repos without the variable are silently skipped
|
||||
4. **Clear remote folder** — always clears the remote destination before uploading
|
||||
|
||||
@@ -55,7 +55,7 @@ The tracking system consists of three main components:
|
||||
- Documentation updates
|
||||
- Changelog updates
|
||||
- Version management
|
||||
3. Assigns issues to `copilot` and `jmiller-moko`
|
||||
3. Assigns issues to `copilot` and `jmiller`
|
||||
4. Adds labels: `automation`, `version-management`, `dev-branch`
|
||||
|
||||
### 2. RC Branch Issue Creation (Automatic)
|
||||
@@ -73,7 +73,7 @@ The tracking system consists of three main components:
|
||||
- Release notes preparation
|
||||
- Final verification and sign-off
|
||||
3. Creates a **draft GitHub Release** for the major version (`vXX`)
|
||||
4. Assigns issues to `copilot` and `jmiller-moko`
|
||||
4. Assigns issues to `copilot` and `jmiller`
|
||||
5. Adds labels: `automation`, `version-management`, `rc-branch`
|
||||
|
||||
The draft release is later published by `auto-release.yml` when the RC merges to main.
|
||||
@@ -207,7 +207,7 @@ No action required. When a PR is merged to main:
|
||||
# Workflow automatically:
|
||||
# 1. Creates dev/04.01 branch
|
||||
# 2. Creates tracking issue #456
|
||||
# 3. Assigns to copilot and jmiller-moko
|
||||
# 3. Assigns to copilot and jmiller
|
||||
```
|
||||
|
||||
### Manual Issue Creation
|
||||
@@ -279,7 +279,7 @@ The "Security Scanning" checklist section integrates with:
|
||||
|
||||
Default assignees for tracking issues:
|
||||
- `copilot` (GitHub Copilot agent)
|
||||
- `jmiller-moko` (organization owner — GitHub assignees must be a user account, not an org)
|
||||
- `jmiller` (organization owner — GitHub assignees must be a user account, not an org)
|
||||
|
||||
To change assignees:
|
||||
- **Auto-created issues**: Edit `.gitea/workflows/auto-create-dev-branch.yml` line 289
|
||||
|
||||
@@ -28,7 +28,7 @@ The `deploy-dev.yml` workflow pushes the contents of `src/` to a development ser
|
||||
- A pull request targeting those branches is **merged** (skips `chore/` branches)
|
||||
- Triggered manually via workflow dispatch
|
||||
|
||||
**Access control:** `jmiller-moko` and `gitea-actions[bot]` are always authorized. Other actors need **admin** or **maintain** role.
|
||||
**Access control:** `jmiller` and `gitea-actions[bot]` are always authorized. Other actors need **admin** or **maintain** role.
|
||||
|
||||
**Skips when:** `DEV_FTP_SUFFIX` variable is not set, or the branch starts with `chore/`.
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ These workflows are synced to every governed repository via `bulk_sync.php`. The
|
||||
**On patch releases (patch != 00):**
|
||||
7. Updates the existing minor release (appends patch notes, updates title)
|
||||
|
||||
**Protection:** Workflow files are protected by CODEOWNERS (requires @jmiller-moko review) and a file path restriction ruleset. Only bypass actors can modify `.gitea/workflows/`.
|
||||
**Protection:** Workflow files are protected by CODEOWNERS (requires @jmiller review) and a file path restriction ruleset. Only bypass actors can modify `.gitea/workflows/`.
|
||||
|
||||
| Version | What happens |
|
||||
|---------|-------------|
|
||||
@@ -108,7 +108,7 @@ See dedicated docs:
|
||||
|
||||
### Common Features (both deploy workflows)
|
||||
|
||||
- **Permission check:** `jmiller-moko` and `gitea-actions[bot]` hardcoded as authorized; others need `admin`/`maintain` role
|
||||
- **Permission check:** `jmiller` and `gitea-actions[bot]` hardcoded as authorized; others need `admin`/`maintain` role
|
||||
- **Chore skip:** PRs from `chore/` branches do not deploy
|
||||
- **Suffix required:** `{ENV}_FTP_SUFFIX` must be set or deployment is skipped
|
||||
- **Clear before upload:** Remote folder is always cleared before uploading
|
||||
@@ -143,7 +143,7 @@ See [update-server.md](update-server.md) for the full update server specificatio
|
||||
|
||||
**Trigger:** Branch creation matching `dev/**` or `rc/**`
|
||||
|
||||
**What it does:** Auto-creates a tracking issue when a new `dev/**` or `rc/**` branch is pushed. Assigns `jmiller-moko`.
|
||||
**What it does:** Auto-creates a tracking issue when a new `dev/**` or `rc/**` branch is pushed. Assigns `jmiller`.
|
||||
|
||||
| Branch type | Title prefix | Label |
|
||||
|-------------|-------------|-------|
|
||||
|
||||
@@ -212,14 +212,14 @@ if (!$dryRun) {
|
||||
if (!empty($existing[0]['number'])) {
|
||||
$num = $existing[0]['number'];
|
||||
ghApi('PATCH', "repos/{$org}/MokoStandards/issues/{$num}", [
|
||||
'title' => $title, 'body' => $body, 'state' => 'open', 'assignees' => ['jmiller-moko'],
|
||||
'title' => $title, 'body' => $body, 'state' => 'open', 'assignees' => ['jmiller'],
|
||||
], $token);
|
||||
echo "Updated inventory issue #{$num}\n";
|
||||
} else {
|
||||
[$_, $issue] = ghApi('POST', "repos/{$org}/MokoStandards/issues", [
|
||||
'title' => $title, 'body' => $body,
|
||||
'labels' => ['inventory', 'type: chore', 'automation'],
|
||||
'assignees' => ['jmiller-moko'],
|
||||
'assignees' => ['jmiller'],
|
||||
], $token);
|
||||
echo "Created inventory issue #{$issue['number']}\n";
|
||||
}
|
||||
|
||||
@@ -204,12 +204,12 @@ if ($createIssue && $issueCount > 0) {
|
||||
[$_, $existing] = ghApi('GET', "repos/{$org}/MokoStandards/issues?labels=secret-audit&state=all&per_page=1&sort=created&direction=desc", null, $token);
|
||||
if (!empty($existing[0]['number'])) {
|
||||
$num = $existing[0]['number'];
|
||||
ghApi('PATCH', "repos/{$org}/MokoStandards/issues/{$num}", ['title' => "audit: FTP secrets — {$issueCount} issues", 'body' => $body, 'state' => 'open', 'assignees' => ['jmiller-moko']], $token);
|
||||
ghApi('PATCH', "repos/{$org}/MokoStandards/issues/{$num}", ['title' => "audit: FTP secrets — {$issueCount} issues", 'body' => $body, 'state' => 'open', 'assignees' => ['jmiller']], $token);
|
||||
if (!$jsonOut) { echo "Updated audit issue #{$num}\n"; }
|
||||
} else {
|
||||
[$_, $issue] = ghApi('POST', "repos/{$org}/MokoStandards/issues", [
|
||||
'title' => "audit: FTP secrets — {$issueCount} issues", 'body' => $body,
|
||||
'labels' => ['secret-audit', 'type: chore', 'automation'], 'assignees' => ['jmiller-moko'],
|
||||
'labels' => ['secret-audit', 'type: chore', 'automation'], 'assignees' => ['jmiller'],
|
||||
], $token);
|
||||
if (!$jsonOut) { echo "Created audit issue #{$issue['number']}\n"; }
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ class UpdateVersionFromReadme extends CliFramework
|
||||
|
||||
if (!empty($existing[0]['number'])) {
|
||||
$num = (int) $existing[0]['number'];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller-moko']];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller']];
|
||||
if (($existing[0]['state'] ?? 'open') === 'closed') {
|
||||
$patch['state'] = 'open';
|
||||
}
|
||||
@@ -472,7 +472,7 @@ class UpdateVersionFromReadme extends CliFramework
|
||||
'title' => $title,
|
||||
'body' => $body,
|
||||
'labels' => $labels,
|
||||
'assignees' => ['jmiller-moko'],
|
||||
'assignees' => ['jmiller'],
|
||||
]);
|
||||
$this->log('✅ Created issue #' . ($issue['number'] ?? '?') . " in {$repo}");
|
||||
}
|
||||
|
||||
@@ -735,7 +735,7 @@ class RepoHealthChecker extends CliFramework
|
||||
|
||||
if (!empty($existing[0]['number'])) {
|
||||
$num = (int) $existing[0]['number'];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller-moko']];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller']];
|
||||
if (($existing[0]['state'] ?? 'open') === 'closed') {
|
||||
$patch['state'] = 'open';
|
||||
}
|
||||
@@ -749,7 +749,7 @@ class RepoHealthChecker extends CliFramework
|
||||
'title' => $title,
|
||||
'body' => $body,
|
||||
'labels' => $labels,
|
||||
'assignees' => ['jmiller-moko'],
|
||||
'assignees' => ['jmiller'],
|
||||
]);
|
||||
$issueNumber = $issue['number'] ?? 'unknown';
|
||||
$this->log("✅ Created health issue #{$issueNumber} in {$repo}");
|
||||
|
||||
@@ -550,7 +550,7 @@ class DriftScanner extends CliFramework
|
||||
|
||||
if (!empty($existing) && isset($existing[0]['number'])) {
|
||||
$num = $existing[0]['number'];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller-moko']];
|
||||
$patch = ['title' => $title, 'body' => $body, 'assignees' => ['jmiller']];
|
||||
if (($existing[0]['state'] ?? 'open') === 'closed') {
|
||||
$patch['state'] = 'open';
|
||||
}
|
||||
@@ -564,7 +564,7 @@ class DriftScanner extends CliFramework
|
||||
'title' => $title,
|
||||
'body' => $body,
|
||||
'labels' => $labels,
|
||||
'assignees' => ['jmiller-moko'],
|
||||
'assignees' => ['jmiller'],
|
||||
]);
|
||||
$num = $issue['number'] ?? '?';
|
||||
$this->log(" Created drift issue #{$num} in {$repo}");
|
||||
|
||||
Reference in New Issue
Block a user