app/models/project.rb
# The user/repo part of the repository URL.
The user/repo part of the repository URL.
The user / repo part of the repository URL .
def github_repo
    repository_url.scan(/:([A-Za-z0-9-]+\/[\w.-]+)\.git$/).join
  end
def github_repo repository_url . scan ( / :([A-Za-z0-9-]+ \/ [ \w .-]+) \. git$ / ) . join end
The user/repo part of the repository URL.
The user / repo part of the repository URL .
# GitHub allows underscores, hyphens and dots in repo names # but only hyphens in user/organisation names (as well as alphanumeric).