Cannot read property 'trigger' of undefined

I have published a nodejs action to “My Actions”, as I want to reuse the same action for multiple github repository sources. After setting this all up, I get the following error:
Cannot read property 'trigger' of undefined
When the pipeline is triggered.

import { axios } from "@pipedream/platform"
export default defineComponent({
  name: "...",
  key: "...",
  version: "1.0.0",
  type: "action",
  async run({steps, $}) {
    const regex = /some-regex/
    let matches = regex.exec(steps.trigger.event.pull_request.title) <-- issue is here
    ...
  },
})

Any help would be appriciated

Hi @shawnrg, first off, welcome to Pipedream!

For the reusable action, instead of using steps as a parameter, it uses props to pass the input into the action.

After you have defined the prop, you will be able to pass in the data from your trigger. For example:

Just to add to @vunguyenhung 's answer, we go over this reasoning here in this short video: