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

Support a danger local command #40

Merged
merged 13 commits into from Feb 12, 2016
Merged

Support a danger local command #40

merged 13 commits into from Feb 12, 2016

Conversation

orta
Copy link
Member

@orta orta commented Jan 30, 2016

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.

# The order of the following commands is *really* important
dm = Dangerfile.new
dm.env = EnvironmentManager.new(ENV)
dm.env.ci_source =

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

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)

@orta
Copy link
Member Author

orta commented Jan 30, 2016

Now grabs enough git data 🎉

end

def initialize(*)

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.

@KrauseFx
Copy link
Member

KrauseFx commented Feb 1, 2016

Looks good, however HoundCI doesn't seem so happy

@orta
Copy link
Member Author

orta commented Feb 1, 2016

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
Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a start
screen shot 2016-02-08 at 10 43 56

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

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

Copy link
Member Author

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

@orta orta changed the title [WIP] support a danger local command Support a danger local command Feb 12, 2016
@orta
Copy link
Member Author

orta commented Feb 12, 2016

Punted the tables stuff to #62

orta added a commit that referenced this pull request Feb 12, 2016
Support a `danger local` command
@orta orta merged commit a9f9b3b into master Feb 12, 2016
@KrauseFx KrauseFx deleted the local_test branch February 12, 2016 16:39
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.

None yet

4 participants