harness / gitness

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
https://gitness.com
Apache License 2.0
31.96k stars 2.79k forks source link

Branch Protection - Config File #3464

Open rawkode opened 6 months ago

rawkode commented 6 months ago

It would be quite nice if branch protection could be configured in .harness or .gitness of the repositories, rather than storing this information within the database.

bradrydzewski commented 5 months ago

Thanks for the suggestion. The current implementation stores rules in the database for security purposes — we need to restrict branch protection rule management to repository owners and ensure regular contributors with write access could not change rules. We don't have any immediate plans to augment the approach with a file-based configuration, however, we are open to a future enhancement if we see enough demand for this capability.

rawkode commented 4 months ago

When the rules are stored in Git, this could enforce PRs against the main branch; to maintain security of rules.