Add support for Codeship CI#892
Conversation
Generated by 🚫 Danger |
| # ### CI Setup | ||
| # | ||
| # For Semaphor you will want to go to the settings page of the project. Inside "Build Settings" | ||
| # For Semaphore you will want to go to the settings page of the project. Inside "Build Settings" |
|
Hey @JuanitoFatas what do you think about ghiculescu/danger@41e8b50...118fadb ? The problem here is that codeship doesn't expose a PR number in ENV the way most other CIs seem to. The workaround is to look up Github and check for a PR whose Are you happy with these sorts of assumptions in Danger? The other idea I had was to do something like this: |
|
for reference @ghiculescu, the extra API call is what we do on I don't necessarily think you can assume that master is : a) the 'master' branch, or b) never PRed |
|
Updated: ghiculescu/danger@41e8b50...8dd90fa |
JuanitoFatas
left a comment
There was a problem hiding this comment.
Extra API call is ok because they don't expose :(
|
|
||
| # this is fairly hacky, see https://github.com/danger/danger/pull/892#issuecomment-329030616 for why | ||
| def self.pr_from_env(env, ci_source) | ||
| Danger::RequestSources::GitHub.new(nil, env).get_pr_from_branch(env["CI_REPO_NAME"], env["CI_BRANCH"], owner_for_github(env)) |
There was a problem hiding this comment.
do we need to pass down the ci_source to Danger::RequestSources::GitHub? 🤔
do we need ci_source? 😂
There was a problem hiding this comment.
it's just not required in my particular case - i just need a github client. if you prefer, i can try and find a neater way of writing that.
There was a problem hiding this comment.
wait, i misread your comment... fixed in a49fc30
|
Yay! 🎉 Thank you for the contributions! It's so awesome!!! <3 <3 <3
Would you like to join? 🙏 🙇 |
|
Yeah okay sign me up! Can you please let me know when the next gem release goes out so I can point our gemfile to it? :D |
|
Think it already went out 👍 |
|
And the invite has been sent <3 thanks |
Added codeship as a new CI source. I mostly copied the style of the Semaphore CI source, and used the same logic that danger.js uses in getting a PR from a branch name.