Managing GitHub Organization Repo Access using bash

Dear Git folks!
I want to automate organization level repository access to specific group only and enable branch level protection policy, Manually i could able to do but Is there any way to automate the process using bash script…

Thanks in advance…
Regards,
Pavan kumar