A homeless man in a mob chasing a man said "snitches get stitches" after helping kick the front door in at a house where he took refuge.
Josh Walsh was part of a pack of around 10 people who chased after the man in South Elmsall in the early hours of August 12, Leeds Crown Court heard.
Prosecutor, Ian Hudson, said a couple who live in South Elmsall were going out for takeaway food just after midnight when they saw someone running towards them.
Mr Hudson said: "He was being chased by a group of men, including this defendant."
The court heard the man went inside the house and the gang of men went to the front door.
Mr Hudson said: "He was part of the group that forced entry into the property by kicking the door off its hinges.
"He went inside with other members of the group and they were pushed back.
"The defendant said 'tell your sister snitches get stitches'".
Walsh, aged 24, of The Meadow, South Elmsall, admitted affray.
He has 26 convictions for 41 offences, including assault.
Michael Collins, mitigating, said: "He was homeless and was living in a tent in a field, surviving on benefits."
Mr Collins said he was with a group of friends who chased after the victim, whom he did not know.
Mr Collins said Walsh has had mental health problems and was a heavy cannabis user at the time.
The court heard Walsh has since stopped taking the drug and now has a home with his partner and their four-month-old child.
Judge Robin Mairs handed Walsh a 22-month prison sentence suspended for 24 months.
Judge Mairs told Walsh: "You were part of a pack in South Elmsall chasing a male.
"You and the others kicked the door down and then issued threats to the householder.
"You were part of a mob determined to get inside."