danger-js
danger-js copied to clipboard
Unable to run Danger without fake_ci
Hi, I'm using Jenkins multi-branch pipeline(scripted) with Github using Branch Sources.
Whenever I try to run Danger with the following environment variables: DANGER_GITHUB_API_TOKEN, DANGER_TEST_PR, DANGER_TEST_REPO, FAKE_CI='yep' I'm getting the result I should have, and the comment I expect in git.
Without FAKE_CI, I'm getting the message "Skipping Danger due to this run not executing on a PR."
Could you please provide a list of environment variables Danger expects? Does "GitHub Pull Request Builder" is a must? Do you support another plugin? In case PR builder i a must, can I have an example for scripted pipeline under multi-branch pipeline?
To Reproduce Steps to reproduce the behavior:
- Set Dangerfile
- Run "npm run danger" without FAKE_CI='YEP'
** Your Environment** Jenkins - 2.204.2 Multibranch, scripted pipeline
I've never used Jenkins with danger myself, so if the getting started docs aren't good enough then I'd recommend reading the source for the Jenkins provider in this repo 👍
Danger is useful only on pull requests, otherwise it skips executing.
You can run npm run danger local
which will execute and print output to console without URL to Pull Request.
A. I'm seeing this issue as of a week or two back, with Nevercode CI B. I'm not seeing this issue for Github Actions
Not sure if this suggests that something is wrong in my Nevercode Environment, or if something happened inside DangerJS.
We're on [email protected]