danger / danger/danger-js

Allow to override the unhandledRejection handler

Open
#828 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.5k
Forks
381
Avg merge
2h 8m
Merged PRs (30d)
6

Description

DangerJS specifies an [`unhandledRejection` handler](https://github.com/danger/danger-js/blob/65b9db3364880f95b88521fb3fc2615702eb118d/source/commands/danger.ts#L7-L10) that makes the process finish with an error code.

In our team some of our Danger checks fail for reasons unrelated to the PR reported; for example, some GitHub API endpoint failed or there's a logic error in the checking code. These cases make Danger fail the build and, hence, disallows the PR from being merged.

I'd like to be able to override the behavior so that errors in the checker code are only producing warnings for other people to look at but that wouldn't prevent PRs from being merged. Would adding such a customization be possible?

Contributor guide

Open the contributing guide

Research direction

Start with source/commands/danger.ts at the unhandledRejection handler linked in the issue. Trace how that handler determines the process exit status and review the command entry point around it. Done means a documented customization path exists for treating checker errors as warnings without preventing the build from merging.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.