Generally, you're supposed to prefer string interpolation over string concatenation. It's not a big deal for me; I occasionally use concatenation when convenient. Here's the line re-written using interpolation:

    String content = 'ref: ${refName}\n';