Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"disable_github_check" setting not taking effect #421

Closed
jtreanor opened this issue Feb 21, 2019 · 7 comments · Fixed by #422
Closed

"disable_github_check" setting not taking effect #421

jtreanor opened this issue Feb 21, 2019 · 7 comments · Fixed by #422

Comments

@jtreanor
Copy link
Contributor

Hi again 👋

Peril has been working nicely for us for the past few days thanks to the workaround for #367.

I have encountered an issue today where the disable_github_check setting does not seem to be working. This morning I added this settings block to our peril settings:

"settings": {
  "disable_github_check": true
}

However, it isn't taking effect. I tried restarting Peril and even re-deploying to heroku but the Danger comments on PRs are still like Danger run resulted in 1 fail and 1 warning; to find out more, see the checks page. instead of commenting the issues directly on the PR.

Is there anything I can do to help diagnose this issue?

You can see the full settings file here: https://github.com/wordpress-mobile/peril-settings/blob/master/peril-settings.json.

Here is a PR with the failing comment: wordpress-mobile/WordPress-iOS#11105 (comment)

@orta
Copy link
Member

orta commented Feb 21, 2019

Hrm, interesting, that setting works on the Artsy repo. Maybe that bool should just be flipped it to be the opposite way around TBH, I can't imagine anyone actually wanting that enabled.

@jtreanor
Copy link
Contributor Author

Yeah, it is strange. I certainly agree that it would make sense for the default to be true but I'm curious why the settings changes aren't taking effect for me.

For what its worth, I have made many changes to rules/repos and had them take effect as expected.

@jtreanor
Copy link
Contributor Author

My settings are:

"settings": {
    "ignored_repos": ["wordpress-mobile/peril-settings"],
    "disable_github_check": true
}

I added this log line to https://github.com/danger/peril/blob/master/api/source/danger/danger_runner.ts#L139:

console.log(options);

On each PR run, it prints:

{ env_vars: [],
ignored_repos: [ 'wordpress-mobile/peril-settings' ],
modules: [] }

So something is causing the disable_github_check setting to be be passed through to here 🤔

@orta
Copy link
Member

orta commented Feb 22, 2019

Got it:

https://github.com/danger/peril/blob/master/api/source/db/json.ts#L87-L111

This will need the setting added

@jtreanor
Copy link
Contributor Author

Great! I can make a PR for that.

@orta
Copy link
Member

orta commented Feb 22, 2019

Nice, yeah, I'm still deep into #417 - I'd recommend making that on your branch, (or look at #419 if you're feeling ) and we can cherry pick it into master too

@jtreanor
Copy link
Contributor Author

Thanks, @orta!

Of course, I won't be able to use this right away because of #419 but I will try to make time to look at that next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants