Gh375 - merge branch

same code, only branch name is different

put branch name in a local variable based on node type and use it to create message box only once