Partial environment variable replacement and wildcards
Some types of metadata, such as Platform Event Subscriber Configuration, have attributes identifying a user by username. As such, regardless of the value in the source environment, the value deployed to the target org must match the username pattern of that org.
For example, if the value in the source repo is <user>email@example.com</user>, when deployed to a sandbox, it must be <user>firstname.lastname@example.org</user>. From sandbox to sandbox: <user>email@example.com</user> must become <user>firstname.lastname@example.org</user>. And finally, when going from sandbox to production: <user>email@example.com</user> to <user>firstname.lastname@example.org</user>.
This could be solved by supporting environment variable partial replacement with wildcards:
Replace with: @example.com
Replace with: @example.com.sandboxName
Thanks Mike for submitting your idea.
Gearset's Environment Variables feature already supports partial string replacements, which means you can get Gearset to replace 'sandbox1' bit of the <user> tag value with 'sandbox2', as follows:
Metadata Type: Platform Event Subscriber Configuration
Item: Any item
Replace with: sandbox2
@Gearset Team - that only works if the value in source has .sandboxName appended. However, we keep production's value in source, which has nothing after the email address. As such, there's nothing to replace.