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

Allow handleResults to be called without a git object #887

Merged
merged 3 commits into from
Jul 5, 2019

Conversation

jtreanor
Copy link
Contributor

@jtreanor jtreanor commented Jul 5, 2019

Currently, handleResults in Executor.ts requires that a non-empty GitDSL object is passed so that it can add a signature like Danger.js against COMMIT_HASH to comments. This behaviour was introduced in #783.

This is the cause of a crash in Peril, which breaks a common workflow: danger/peril#436.

The updates I have made here are to make git an optional parameter in handleResults and the templating functions that it calls. If there is no git object the signature just doesn't have the against COMMIT_HASH part. I have also added a check so that inline comments won't be added if there is no git object since it is required for that.

@orta
Copy link
Member

orta commented Jul 5, 2019

Nice, looks 👍

I'll get this in, shipped and Peril updated

@orta orta merged commit 5b89fee into danger:master Jul 5, 2019
@peril-staging
Copy link
Contributor

peril-staging bot commented Jul 5, 2019

Thanks for the PR @jtreanor.

This PR has been shipped in v9.0.3 - CHANGELOG.

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 this pull request may close these issues.

2 participants