Handling commit messages with a quote character
Sometimes it is necessary to use commit messages to decide the logical flow of a pipeline. One such example is skipping continuous integration if the commit message contains “–skip-ci”.
However, doing this might cause the following error if the commit message contains a quote character:
Error parsing YAML file: can not read a block mapping entry; a multiline key may not be an implicit key at line 13, column 30
As explained, this is a string quoting issue. The commit message uses a ‘ symbol, as does the YAML file itself to denote string. This breaks the YAML file. The solution is to use a multi-line string.