Got pull request data being stored and displayed correctly

This commit is contained in:
Jason Smale 2013-03-18 10:36:31 +11:00
parent 63c461e86b
commit ed69690167
3 changed files with 15 additions and 14 deletions

View File

@ -13,6 +13,8 @@ require 'travis/model'
_config: DS.attr('object') _config: DS.attr('object')
startedAt: DS.attr('string') startedAt: DS.attr('string')
finishedAt: DS.attr('string') finishedAt: DS.attr('string')
pullRequest: DS.attr('boolean')
pullRequestTitle: DS.attr('string')
repo: DS.belongsTo('Travis.Repo') repo: DS.belongsTo('Travis.Repo')
commit: DS.belongsTo('Travis.Commit') commit: DS.belongsTo('Travis.Commit')

View File

@ -10,7 +10,6 @@ require 'travis/model'
authorEmail: DS.attr('string') authorEmail: DS.attr('string')
committerName: DS.attr('string') committerName: DS.attr('string')
committerEmail: DS.attr('string') committerEmail: DS.attr('string')
pullRequestTitle: DS.attr('string')
pullRequestNumber: DS.attr('number') pullRequestNumber: DS.attr('number')
build: DS.belongsTo('Travis.Build') build: DS.belongsTo('Travis.Build')

View File

@ -25,9 +25,9 @@
<div class="right"> <div class="right">
<dt>{{t builds.commit}}</dt> <dt>{{t builds.commit}}</dt>
<dd class="commit"><a {{bindAttr href="urlGithubCommit"}}>{{formatCommit build.commit}}</a></dd> <dd class="commit"><a {{bindAttr href="urlGithubCommit"}}>{{formatCommit build.commit}}</a></dd>
{{#if build.isPullRequest}} {{#if build.pullRequest}}
<dt>{{t builds.pullRequest}}</dt> <dt>{{t builds.pullRequest}}</dt>
<dd class="pull_request"><a {{bindAttr href="commit.compareUrl"}}>#{{build.commit.pullRequestNumber}} {{build.commit.pullRequestTitle}}</a></dd> <dd class="pull_request"><a {{bindAttr href="build.commit.compareUrl"}}>#{{build.commit.pullRequestNumber}} {{build.pullRequestTitle}}</a></dd>
{{else}} {{else}}
{{#if commit.compareUrl}} {{#if commit.compareUrl}}
<dt>{{t builds.compare}}</dt> <dt>{{t builds.compare}}</dt>