Peel and chop the potatoes into chunks then add into a saucepan before covering with cold water then allow to come to a boil and allow to simmer for 10-12 minutes until the potatoes soften
Whilst the potatoes are cooking, finely dice the onion and grate the cheddar cheese
Drain the potatoes and mash until there are no lumps present then add the melted butter, milk, finely diced onions, salt and black pepper before mixing until well combined
Add the cheddar cheese and mix until the cheese is evenly distributed within the mixture
Cut the puff pastry sheets into 4 equal parts and then add 2 tablespoons of mixture to each before folding and use a fork to create indents to help seal the edges
Brush the top with the whisked egg and place on a baking tray before baking at the top of preheated oven at 200°C/400°F/gas mark 6 for 15-20 minutes, flipping over halfway, until golden brown
Your cheese and onion pasties are ready!