Open tylermilner opened 2 months ago
👋 @tylermilner
I get this one multiple time too, after a few debugs, I noticed the 403 isn't from Danger itself but Github and it won't impact the Danger JS result
If you are running with the CI option (--ci), you will notice there is a Danger service running in your CI so you have your Github Workflow (This one gets 403) and Danger will launch a service which is the one that evaluates the result to post the messages
With failOnErrors you tell to the Danger Server to fail if there is a log of Danger Error messages
Describe the bug I'm working to integrate Danger into the GitHub Actions CI one of my open source repos (see this PR). I know I don't have my GitHub PAT set quite right, but the Danger step is still succeeding despite receiving a
403
response and having the--failOnErrors
flag set. See the following output of the Danger step in my workflow:See screenshot below showing overall success of the workflow run despite Danger receiving the
403
error and failing to post the message to the PR.To Reproduce Steps to reproduce the behavior:
dangerfile.js
to the repo (see mine below).package.json
that will run Danger.failOnErrors
flag set.403
error is triggered.DANGER_GITHUB_API_TOKEN
repository secret for GitHub Actions with the value of the GitHub PAT.403
error occurred and no message being posted to the PR by Danger.Expected behavior Danger should fail since it received a
403
error and wasn't able to post the message to the PR successful, which should ultimately result in my workflow run failing.Screenshots![image](https://github.com/danger/danger-js/assets/1720304/e3e2f3dc-907c-4417-8df8-e57046f4d7da)
Your Environment
Additional context For reference, here is the super basic
dangerfile.js
that I created based on the Danger "Getting Started" documentation:And here is what my CI step looks like that runs Danger:
My main concern here is that I plan to setup my GitHub PAT to expire after 1 year, at which point it would be nice for my CI builds to start failing at the "Danger" step so that I can be reminded to go back and regenerate my PAT. As it stands now, the step will silently fail which will negate any value provided by having Danger setup in the first place.