Peel and chop the potatoes and boil in salted water for 15 minutes or until tender.
Drain the water and allow them to cool.
Lightly mash the potatoes, it does not have to be a smooth mash, a lumpy one would do.
Leave the mash to cool completely.
Peel and cut the onion roughly.
In a pan, heat up the oil and butter, then fry the onions on a low to medium heat until golden.
Mix the fried onions with the potatoes and cheese, and season to taste.
Preheat the oven to 200 degrees Celsius (390 Fahrenheit).
Cut each puff pastry into 6 rectangles, place a tablespoon of the potato mixture on one half, brush the edges with a bit of water, then fold the other half over and seal.
Use a fork to press the edges well, then poke each pasty in a few places using a fork to allow the steam to escape during baking.
Beat the egg well, then brush each pasty.
Arrange them onto 2 baking trays, and bake for 20 minutes until golden.
Remove from the oven and allow them to cool slightly.
Serve them either warm or cold.