Commit Graph

20959 Commits

Author SHA1 Message Date
jmiller 997b13e596 chore: sync updates.xml 05.22.00 from main [skip ci] 2026-06-04 12:33:42 +00:00
jmiller c6ee8f0756 chore: sync updates.xml 05.21.00 from main [skip ci] 2026-06-04 12:07:54 +00:00
jmiller cce25ce17d chore: sync updates.xml 05.20.00 from main [skip ci] 2026-06-04 11:58:18 +00:00
jmiller 0054cb901c chore: sync updates.xml 05.19.00 from main [skip ci] 2026-06-04 11:52:35 +00:00
jmiller 6fe63c50f1 chore: sync updates.xml 05.18.00 from main [skip ci] 2026-06-03 03:00:45 +00:00
jmiller 5091a6ea31 chore: sync updates.xml 05.17.00 from main [skip ci] 2026-06-03 03:00:05 +00:00
jmiller b0027d5607 chore: sync updates.xml 05.05.00 from main [skip ci] 2026-05-30 18:00:54 +00:00
jmiller a5ee7475fc chore: sync updates.xml 05.04.00 from main [skip ci] 2026-05-30 17:37:17 +00:00
jmiller 7343681445 chore: sync updates.xml 05.03.00 from main [skip ci] 2026-05-30 17:24:18 +00:00
jmiller 1703d73d68 chore: sync updates.xml 05.02.00 from main [skip ci] 2026-05-30 16:15:30 +00:00
jmiller 4ec61ec260 Merge pull request 'fix: org sidebar not listing members or teams (#183)' (#184) from fix/183-org-sidebar into dev
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
v1.26.1-moko.05.00.00-rc.185
2026-05-26 01:57:26 +00:00
Jonathan Miller b5defc2a4a fix: populate org home sidebar with members, teams, and public member status (#183)
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
The org home page template expects .Members, .NumMembers, .Teams,
.IsOrganizationMember, .IsOrganizationOwner, and .IsPublicMember
but the handler only set OrgOverviewMembers and OrgOverviewTeams
(different key names). The sidebar rendered empty because the
template variables were undefined.

Fixed by adding all required data bindings and capturing the
membersIsPublic map (previously discarded) as a callable function.

Closes #183

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 20:56:44 -05:00
jmiller a45be34139 Merge pull request 'feat(ci): auto-update updates.xml on production deploy' (#179) from feat/auto-update-xml into dev
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
v1.26.1-moko.05.00.00-rc.180
2026-05-26 00:56:19 +00:00
Jonathan Miller d97955394f feat(ci): auto-update updates.xml on production deploy
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
After a successful production deployment, the deploy workflow now
automatically updates updates.xml on main with the new version,
release URL, and docker image tag for the stable channel.

Dev deployments skip this step — only production releases update
the stable channel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 19:49:04 -05:00
jmiller 592a71968f Merge pull request 'feat(ci): enable maintenance mode during deployments' (#177) from feat/deploy-maintenance-mode into dev
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
v1.26.1-moko.05.00.00-rc.178
2026-05-26 00:35:09 +00:00
Jonathan Miller d55b79a9ff feat(ci): enable maintenance mode during deployments
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
The deploy workflow now:
1. Enables maintenance mode before building (users see maintenance page)
2. Builds, pushes, and restarts the container
3. Disables maintenance mode after health check passes (if: always)

Uses Gitea's built-in maintenance mode via admin config API.
If the instance is already down, the enable step gracefully warns
instead of failing. The disable step runs even if deploy fails
to avoid leaving the instance in maintenance mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 19:33:59 -05:00
jmiller 64e1e37e20 Merge pull request 'fix: generate checksums on API asset upload' (#175) from feat/release-sha-checksums into dev
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
v1.26.1-moko.05.00.00-rc.176
2026-05-26 00:15:52 +00:00
Jonathan Miller a847129f9c fix: generate checksums on API asset upload, not just CreateRelease
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
The API endpoint POST /releases/{id}/assets bypasses CreateRelease
and UpdateRelease, so checksums were not generated for API uploads.
Added GenerateReleaseChecksums call after successful asset upload.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 19:15:12 -05:00
jmiller 30e16cccc1 Merge pull request 'feat: auto-generate SHA256 checksums for release attachments' (#174) from feat/release-sha-checksums into dev 2026-05-26 00:08:48 +00:00
jmiller b74cf800ef Merge pull request 'feat: update checker channels, email + ntfy notifications' (#173) from feat/update-checker-channels into dev 2026-05-26 00:08:09 +00:00
Jonathan Miller 90f612f211 feat: auto-generate SHA256 checksums for release attachments
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
When a release is created or updated with attachments, automatically
compute SHA256 checksums for every file and attach a checksums.sha256
manifest file. The manifest follows the standard sha256sum format:
  <hash>  <filename>

Existing checksums.sha256 files are replaced when attachments change.
Checksums are generated for both CreateRelease and UpdateRelease flows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 19:05:13 -05:00
Jonathan Miller 49fe3cf6eb feat: add ntfy push notification for update checker
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Update notifications now go through three channels:
- Admin dashboard banner (existing)
- Email to admin (added in previous commit)
- ntfy push notification (new)

Configure in app.ini:
  [ntfy]
  ENABLED = true
  SERVER_URL = https://ntfy.mokoconsulting.tech
  DEFAULT_TOPIC = mokogitea
  TOKEN = (optional bearer token)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 18:34:14 -05:00
Jonathan Miller 13352e7213 feat: email admin when MokoGitea update is detected
The update checker now emails the first admin user when a new version
is found on the configured channel. Notifications are deduplicated —
only sent once per new version, not on every cron tick.

- Added NotifyFunc callback in updatechecker module
- Wired to mailer in cron task registration
- Created mail_update.go with plain-text email including version,
  channel, release URL, and docker pull command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 18:24:03 -05:00
Jonathan Miller 07827bcc2e test: bump dev channel to 06.00.00-dev to test update checker
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 18:19:32 -05:00
Jonathan Miller 8509932b41 feat: update channel selector dropdown on admin dashboard
Add a dropdown on the admin dashboard to switch between update streams
(stable, rc, beta, alpha, development) matching the Joomla pattern.

Changes:
- Admin dashboard shows channel selector with descriptions
- POST handler validates and applies channel change in-memory
- Triggers immediate re-check against updates.xml after switch
- updates.xml has all 5 standard channels with descriptions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 17:58:39 -05:00
Jonathan Miller 8ad1b8a110 chore: align update streams to standard channels (dev/alpha/beta/rc/stable)
Matches the Joomla update server pattern used across all Moko repos.
Removed the non-standard 'security' channel. All five standard
channels now present in updates.xml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 17:55:28 -05:00
Jonathan Miller be5c2d35a5 chore: bump updates.xml to v05.00.00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 17:53:13 -05:00
jmiller 83244e8361 Merge pull request 'chore(core): separate MokoGitea namespace from upstream code.gitea.io' (#171) from feat/132-namespace-separation into main v1.26.1-moko.05.00.00 2026-05-25 21:36:55 +00:00
Jonathan Miller c572fcfe04 chore(core): rename Go module from code.gitea.io/gitea to MokoGitea namespace
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Rename the Go module path from code.gitea.io/gitea to
git.mokoconsulting.tech/MokoConsulting/MokoGitea across the entire
codebase.

Scope:
- go.mod module declaration
- 2,235 Go source files (import paths)
- Dockerfile WORKDIR and COPY paths
- Swagger API templates
- golangci.yml linter config

External dependencies (code.gitea.io/gitea-vet, code.gitea.io/sdk/gitea,
gitea.com/gitea/act, etc.) are intentionally NOT renamed — they are
separate upstream modules.

Closes #132

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 00:22:38 -05:00
jmiller c233878484 feat(ci): add issue-branch.yml [skip ci] 2026-05-25 05:12:46 +00:00
jmiller 39150c6968 Merge pull request 'fix(ci): PR RC workflow YAML fix' (#170) from feat/test-rc-workflow into main 2026-05-25 05:01:00 +00:00
moko-deploy 417bda1735 chore(ci): update RC stream for PR #170 2026-05-25 04:59:38 +00:00
Jonathan Miller f09aadf60c fix(ci): use env var for API_BASE in RC release step
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
The Python heredoc couldn't access shell-local API variable.
Move it to step-level env so os.environ sees it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.26.1-moko.04.01.00-rc.170
2026-05-24 23:59:15 -05:00
Jonathan Miller fa54fe1ffc fix(ci): rewrite PR RC workflow — move XML generation to Python
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
The previous workflow had raw XML in bash heredocs that broke the
YAML parser during workflow discovery, causing Gitea to silently
skip the entire workflow.

Fix: all XML generation and API calls now use Python heredocs
(<<'PYEOF') which don't contain characters that confuse the YAML
parser. All github context values passed via env vars instead of
inline expressions in run blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:54:54 -05:00
Jonathan Miller 49fb7bb9a4 test: verify PR RC workflow triggers
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:51:31 -05:00
Jonathan Miller 5dd98c04d8 fix(ci): rewrite PR RC workflow to bypass Gitea branches filter bug
Gitea Actions doesn't reliably evaluate the branches: filter on
pull_request events, causing the workflow to never trigger. Replaced
with a step-level guard that checks github.base_ref at runtime.

Also fixed:
- XML insertion using sed 'e' command instead of shell interpolation
- RC entry removal using Python regex for reliability
- Simplified API URL construction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:51:18 -05:00
jmiller ea3957597c Merge pull request 'rc(v04.01.00): release candidate' (#168) from rc/04.01.00 into main v1.26.1-moko.04.01.00 2026-05-25 04:27:24 +00:00
Jonathan Miller 45e08616ac fix(ci): remove draft check from PR RC workflow
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Gitea Actions may not evaluate github.event.pull_request.draft
correctly, preventing the workflow from triggering entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:26:16 -05:00
Jonathan Miller 4dafcc5429 fix(ci): remove draft check from PR RC workflow
Gitea Actions may not evaluate github.event.pull_request.draft
correctly, preventing the workflow from triggering entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:26:13 -05:00
Jonathan Miller 3159d53322 chore: bump version to 04.01.00 for next release cycle
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:21:20 -05:00
Jonathan Miller fff64e6e7c fix(ci): fix RC workflow API URL, update CHANGELOG for v1.26.1-moko.04.00.00
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
- Fix missing https:// protocol in pr-rc-release.yml API URL
- Update comment to remove stale fan-out reference
- Add comprehensive CHANGELOG entry for v1.26.1-moko.04.00.00 release

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:17:31 -05:00
Jonathan Miller 1d4340a142 feat(ci): auto-build RC release on PR to main
When a PR is opened or updated against main:
- Determines RC version from updates.xml base + PR number
- Creates/updates a prerelease on Gitea tagged as v1.26.1-moko.{version}-rc.{PR#}
- Updates updates.xml with RC channel entry pointing to the PR

Admins on the RC update channel will see the PR build as an available
update, matching the Joomla update server pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 23:09:49 -05:00
Jonathan Miller 60670d066b feat: Joomla-style updates.xml with channel selection for update checker
Replace JSON API-based update checking with Joomla-style updates.xml
that supports multiple update streams (stable, dev, security).

Changes:
- Add updates.xml at repo root with stable/dev/security channels
  following the same XML structure as MokoOnyx and other Joomla repos
- Rewrite updatechecker module to parse XML with channel filtering
- Add CHANNEL setting to [update_checker] config (default: stable)
- Show channel name and docker pull command in admin dashboard banner

Config example:
  [update_checker]
  ENABLED = true
  CHANNEL = stable

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 22:56:04 -05:00
Jonathan Miller e8b2a485fc fix: remove unused setting import in action.go
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.26.1-moko.04.00.00
2026-05-24 17:47:58 -05:00
Jonathan Miller cd496f159d fix: restore Permission field access in context middleware functions
The upstream reading permission fix (#37781) refactored Repository
to have direct IsAdmin/CanWrite/CanRead methods, but our fork's
Repository struct still uses the Permission field for these.
Keep the new CheckTokenScopes function but use ctx.Repo.Permission.*
for the middleware functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 17:42:17 -05:00
Claude afbff02d81 chore: go mod tidy for security dependency updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 22:07:57 +00:00
Claude 8355b39ad4 chore: update go.sum for golang.org/x/net v0.55.0 transitive deps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 19:52:16 +00:00
Jonathan Miller c2c9e053ff chore: update version format to 3-part moko semver
Update deploy workflow description to reflect new versioning scheme:
v{upstream}-moko.{major}.{minor}.{patch} (e.g. v1.26.1-moko.04.00.00)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 13:29:30 -05:00
jmiller 451b3022bd Merge pull request 'fix: .mod lexer panic, pnpm lockfile, branding updates' (#166) from fix/security-backports into main 2026-05-24 09:14:24 +00:00
Claude 2153d7c916 chore: regenerate pnpm-lock.yaml for mermaid v11.15.0 security update
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 09:11:14 +00:00