Hello Anil,
Post functions can only be triggered using a workflow transition.
That been said, you can create a loop workflow transition to all of your statuses with the post function you want and add a trigger that will execute the transition when the pull request is completed/merged.
To know more details on how you can add a trigger, you can check the documentation below:
Let me know if it works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.