Repository navigation
refactor: rewrite wikisync in Go - #5
Merged
Merged
Conversation
Reimplement pull, status and diff in Go, preserving the CLI surface and the .wikisync on-disk format (manifest v2, baseline-by-pageid). The read client is plain net/http + encoding/json; diffs use go-difflib. Ships as a single static binary instead of a Python package. - Replace the uv/pyproject toolchain with Go modules; justfile and pre-commit switch to gofmt / golangci-lint / go vet / go test. - CI runs the Go gate; release.yml now builds cross-platform binaries with GoReleaser (GitHub Releases) instead of publishing to PyPI. CLI flags now precede page titles (Go flag convention).
CameronBrooks11
added a commit
that referenced
this pull request
Nov 11, 2026
CodeQL's first run on this repo raised 5 medium `actions/missing-workflow-permissions` alerts (#1-#5), one per job in `.github/workflows/check.yml`, because the workflow declares no `permissions:` block. The repo's default workflow token is already `read` (`GET repos/CameronBrooks11/wikisync/actions/permissions/workflow` → `"default_workflow_permissions":"read"`), so this pins that in the file rather than changing behaviour. `pull-requests: read` covers `dorny/paths-filter`, which lists a PR's changed files through the API. This PR's own run exercises the `pull_request` path of `paths-filter` under the new permissions; the alerts should close on the next CodeQL run after merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rewrites wikisync in Go, replacing the Python implementation. Same tool, same
behaviour, better distribution: a single static binary instead of a Python +
uv install.
pull,status,diffto Go, preserving the CLI surface and the.wikisyncon-disk format (manifest schema v2, baseline snapshots keyed bypage id). A working tree pulled by the Python version is readable unchanged.
net/http+encoding/json(no MediaWiki clientdependency yet); unified diffs use
go-difflib.justfileand pre-commitswitch to
gofmt/golangci-lint/go vet/go test -race.release.ymlnow builds cross-platform binaries with GoReleaserand attaches them to a GitHub Release (PyPI publishing removed).
One behaviour change: CLI flags now precede page titles (Go's
flagconvention), e.g.
wikisync pull --dir ./pages "Title".Verification
Locally:
go build,go vet,go test -race ./...(all packages pass),gofmtclean, andgoreleaser checkvalidates.goreleaser.yaml. Liveend-to-end against Appropedia: pulled "Welcome to Appropedia" (pageid 14533,
baseline written),
statusreported unchanged then modified after an edit, anddiffproduced the expected unified diff with therev 1264646label.golangci-lint could not run on the dev machine — its Go toolchain (1.27.3) emits
export-data version 5, which golangci-lint 2.13.1 cannot read (max 4). CI pins
Go 1.23 via
go.mod, where golangci-lint runs normally, sojust check(fmt-check + lint + vet) is exercised here.
Deferred (unchanged plan)
push— bot-password auth from env,baserevidpreflight, preview-by-defaultwith
--apply, tested against a controlled wiki. Now with a Go MediaWiki client(e.g. go-mwclient) for the login/edit-token flow.