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

Add Dangerfile example #41

Merged
merged 3 commits into from
Oct 19, 2019
Merged

Add Dangerfile example #41

merged 3 commits into from
Oct 19, 2019

Conversation

f-meloni
Copy link
Member

Fixes #40

README.md Outdated Show resolved Hide resolved
README.md Outdated
warn("Big PR, try to keep changes smaller if you can")
}

if (danger.github!!.pullRequest.title.contains("WIP" ,false)) {
Copy link
Member

@orta orta Oct 19, 2019

Choose a reason for hiding this comment

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

.github!! this something you can do at declaration-ish (out of user-land code) point? (like how in Swift/TS it pretends to not be be nullable)

Copy link
Member Author

@f-meloni f-meloni Oct 19, 2019

Choose a reason for hiding this comment

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

I didn't find a way to force unwrap on the type declaration, and Moshi (the library that we are using to decode the JSON) requests an optional for this.
A valid alternative could be make this private and expose a getter that force unwraps it

Copy link
Member Author

Choose a reason for hiding this comment

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

I've opened #42, let's see if fixes this

Copy link
Member

Choose a reason for hiding this comment

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

approved even if i don't like _varName 🙈

You can make a Dangerfile that looks through PR metadata, it's fully typed.

```kotlin
import com.danger.dangerkotlin.*
Copy link
Member

Choose a reason for hiding this comment

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

systems.danger?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I suppose is actually better given the website URL :P

Copy link
Member

Choose a reason for hiding this comment

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

happy for systems.danger

Copy link
Member

Choose a reason for hiding this comment

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

but i think we should do it in a separate PR

Copy link
Member

Choose a reason for hiding this comment

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

let's merge everything what we have, then let's go with the migration to the new package name

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, sorry - was just thinking from a high level, no need to rush for it 👍

@f-meloni
Copy link
Member Author

merge on green

@peril-staging peril-staging bot merged commit e4755d5 into master Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an example Dangerfile to the README
3 participants