Refactor release message conditional logic