Skip to content

Instantly share code, notes, and snippets.

@jitran
Created March 26, 2024 07:25
Show Gist options
  • Save jitran/8d0c67b5aae8fa5349c9991b1fbc1d64 to your computer and use it in GitHub Desktop.
Save jitran/8d0c67b5aae8fa5349c9991b1fbc1d64 to your computer and use it in GitHub Desktop.
Probot Exercise

Probot Exercise

Follow the exercise from https://probot.github.io/docs/development.

Bonus:

  1. Open your probot source directory in VSCode.

  2. Add a new VSCode Launch config (Run > Add Configuration):

{
    "version": "0.2.0",
    "configurations": [
        
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Probot",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}/<my-app-path>/node_modules/probot/bin/probot.js",
            "args": ["run", "./index.js"],
            "cwd": "${workspaceFolder}/<my-app-path>",
            "console": "integratedTerminal",
        }
    ]
}
  1. Add a breakpoint to the line const issueComment = context.issue({
  • Start the debugger
  • Create a new issue in your repository and observe the stack content at the breakpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment