mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-17 19:19:11 -04:00
11 lines
No EOL
465 B
TypeScript
11 lines
No EOL
465 B
TypeScript
import { MESSAGE_ERROR_PLACEHOLDER } from "@bp/service/configs/configs.types";
|
|
|
|
/**
|
|
* Inject the error message in the provided `message`.
|
|
* This is inject in place of the MESSAGE_ERROR_PLACEHOLDER placeholder
|
|
* @param message string that needs to be updated
|
|
* @param errMsg the error message that needs to be injected
|
|
*/
|
|
export const injectError = (message: string, errMsg: string): string => {
|
|
return message.replace(MESSAGE_ERROR_PLACEHOLDER, errMsg);
|
|
}; |