Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Use repository short name rather than the display name in the prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncodes committed Mar 30, 2011
1 parent 8f10d2b commit 7040f40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion payload.rb
Expand Up @@ -44,7 +44,11 @@ def url
end

def repository_branch
%Q[#{repository_name}/#{branch_name}]
"#{repository_path.split('/').last}/#{branch_name}"
end

def repository_path
repository['clone_url'][/:(.+)\.git$/, 1]
end

def branch_name
Expand Down
4 changes: 2 additions & 2 deletions spec/codebase_parser_spec.rb
Expand Up @@ -14,7 +14,7 @@ def commit_link_for(ref)
its(:count) { should == 1 }

it 'should mention the project and branch' do
subject.first.should be_start_with '[Test/master] '
subject.first.should be_start_with '[test/master] '
end

it 'should return the commit message' do
Expand All @@ -35,7 +35,7 @@ def commit_link_for(ref)
its(:count) { should == 3 } # 2 commits + 1 summary line

it 'should mention the project and branch in each line' do
subject.each { |line| line.should be_start_with '[Test/master] ' }
subject.each { |line| line.should be_start_with '[test/master] ' }
end

it 'should return the commit messages' do
Expand Down

0 comments on commit 7040f40

Please sign in to comment.