Repository navigation
Sync repo visibility with forge as new default option - #7602
Conversation
Since woodpecker-ci#6544 a repo only takes the visibility from the forge when the forge sends one, which only GitLab does. A repo made private on the forge stays public in Woodpecker, and on GitLab every hook overwrites a visibility set in Woodpecker. Store per repo whether its visibility follows the forge. Without the flag the visibility set in Woodpecker is kept, while the forge privacy used for clones is still updated. Also drop the unused ResetVisibility.
Explain the new sync setting, that read access only follows the forge visibility when it is synced, and that admins should repair all repos so existing ones get the sync.
Only GitLab reported a visibility, so the sync could not follow the other forges. GitHub and Bitbucket map their private flag, Bitbucket Datacenter its public flag. Gitea and Forgejo also map an owner with limited visibility to internal, as only signed in users see its repos. Bitbucket Datacenter hooks still return the stored repo, so it only syncs on repair and move.
New repos sync their visibility by default, and the add repo list shows that default. Repair enables the sync so existing repos move to it; re-activation keeps the visibility settings of a repo. A patch that enables the sync ignores the visibility, the next sync overwrites it.
While the sync is enabled the visibility radio only shows the current value, as the next sync would overwrite a change.
Let repo update enable or disable the sync and expose the flag on the repo of the Go client.
|
Surge PR preview deployment was removed |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7602 +/- ##
==========================================
+ Coverage 66.99% 67.37% +0.38%
==========================================
Files 451 451
Lines 22690 22722 +32
==========================================
+ Hits 15201 15309 +108
+ Misses 7489 7413 -76 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Repair should only fix the repo, not change its settings. Turning the sync on there silently made repos public that are private in Woodpecker but public on the forge.
|
@qwerty287 last open question, should a re-enable set default values or keep legacy ones? |
|
this then should also affect other settings ... |
|
As I wrote, it should keep the old value I think And if sync was enabled before it should stay enabled and then we also have to sync the visibility on re-activation |
|
sorry dont saw your reply till jet |
|
No problem. All the other settings are also kept right now |
|
for your suggestion to order repo settings etc... e.g. DTO, I'll create a discussion |




close #1220
we had inconsistencies in visibility modes.
for example gitlab do since #6544 take the visibility from the forge if the forge sends one ...
... the rest does no sync at all.
so a repo made private on the forge stays public in woodpecker, and on gitlab every hook overwrites the visibility set in woodpecker :/
this adds a repo option
visibility_sync. if enabled we sync the visibility on hook, repair and move, else we keep what is set in woodpecker and only update the forge private flag used for cloning.