danger / danger/danger

local_git_repo using Fetch URL for remoteURL

Open
#289 2 comments 0 reactions 0 assignees View on GitHub
Enhancement Local You Can Do This
Dominant language
Ruby
Stars
5.7k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

I may be overlooking something, or doing something completely incorrectly but I tried installing danger and giving it a test run locally.

I run `bundle exec danger local --verbose` and I get this error message -

![screen shot 2016-06-29 at 1 49 53 pm](https://cloud.githubusercontent.com/assets/4746329/16439929/5f028fb6-3e00-11e6-9058-915ed08a15e8.png)

I cloned Danger and snooped through the code, although I'm not very experienced with Ruby.
Noticed in [local_git_repo.rb ](https://github.com/danger/danger/blob/master/lib/danger/ci_source/local_git_repo.rb#L31) we're using the Fetch URL to get the remote URL used to communicate with Github.

In my particular case I'm working off a fork on my personal Github account, of a private repository on a Github organisation that I'm a member of.

Since my Fetch URL is that of my Fork, not the organisations Repo the Remote URL that Danger is using is incorrect. It's looks for the PR on my Fork.

i.e
Actual:
https://github.com/myGithubUsername/money-ios/

Expected:
https://github.com/organisationName/money-ios/

Is Fetch URL the best source for the remote URL? Is there potential for a env["DANGER_REMOTE_URL"] or a potentially better solution? I'd love the chance to contribute!

Or am I using Git wrong and should change my setup? I feel as though it would be more appropriate for Danger to accomodate all sorts of setups to make it as easy as possible to introduce new users.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.