[GHF][BE] Comment on reverted commit (#79913)
Makes it easier to see which version of PR were reverted when same PR is
reopened to re-land the change
Re-factor `gh_post_comment` into local `_gh_post_comment` that takes URL
and comment body and add two implementations: `gh_post_pr_comment` and
`gh_post_commit_comment`
Use later in revert bot after `Reverted` label is added to PR
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79913
Approved by: https://github.com/atalman