fix publish commit message logic