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

Add DEFAULT_MIRROR_REPO_UNITS and DEFAULT_TEMPLATE_REPO_UNITS options #32416

Merged

Conversation

Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Nov 4, 2024

Resolve #30350

The action unit of mirrors and templates should be disabled by default. This PR adds DEFAULT_MIRROR_REPO_UNITS and DEFAULT_TEMPLATE_REPO_UNITS options to allow users to specify default units for mirrors and templates.

Thanks to @lng2020 for the idea

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 4, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 4, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code docs-update-needed The document needs to be updated synchronously labels Nov 4, 2024
@lunny
Copy link
Member

lunny commented Nov 4, 2024

If a template is a fork of another template repository, which default should it follow? Forked or template?

@yp05327
Copy link
Contributor

yp05327 commented Nov 5, 2024

Maybe this can be done one by one.

@Zettat123
Copy link
Contributor Author

If a template is a fork of another template repository, which default should it follow? Forked or template?

It should use DEFAULT_FORK_REPO_UNITS because a fork of a template will no longer be a template.

@Zettat123
Copy link
Contributor Author

Maybe this can be done one by one.

Since this PR is to add some new features rather than fix bugs, I think we can do this in one PR.

@Zettat123 Zettat123 marked this pull request as ready for review November 5, 2024 02:47
@Zettat123
Copy link
Contributor Author

@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 Nov 5, 2024
@lunny
Copy link
Member

lunny commented Nov 8, 2024

Please resolve the conflict

@Zettat123
Copy link
Contributor Author

Please resolve the conflict

Done

@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 Nov 10, 2024
@techknowlogick techknowlogick enabled auto-merge (squash) November 10, 2024 23:07
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 10, 2024
@techknowlogick techknowlogick merged commit b1f42a0 into go-gitea:main Nov 11, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Nov 11, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 11, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 11, 2024
* giteaofficial/main:
  Calculate `PublicOnly` for org membership only once (go-gitea#32234)
  Add `DEFAULT_MIRROR_REPO_UNITS` and `DEFAULT_TEMPLATE_REPO_UNITS` options (go-gitea#32416)
  Add a doctor check to disable the "Actions" unit for mirrors (go-gitea#32424)
  Refactor sidebar assignee&milestone&project selectors (go-gitea#32465)
@lunny lunny modified the milestones: 1.24.0, 1.23.0 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-update-needed The document needs to be updated synchronously lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Action unit by default when mirroring a repo?
5 participants