mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #8] [MERGED] fix(kb, publish): PRs from forks, and UTF-8 / forward slashes on Windows #54
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/8
Author: @taras-ryzhenko
Created: 10/2/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @rehan-remade
Base:
main← Head:fix/kb-pr-fork-head📝 Commits (1)
4dc681bfix(kb, publish): PRs from forks, and UTF-8 / forward slashes on Windows📊 Changes
3 files changed (+41 additions, -16 deletions)
View changed files
📝
tests/test_um.py(+14 -3)📝
um/kb.py(+25 -11)📝
um/publish.py(+2 -2)📄 Description
Two bugs hit while contributing a field note from Windows (#7), plus one small cross-platform fix.
1.
um kb pr --yescan't open the PR from a fork. Without push access the route is fork → push →gh pr create --repo rehan-remade/universal-modder --head <branch>. gh looks a bare--headbranch up in the base repo, so the last step fails after the branch is already pushed:The head is now
<fork owner>:<branch>, read from theforkremote's URL (kb.pr_head, tests for https and ssh remotes). Pushing to the repo itself (maintainers) is unchanged.2.
um kb indexon Windows writes an invalid-UTF-8 index.Path.read_text()/write_text()default to the ANSI code page there (and\r\n), so the·separators inINDEX.mdbecame lone0xB7bytes;um kb check --indexandtest_repo_knowledge_is_validthen fail on Linux. Notes and the index are now read/written as UTF-8 with\n(kb.TEXT), as on Linux/macOS.3.
um publish checkprintedsrc\Mod.cson Windows (the test expectssrc/Mod.cs): paths are reported with forward slashes.Tests: the suite read the knowledge files with the default encoding too; it now passes on Windows 10 / Python 3.12 (
uv run --with pytest pytest -q tests: 27 passed), plusum kb check --indexand everyum <group> --help.Written with Claude Code (Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.