Skip to content

Expose option for using GitHub Checks#798

Merged
orta merged 2 commits intodanger:masterfrom
cysp:feature/github-checks-option
Dec 27, 2018
Merged

Expose option for using GitHub Checks#798
orta merged 2 commits intodanger:masterfrom
cysp:feature/github-checks-option

Conversation

@cysp
Copy link
Copy Markdown
Member

@cysp cysp commented Dec 27, 2018

Closes #765

@cysp cysp force-pushed the feature/github-checks-option branch from 4517e6a to 75bd23a Compare December 27, 2018 00:12
const platform = new FakePlatform()

beforeEach(() => {
mockRunDangerSubprocess.mockReset()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently each assertion here is actually testing against the arguments passed into the first invocation of the danger runner, not the one that they've just performed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

.option("-c, --external-ci-provider [modulePath]", "Specify custom CI provider")
.option("-p, --process [command]", "[dev] Runs a custom sub-process instead of the Danger JS runtime")
.option("-u, --passURLForDSL", "[dev] Use a custom URL to send the Danger DSL into the sub-process")
.option("--use-github-checks", "Use GitHub Checks", false)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whaddayareckon?
I didn't dare try to come up with a single-character option for this.

expect(executor.options.disableGitHubChecksSupport).toEqual(true)
})

// TODO: This occasionally fails!
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that this intermittency was caused by the failure to reset the mock but I didn't want to muddy up this PR with that change. If you concur with that assessment I'll raise a PR unskipping this after the mock resetting has landed. 🙂

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me - good thinking!

Copy link
Copy Markdown
Member

@orta orta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it, I also don't have a better name, but I don't predict that too many folks will want to use checks after having used it for a while :D

expect(executor.options.disableGitHubChecksSupport).toEqual(true)
})

// TODO: This occasionally fails!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me - good thinking!

@orta orta merged commit a05a340 into danger:master Dec 27, 2018
@peril-staging
Copy link
Copy Markdown
Contributor

peril-staging bot commented Dec 27, 2018

Thanks for the PR @cysp.

This PR has been shipped in v7.0.1 - CHANGELOG.

@cysp cysp deleted the feature/github-checks-option branch December 27, 2018 19:06
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