Thanks for taking the time to make this PR! Could you describe your use case for this? This "repository" variable looks like it can sometimes contain multiple repositories, which might be a little unexpected given that the behavior is different from the on_error hook. In general I'm happy to expand the interpolated variables.. I just want to make sure I understand how they might be consumed in downstream scripts. Appreciate it!
My use case is simple. I didn't use any of the monitoring service supported by borgmatic, so I want to send notification for backup start and finish by myself.
Sorry for the delay here! I'm merging this now, but just a heads up that I'm renaming the context variable to repositories since it can contain more than one! Thanks.
Another heads up: I'm renaming the context variable back to repository in borgmatic 1.6.0 (to be released). This is because #473 changes command hooks to be called on a per-repository basis. The existing repositories context variable should continue to work, however.. It will just be deprecated.