Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stars when repo goes private #19904

Merged
merged 12 commits into from
Jun 5, 2023
Merged

Remove stars when repo goes private #19904

merged 12 commits into from
Jun 5, 2023

Conversation

42wim
Copy link
Member

@42wim 42wim commented Jun 6, 2022

Fixes #18600

@42wim 42wim added the type/bug label Jun 6, 2022
@42wim 42wim added this to the 1.17.0 milestone Jun 6, 2022
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@3d9c02a). Click here to learn what that means.
The diff coverage is 18.18%.

@@           Coverage Diff           @@
##             main   #19904   +/-   ##
=======================================
  Coverage        ?   47.31%           
=======================================
  Files           ?      960           
  Lines           ?   133686           
  Branches        ?        0           
=======================================
  Hits            ?    63247           
  Misses          ?    62727           
  Partials        ?     7712           
Impacted Files Coverage Δ
modules/repository/create.go 42.28% <0.00%> (ø)
models/repo/star.go 38.98% <25.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d9c02a...c57c545. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 6, 2022
@techknowlogick
Copy link
Member

Perhaps we should add a UI warning that starts will be removed when made private, as we don't want to repeat: https://twitter.com/httpie/status/1514729922799022083

@lunny
Copy link
Member

lunny commented Jun 7, 2022

We need to add this to change list on the popup warning window.

@a1012112796
Copy link
Member

In my view, maybe should recheck read permission of each stared users.

@lunny
Copy link
Member

lunny commented Jun 7, 2022

In my view, maybe should recheck read permission of each stared users.

But that's a low-performance thing.

@42wim
Copy link
Member Author

42wim commented Jun 7, 2022

We need to add this to change list on the popup warning window.

Which change list do you mean ? on which warning window ?
Afaik nothing shows a popup when updating anything on the basic setings of the repo.
(should we move setting the repo private to the danger zone?)

@silverwind
Copy link
Member

silverwind commented Jun 8, 2022

We need to add this to change list on the popup warning window.

Which change list do you mean ? on which warning window ? Afaik nothing shows a popup when updating anything on the basic setings of the repo. (should we move setting the repo private to the danger zone?)

I'd just add a tooltip:

<div class="ui checkbox tooltip" data-content="This will remove all stars from this repository">

Of course, it should only show if repo actually has any stars and only when the checkbox is rendered unchecked.

@42wim
Copy link
Member Author

42wim commented Jun 8, 2022

Sure

image

42wim and others added 2 commits June 8, 2022 23:24
delvh
delvh previously requested changes Jun 8, 2022
models/repo/star.go Outdated Show resolved Hide resolved
models/repo/star_test.go Outdated Show resolved Hide resolved
models/repo/star_test.go Outdated Show resolved Hide resolved
modules/repository/create.go Outdated Show resolved Hide resolved
templates/repo/settings/options.tmpl Outdated Show resolved Hide resolved
templates/repo/settings/options.tmpl Show resolved Hide resolved
@lunny
Copy link
Member

lunny commented Jun 9, 2022

We need to add this to change list on the popup warning window.

Which change list do you mean ? on which warning window ? Afaik nothing shows a popup when updating anything on the basic setings of the repo. (should we move setting the repo private to the danger zone?)

I mean we need to popup a warning window when submit the button if private property changed. The popup window should list all possible break changes.

Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with tooltip alone, anything more is overkill imho

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 9, 2022
@lunny
Copy link
Member

lunny commented Jun 11, 2022

There is already a hint beside the checkbox.

image

Then another tooltip is also about the effect.

I think we can group the two warning into a popup window and user have a confirm button.

@rempas
Copy link

rempas commented Jun 14, 2022

There is already a hint beside the checkbox.

image

Then another tooltip is also about the effect.

I think we can group the two warning into a popup window and user have a confirm button.

I also think a pop-up is a better idea! Some users may just press it without noticing the tooltip (which is their mistake but still). Don't forget that is something very important and there is no turning back after that. So in my humble opinion, having a pop-up after ticking the box is a better idea.

Batter be safe than sorry!

6543 and others added 3 commits June 15, 2022 08:16
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: delvh <dev.lh@web.de>
@6543
Copy link
Member

6543 commented Jun 15, 2022

agree - we need to highlight that this is a ireversible change as stuff will get deleted

@lunny lunny removed this from the 1.17.0 milestone Jun 16, 2022
@lunny lunny added this to the 1.18.0 milestone Jun 16, 2022
@lunny lunny modified the milestones: 1.18.0, 1.19.0 Oct 20, 2022
@lunny lunny modified the milestones: 1.19.0, 1.20.0 Feb 2, 2023
@GiteaBot GiteaBot removed the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 5, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 5, 2023
@GiteaBot GiteaBot added the lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged label Jun 5, 2023
@6543 6543 removed the lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged label Jun 5, 2023
@GiteaBot GiteaBot added the lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged label Jun 5, 2023
@6543 6543 dismissed delvh’s stale review June 5, 2023 11:18

mv in new issue

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Jun 5, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 5, 2023
@6543 6543 enabled auto-merge (squash) June 5, 2023 11:19
@6543 6543 disabled auto-merge June 5, 2023 12:55
@6543 6543 enabled auto-merge (squash) June 5, 2023 13:00
@6543 6543 merged commit 62ac325 into go-gitea:main Jun 5, 2023
6543 added a commit to 6543-forks/gitea that referenced this pull request Jun 5, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 6, 2023
* upstream/main: (26 commits)
  Clean up WebAuthn javascript code and remove JQuery code (go-gitea#22697)
  Enable all webpack sourcemaps in dev build, disable all in prod build (go-gitea#25089)
  Don't display `select all issues` checkbox when no issues are available (go-gitea#25086)
  change placeholders in actions docs
  change placeholders in actions docs
  fix "Remove stars when repo goes private go-gitea#19904" (go-gitea#25084)
  Introduce how to configure cache when starting a Runner with Docker (go-gitea#25077)
  Remove stars when repo goes private (go-gitea#19904)
  Use correct selector for hiding RSS icon link in the branch selector dropdown (go-gitea#25080)
  Fix parallelly generating index failure with Mysql (go-gitea#24567)
  Use git command instead of the ini package to remove the `origin` remote (go-gitea#25066)
  improve permission documentation (go-gitea#23942)
  Use RepositoryList instead of []*Repository (go-gitea#25074)
  Add ability to set multiple redirect URIs in OAuth application UI (go-gitea#25072)
  Add Progressbar to Milestone Page (go-gitea#25050)
  [skip ci] Updated licenses and gitignores
  Redesign Scoped Access Tokens (go-gitea#24767)
  Use a separate admin page to show global stats, remove `actions` stat (go-gitea#25062)
  Remove cancel button from branch protection form (go-gitea#25063)
  Allow for PKCE flow without client secret + add docs (go-gitea#25033)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Unstar private repos