I’m trying to set up a GitHub action for when pull requests are opened or closed and I’d like to get the type of the trigger to add it to the message. The YAML is as follows:
on:
pull_requeste
types: [opened, closed, reopened] #I’d like to get which one has been triggered
For instance :
User X has opened a pull request
Someone suggested ${{env.GITHUB_EVENT_NAME}} but it’s empty. ${{github.event}} seems to be a good place but it returns an object with the webhook payload and I don’t know if "types" is in it or how to get it.