When an action is set on pull_request in Github Actions, how to get the target branch? The use case is to retrieve the PR- (and hopefully, branch)-specific comm
pull_request
You can access the target branch with ${{ github.event.pull_request.base.ref }}.
${{ github.event.pull_request.base.ref }}
To know the full list of properties of the github.event object, try to run more $GITHUB_EVENT_PATH.
github.event
more $GITHUB_EVENT_PATH