jlewi / hydros

hydros automates hydrating and committing configuration
Apache License 2.0
4 stars 0 forks source link

Syncer should automatically merge PRs or enable auto merge #15

Closed jlewi closed 1 year ago

jlewi commented 1 year ago

As part of supporting taking over the dev environment (https://github.com/jlewi/hydros/issues/13) we want hydros to be automerge PRs.

This also removes the need to rely on bulldozer or similar apps to automatically merge PRs.

The syncer will automatically enable auto merge if a PR can't be merged immediately.

To prevent automerge users should set appropriate branch protections (e.g. require approvals)

The original code was based on GitHub's CLI's code for merging. https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/merge/merge.go

The hydros code is much simpler since its more oppinionated and requires fewer options than what the CLI supports.

Copy ghrepo and ghinstance from github.com/CLI/CLI