github-community-projects / github-community-projects/safe-settings

Check doesn't start for certain changes

Open
#763 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
921
Forks
226
Avg merge
18h 3m
Merged PRs (30d)
14

Description

## Problem Description

### What is actually happening

The check for a PR is not starting, it's stuck at:

```shell

Starting NOP

initiating...
```

The PR only adds the following snippet for a repository:

```yaml
security:
enableVulnerabilityAlerts: false
enableAutomatedSecurityFixes: false
```

I've checked the permissions of the GitHub app and can't find any missing permissions.

### What is the expected behavior

That the check starts and shows changes from the PR.

### Error output, if available

We can see this in the container logs and in the GitHub app event log, the event type is `check_run.created`.

```json
"stack": "TypeError: Cannot read properties of undefined (reading 'additions')\n at /opt/safe-settings/lib/settings.js:245:29\n at Array.reduce ()\n at Settings.handleResults (/opt/safe-settings/lib/settings.js:237:16)\n at async Settings.sync (/opt/safe-settings/lib/settings.js:52:7)\n at async Promise.all (index 0)\n at async Promise.all (index 0)\n at async middleware (/opt/safe-settings/node_modules/probot/node_modules/@octokit/webhooks/dist-node/index.js:355:5)",
"type": "Error",
"msg": "Cannot read properties of undefined (reading 'additions')"

```

## Context

### Are you using the hosted instance of probot/settings or running your own?

Selfhosted

### If running your own instance, are you using it with github.com or GitHub Enterprise?

github.com

#### Version of probot/settings

2.1.16

#### Version of GitHub Enterprise

-

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.