Only allow dangerous changes on non permanent refs

Can we get an option to only allow dangerous changes on non-permanent refs? We particularly want to allow force-pushes as long as the branch is not a permanent ref.

You can do this today:

Allow dangerous changes in the repository.

Write a Herald rule: Commit Hook: Branches/Tags/Bookmarks, Global, [ Ref change type ][ has bit ][ dangerous change ], [ Ref name ][ … ], take action: [ Block push with message ][ … ]

There’s no “ref is permanent” rule in Herald right now, so you’d have to approximate it with “Ref type” / “ref name”.

A “Ref is permanent” rule is reasonable and not difficult to add, just no promises on when it’ll get built.

1 Like