sindresorhus/refined-github

Configuration as code: Configure repo-settings with a yml-file #3601

fkirc posted onGitHub

In my organization, we have many repositories with similar settings. Those settings include:

  • Only allow squash-merging
  • Automatically delete branches after PR-merges
  • The default-branch is develop
  • Force-pushes and deletion are forbidden for the develop-branch
  • A required check ci must pass before merging anything into develop
  • A few other settings...

Now the problem is that those settings become very difficult to manage for a large number of repos. Ideally, I would like to have a "yml-template" that enforces all those settings for my organization. It would be much easier to put such a "yml-template" into .github, instead of manually updating GitHub-settings. After all, "configuration as code" is a common best-practice in many industries.


You’ll have to ask GitHub for this. They aren’t enforceable by extensions but you might be able to create a tool to set up your repos in a batch from the command line.

posted by fregante over 4 years ago

Yes I could probably write a CLI tool. On the other hand, I still want a transparent and visible configuration. If a team wants to override a specific repo-setting, then this should be doable without executing any centralized tool. Perhaps it would be doable via GitHub Actions.

posted by fkirc over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests