refactor: remove some code duplication
refactor: remove some code duplication

rade/weave,rade/weave,tomwilkie/weave,weaveworks/weave,n054/weave,aaam/weave,squaremo/weave,awh/weave,n054/weave,dpw/weave,weaveworks/weave,n054/weave,dpw/weave,aaam/weave,paulbellamy/weave,n054/weave,tomwilkie/weave,bboreham/weave,weaveworks/weave,bboreham/weave,awh/weave,weaveworks/weave,tomwilkie/weave,squaremo/weave,awh/weave,squaremo/weave,rade/weave,paulbellamy/weave,rade/weave,bboreham/weave,bboreham/weave,squaremo/weave,squaremo/weave,dpw/weave,bboreham/weave,dpw/weave,awh/weave,aaam/weave,awh/weave,rade/weave,tomwilkie/weave,aaam/weave,paulbellamy/weave,tomwilkie/weave,paulbellamy/weave,n054/weave,dpw/weave,aaam/weave