GitHub provides different strategies for merging PRs: Merge commit strategy includes PR number in commit message, while Rebase and merge or Squash and merge may alter commit messages.
Using GitHub API, PR details can be obtained from commit hash, irrespective of the merge strategy used.
The provided script utilizes GitHub CLI within GitHub Actions to extract the author of the PR associated with a specific commit hash.
The script uses a search query to identify the PR containing the commit hash in its history and retrieve the author information, allowing seamless retrieval of PR details.