When running Danger from a public Bitrise app: the following results in an error when parsing the repository URL.
bundle install
bundle exec danger
It seems the value of GIT_REPOSITORY_URL environment variable is different when using a public Bitrise app vs a private one. Public apps make use of the https:// git URL format, whereas the private ones use git@ format.
Running your Dangerfile without it crashing.
There was an error when parsing the repository URL
Octokit::InvalidRepository: "github.com/duckduckgo/Android" is invalid as a repository identifier.
Use the repo/user (String) format, or the repository ID (Integer), or a hash containing :repo and :user keys.
5.8.0)```
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
declared_trivial = github.pr_title.include? "#trivial"
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500```
In case anyone else hits this, as a workaround, I manually exported the GIT_REPOSITORY_URL before invoking Danger
export GIT_REPOSITORY_URL="[email protected]/duckduckgo/android.git"
bundle install
bundle exec danger
And this let me get it building again.
One more info/detail, the related code seems to be https://github.com/danger/danger/blob/master/lib/danger/ci_source/bitrise.rb#L40 -> this regex will only work for the [email protected]:... style git clone URL (GIT_REPOSITORY_URL), and not for the https://github.com/... one.
Sounds good, there must be other regexes in danger that can be used for a reference and update
I created an internal tracker card for this, hope we can allocate some engineering hours to fix it 馃槈
Most helpful comment
I created an internal tracker card for this, hope we can allocate some engineering hours to fix it 馃槈