Closed
Description
Description
I'm trying to deny changes into files that match globs .gitea/**/*;.github/**/*
using "Protected file patterns" features in Branch protections. But after configuring everything i'm still can modify files
Steps to reproduce:
- Create repository
- Add file .gitea/workflow/test.yaml with dummy content
- Create branch "test/branch"
- Go to repository settings -> Branches and add new Branch protection rule
- Define following Branch protection configuration:
- Protected Branch Name Pattern: test/branch
- Enable push: (checked)
- Protected file patterns (separated using semicolon ';'):
.gitea/**/*;.github/**/*
- Other settings should be with default configuration
- Save Branch protection rule
- Go to branches list page to verify that Branch protection rule applied to branch "test/branch". It should have shield icon before name
- Go to Code. Select "test/branch" and navigate to .gitea/workflow/test.yaml file
- Press Edit file
- Do any modifications in file content
- Commit changes directly to "test/branch"
Expected behaviour:
Changes shouldn't be saved, since file protected by Branch protection rule. Edit page have warning message that this file couldn't be edited since Branch pretection rule deny this
Actual behaviour:
Changes saved
Gitea Version
1.19.3
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Ubuntu 22.04
How are you running Gitea?
Binary release was installed and managed by systemd service
Database
PostgreSQL