fix: strip trailing Bazel module separator from workspace name
When integrated with @pre-commit-hooks, the YAML config was being
generated with @pre-commit-hooks~ as the workspace name, which caused
errors when trying to run the hooks.
GitLab Maintenance scheduled for Thursday, 18th December 2025, from 7:00 AM to 10:00 AM BST. GitLab will be in read-only mode and experience short periods of complete downtime (up to 20 minutes) during this window.
When integrated with @pre-commit-hooks, the YAML config was being
generated with @pre-commit-hooks~ as the workspace name, which caused
errors when trying to run the hooks.