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

Closed
opened 2025-11-02 10:21:17 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @yp05327 on GitHub (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

Originally created by @yp05327 on GitHub (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_
GiteaMirror added the type/proposal label 2025-11-02 10:21:17 -06:00
Author
Owner

@lunny commented on GitHub (Apr 9, 2024):

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

@lunny commented on GitHub (Apr 9, 2024): I think it already can be disabled from the repository setting.
Author
Owner

@yp05327 commented on GitHub (Apr 9, 2024):

Changed the title to By default

@yp05327 commented on GitHub (Apr 9, 2024): Changed the title to `By default`
Author
Owner

@wienans commented on GitHub (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.

@wienans commented on GitHub (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.
Author
Owner

@yp05327 commented on GitHub (Apr 13, 2024):

maybe we can add an option when create a mirror repo

@yp05327 commented on GitHub (Apr 13, 2024): maybe we can add an option when create a mirror repo
Author
Owner

@wienans commented on GitHub (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.

@wienans commented on GitHub (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.
Author
Owner

@lng2020 commented on GitHub (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 commented on GitHub (Apr 14, 2024): ![image](https://github.com/go-gitea/gitea/assets/70063547/827aea02-8753-4519-88f1-7748e0dee2a0) 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)
Author
Owner

@lng2020 commented on GitHub (Apr 14, 2024):

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

@lng2020 commented on GitHub (Apr 14, 2024): Or should we turn `DefaultTemplateRepoUnits` and `DefaultMirrorRepoUnits` into settings in `app.ini`?
Author
Owner

@yp05327 commented on GitHub (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

@yp05327 commented on GitHub (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](https://github.com/go-gitea/gitea/assets/18380374/2db473da-f931-4a0c-b440-70772c771631)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12797