github-community-projects / github-community-projects/safe-settings
ReferenceError in settings.js for suborgs parsing
- Dominant language
- JavaScript
- Stars
- 921
- Forks
- 226
- Avg merge
- 18h 3m
- Merged PRs (30d)
- 14
Description
## Problem Description
The suborgs functionality is broken and the app errors out when trying to parse a file in the `.github/suborgs/` folder.
### What is actually happening
The app fails with:
```
ERROR (event): subOrgConfigs is not defined
ReferenceError: subOrgConfigs is not defined
at Settings.getSubOrgConfig (.../safe-settings/lib/settings.js:166:9)
```
This is due to line 166 having an invalid reference `return subOrgConfigs[k]` which should be `return this.subOrgConfigs[k]`. The app works correctly after making this change locally.
### What is the expected behavior
Correct parsing of the suborg yaml files.
### Error output, if available
```
ERROR (event): subOrgConfigs is not defined
ReferenceError: subOrgConfigs is not defined
at Settings.getSubOrgConfig (.../safe-settings/lib/settings.js:166:9)
```
## Context
### Are you using the hosted instance of probot/settings or running your own?
Running my own using the latest code on `main-enterprise`
### If running your own instance, are you using it with github.com or GitHub Enterprise?
GHEC
#### Version of probot/settings
Latest on `main-enterprise`
#### Version of GitHub Enterprise
Contributor guide
Assessment
This issue has not been assessed yet.