repo: support unlisted but publicly accessible repositories#6176
repo: support unlisted but publicly accessible repositories#6176
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6176 +/- ##
========================================
+ Coverage 8.65% 8.91% +0.25%
========================================
Files 99 99
Lines 17767 17821 +54
========================================
+ Hits 1537 1588 +51
- Misses 16073 16074 +1
- Partials 157 159 +2 |
|
Can you fix it? I can’t view these diffs on GitHub UI. (What I meant was the numbers look wrong) |
|
Please refer to https://github.com/gogs/gogs/blob/master/docs/dev/local_development.md and make sure you’re using the correct go-bindata. https://github.com/kevinburke/go-bindata |
|
Hm, it's possible I did a full regen while switching branches. I'll clean it up and rebase. |
f597682 to
6e899d5
Compare
|
Regenerated only required |
|
Thanks for the follow up! I'll have this review when I have more bandwidth :) |
|
When will this be live? Looks promising, just what a lot of people are looking for! Thanks for adding this @achilleas-k |
Repositories are shown for users with access (owners, collaborators).
Shown for owner.
- Add to form (needs restyling) - Trigger visibility change when Unlisted is toggled
- Copy Unlisted option when Forking and Migrating. - Update forks with Unlisted state when changed. - Change visibility of Actions when Unlisted state changes.
Visibility label for a box which includes Private and Unlisted options.
- Add option for creating repository as Unlisted on new repos and migrations. - Transfer the Unlisted setting when forking.
Unlisted option in forms for new repositories, migrations, and forks (read only).
Probably temporary. Should use something more appropriate, like the eye-closed from newer versions of octicon.
@TheRealJP It is :) Can't guarantee when though, but just added to my current 0.13 pipeline. |
|
Rebasing on main now to keep the PR up to date. |
6e899d5 to
22c9229
Compare
|
Thanks again and congrats! |

This PR adds support for publicly accessible but unlisted (secret) repositories (issue #5733).
Forms and UI
I'm including screenshots to show how the new checkbox appears in all relevant forms.
Creation
Settings
Settings (forked)
Icon
Note that, as I mentioned in the relevant issue, I included the icon for testing but it should probably be replaced by something more appropriate, like the eye-closed octicon in newer versions, or anything you might feel is more appropriate..
Behaviour
Unlisted repositories behave like Private repositories on pages that list repositories. The difference is that users who know the URL are allowed to view and clone them. The general idea is that Unlisted repositories should be "secret", in that no user should be able to discover them, but users who know about them can read them. In the interest of clarity and posterity, below I list how Unlisted repositories behave in all relevant cases.
For the owner of an unlisted repository:
For a collaborator of an unlisted repository:
For owners of organisations with unlisted repositories:
For organisation team members with access to unlisted repositories:
For other users and guest (non-logged-in) users:
General:
API
Adding the Unlisted property to the API requires editing the structs in the go-gogs-client, which I'll do later and then reflect the changes here as necessary.