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
Support a danger local
command
#40
Conversation
# The order of the following commands is *really* important | ||
dm = Dangerfile.new | ||
dm.env = EnvironmentManager.new(ENV) | ||
dm.env.ci_source = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected.
# then pull out the 38, to_i | ||
self.pull_request_id = pr_merge.replace("Merge pull request #", "").to_i | ||
self.base_commit = pr_merge.parents.[0].sha | ||
self.head_commit = pr_merge.parents.[1].sha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLBRACK2
(Using Ruby 2.3 parser; configure using TargetRubyVersion
parameter, under AllCops
)
Now grabs enough git data 🎉 |
end | ||
|
||
def initialize(*) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra empty line detected at method body beginning.
Looks good, however HoundCI doesn't seem so happy |
also, if you have a better idea for the name, I'd be interested |
puts " #{'HEAD commit'.blue} : #{env.ci_source.head_commit}" | ||
puts " git diff #{env.ci_source.base_commit} #{env.ci_source.head_commit}".yellow | ||
puts "#{'Requests'.blue} : #{env.request_source.class}" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be replaced with cork, really
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
terminal-table may be what you want here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, so simple to use and nice looking https://github.com/fastlane/fastlane_core/blob/master/lib/fastlane_core/print_table.rb#L19-L25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I was wondering if Cork would do this? Can get another external user in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but yeah, terminal-table looks great
danger local
commanddanger local
command
Punted the tables stuff to #62 |
Re: #17
So far I've added another commands
danger local
and set it up to use a non-existent CI Source, the source's job is going to be to find the last PR it can find in the current history of the current repo, then fill in it's environment variables with that stuff.