have an option REFUSED_FILE_TYPES or similar to refuse certain file types to be commited to repository. #11564

Closed
opened 2025-11-02 09:41:12 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @ovisan on GitHub (Aug 30, 2023).

Feature Description

Implement an option, for example REFUSED_FILE_TYPES to specify a list of files that are NOT allowed to be pushed to the repository (eg. exe, zip).
No file of the specified type could be added/pushed/uploaded to the repository/ies

Screenshots

No response

Originally created by @ovisan on GitHub (Aug 30, 2023). ### Feature Description Implement an option, for example REFUSED_FILE_TYPES to specify a list of files that are NOT allowed to be pushed to the repository (eg. exe, zip). No file of the specified type could be added/pushed/uploaded to the repository/ies ### Screenshots _No response_
GiteaMirror added the type/questiontype/proposal labels 2025-11-02 09:41:12 -06:00
Author
Owner

@lng2020 commented on GitHub (Sep 1, 2023):

A protected file pattern can be applied to a specified branch. Can it serve the goal?
protect_file

@lng2020 commented on GitHub (Sep 1, 2023): A protected file pattern can be applied to a specified branch. Can it serve the goal? ![protect_file](https://github.com/go-gitea/gitea/assets/70063547/6754e668-e291-4841-b6ef-82e2f2800591)
Author
Owner

@ovisan commented on GitHub (Sep 1, 2023):

@lng2020 if one cannot push the files with those extensions, then yes. I meant this more for the repository than the branch.

@ovisan commented on GitHub (Sep 1, 2023): @lng2020 if one cannot push the files with those extensions, then yes. I meant this more for the repository than the branch.
Author
Owner

@lng2020 commented on GitHub (Sep 1, 2023):

@lng2020 if one cannot push the files with those extensions, then yes. I meant this more for the repository than the branch.

Surely it can
image
This rule covers all branches in the repo
image

@lng2020 commented on GitHub (Sep 1, 2023): > @lng2020 if one cannot push the files with those extensions, then yes. I meant this more for the repository than the branch. Surely it can ![image](https://github.com/go-gitea/gitea/assets/70063547/cdd2be11-618a-48c1-a98a-4f637674414b) This rule covers all branches in the repo <img width="377" alt="image" src="https://github.com/go-gitea/gitea/assets/70063547/2ddb2cba-4032-4103-b21e-6e8ad957432f">
Author
Owner

@ovisan commented on GitHub (Sep 1, 2023):

@lng2020 looks fine, this would do.

@ovisan commented on GitHub (Sep 1, 2023): @lng2020 looks fine, this would do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11564