github/branch-deploy

Hubot Style Deploy Locking

GrantBirki opened this issue ยท 1 comments

Hubot Style Deploy Locking ๐Ÿ”’

Wait, what is hubot? - Hubot is GitHub's chatop friend. It had .deploy functionality that is extremely similar to this Action.

This issue tracks work to implement @hubot style deploy locking.

Currently, if you run a .deploy command, it creates a non-sticky lock that is released as soon as the deployment finishes. This is fine for smaller projects, but if you have dozens or even hundreds of PRs open at the same time (from different people) there is a good chance when your deploy finishes, someone else will run .deploy and wipe out your changes.

In Hubot land, when someone runs .deploy it creates a lock that persists until you either merge your pull request with the related lock, or someone (perhaps you) removes the lock manually with .unlock.

The new default behavior of this Action will be to use Hubot style locking out of the box. If you want to disable this feature and use the "classic locking" that is the default today (as of this writing), users will have to sent an input option to do so. Due to this, this change will be a new major release with breaking changes.

This new behavior will not be enabled out of the box and instead you will have to enable it in your Actions configuration with sticky_locks: "true". The reasoning for this is that users should configure the "unlock on merge" mode workflow to take full advantage of automatically releasing locks on PR merge. Since not every one will use this, and since it requires an additional setup step (even though its easy), this option will not be enabled by default. Instead, it should be treated as a custom setup option for advanced users to improve their deployments further.

Completed ๐ŸŽ‰

v7.5.0