Skip to content

Silently fails without a .github/config.yml file #41

@JasonEtco

Description

@JasonEtco

👋 I've noticed that this silently fails (doesn't post a comment) if the repository doesn't have a .github/config.yml file.

I'm not sure how probot-config works, but looking at it I'd guess that it returns that defaultConfig if both the file and the file in a .github repository don't exist:

const config = await getConfig(context, 'config.yml', defaultConfig)

Instead its returning null, which results in an error log:

TypeError: Cannot read property 'requestInfoOn' of null
    at receive (/app/index.js:26:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
event: {
--
  "id": "123",
  "event": "issues.opened",
  "repository": "JasonEtco/tests",
  "installation": 123
}

cc @hollenberry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions