branch-name
branch-name copied to clipboard
Properly determine branch name for pull_request and push events
process.env.GITHUB_REF.split('/').slice(2).join('/')
does not work for a pull_request
event.
The suggested approach should cover both push
and pull_request
events
Here, use this action https://github.com/EthanSK/git-branch-name-action