Heat the oil in a frying pan. Once hot, place in chicken and season to taste. Cook until the chicken turns golden brown and is cooked through (approx 10 minutes).
While the chicken is cooking, slice the mushrooms into thin strips and grate the half onion into a bowl. Once the chicken has cooked through, remove the chicken from the pan and place on the side in a bowl.
Add the grated onion and sliced mushrooms into the pan (in the same oil, adding a drizzle if the pan looks dry) then fry on a high heat for about another 3 minutes (or until the onions and mushrooms start to colour).
Slowly add the flour to the pan, stirring until the pan is dry and mix is covered.
Gradually stir in the stock then add the chicken back to the pan. Bring to the boil then simmer for 10-15 minutes, stirring to make the mixture thicker. Pour the mixture into a baking dish.
Pre-heat the oven to Gas 7, 220°C, fan 200°C.
On a floured surface, roll the pastry about 0.5cm thick. Place rolled pastry over the top of the dish and cut around the shape. Tuck in the excess pastry into the sides of the dish to prevent the mixture from bubbling over the pastry. Score the pastry lightly to add texture, and brush over with a little of the beaten egg.
Bake until the pastry has risen and is golden brown in colour (approx 20 - 30 minutes depending on size and thickness of pastry).
I have cooked this