How to restrict users of Google Dataform from pushing the committed code to the "default branch"

In my project the user was accidentally able to push the committed code to the main branch which is the configured "default branch". We use GitHub. Is it possible to disable the "Push to default branch" option in Dataform. Can we restrict using GitHub access for the secret key? Please let me know the solution to this problem.

Thanks, Prem

 

daform git.jpg

 

0 2 96
2 REPLIES 2

I'm not sure about dataform specifically but you can set up branch protection rules that restrict forced PRs in your repo.

Thanks for your reply. I am using a secret key from GitHub to connect dataform to GitHub, i will look into restricting access when i create the secret key. The GitHub repository has PR restrictions in place for the main branch, by using other GIT software i am not able to commit code to main branch without PR but through Dataform i was able push code to main branch without PR.