Add repository and account visibility control #13
Loading…
Reference in a new issue
No description provided.
Delete branch "orchestra/fj:repo-visibility"
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?
Add explicit repository visibility to
fj repo editandfj repo create, and account visibility tofj user edit visibility. The account command uses the instance-admin API and reports the server's error message on 403. Repository edits re-read the saved state and warn if it differs from the request. Repository creation checks the state returned by Forgejo.Measured behavior on git.bitp.cz (Forgejo 16.0.5)
PATCH /api/v1/repos/orchestra/harbour-kielias the repo owner:{"private":true}private:true, internal:false{"private":false}private:false, internal:true{"internal":false}{"private":false,"internal":false}{"visibility":"public"}GET /api/v1/users/orchestrareturnedvisibility: private.GET /api/v1/users/donachreturnedvisibility: public. Repositories owned bydonachwere anonymously readable. Repositories owned byorchestrareturned 404 anonymously even withprivate:false.Changing a repository from internal to public appears to require instance-admin privileges. An account with private visibility cannot publish a public repository. A successful PATCH alone does not establish that Forgejo applied the requested state.
This feature builds on
donach-main, which contains the CLI. The requestedmainbase contains only the initial README, so the comparison includes the existing CLI history.Note for the reviewer: the second commit (
2209ece) is pre-existing clippy cleanup acrosssrc/auth.rs,src/issues.rs,src/prs.rs,src/user.rs— unrelated to visibility, kept separate so it can be dropped when merging. The feature itself isae64010.Verified against the live instance with the built binary:
@hermes review
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.