Post Actions have almost the same structure as Rules. See Rule Development Guide
The only difference is in method placed in the script:
Main method
boolean process(CommitCheckRequest commitCheckRequest, OutputStream outputCommitMessage, ApplicationUser processUser)
The class must also implement ProcessingIssuePostScript interface.