Skip to content

Disable Action unit by default when mirroring a repo? #30350

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

Closed
yp05327 opened this issue Apr 9, 2024 · 8 comments · Fixed by #32416
Closed

Disable Action unit by default when mirroring a repo? #30350

yp05327 opened this issue Apr 9, 2024 · 8 comments · Fixed by #32416
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@yp05327
Copy link
Contributor

yp05327 commented Apr 9, 2024

Feature Description

For a mirror, the workflows are designed for the original repo, so something like secrets would not work or some unexpected things may happen? e.g. CD run twice when there's a runner with same label and no secret checks or something which would block the CD? ( original and mirror)

Screenshots

No response

@yp05327 yp05327 added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Apr 9, 2024
@lunny
Copy link
Member

lunny commented Apr 9, 2024

I think it already can be disabled from the repository setting.

@yp05327 yp05327 changed the title Disable Action unit when mirror a repo? Disable Action unit by default when mirroring a repo? Apr 9, 2024
@yp05327
Copy link
Contributor Author

yp05327 commented Apr 9, 2024

Changed the title to By default

@wienans
Copy link
Contributor

wienans commented Apr 12, 2024

Similar for templates. Would be nice to disable it by default so my the devs can enable it if they added configuration but don’t need to think about disabling it when it is not used.

@yp05327
Copy link
Contributor Author

yp05327 commented Apr 13, 2024

maybe we can add an option when create a mirror repo

@wienans
Copy link
Contributor

wienans commented Apr 13, 2024

For creating a repo from template we already have many options, one checkbox more shouldn’t be a huge disruption in UX I think.

and it would be nice if the workflows itself are disabled after creating it not actions tab from the repo settings.

@lng2020
Copy link
Member

lng2020 commented Apr 14, 2024

image
I've already found a place(and other related code) to modify the repo unit. But I'm not sure about which unit should be included for the mirror and template repos.
Should only the action unit be removed or other units(wiki, project, etc) should be removed too? I think currently we do not support other units for both the template or mirror repos (although there is a PR that tried to mirror other staff IIRC)

@lng2020
Copy link
Member

lng2020 commented Apr 14, 2024

Or should we turn DefaultTemplateRepoUnits and DefaultMirrorRepoUnits into settings in app.ini?

@yp05327
Copy link
Contributor Author

yp05327 commented Apr 15, 2024

Should only the action unit be removed or other units(wiki, project, etc) should be removed too?

I think this is based on the mirror options. If you removed some of them, but user select one of them, then bugs may come.
image

techknowlogick pushed a commit that referenced this issue Nov 11, 2024
…ions (#32416)

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](#30350 (comment))
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants