I changed it to be a Number along with Job's number, but it's wrong -
Build's number should be treated as an integer (to not screw up
ordering) and Job's number can be treated as a string (because it has a
format "\d.\d")
We use `allBuilds` to observe new incoming builds, so we can put new
builds into the lists (for example when build is started). We use it for
observing purposes only, so we actually don't need to get builds from
the server, we can just register record array and use it later on.
This piece of code was used in order to load repos associated to jobs
when the latter were loaded from pusher. This was needed because jobs
events do not have repository record passed in pusher payload, so when
job was added with pusher and link to the job was displayed in "Running
Jobs" or in workers on right sidebar, Ember was loading missing repos.
We don't need this code anymore as there is no right sidebar.
Additionally after changes in Ember.js, it's possible to pass primitives
to linkTo. Previously the link to record needed to be constructed as
following:
{{#linkTo "job" job.repo job}}Link to repo{{/linkTo}}
The drawback of such code is that repo would have been instantiated in
such case. Now, we can do something like this:
{{#linkTo "job" job.repositorySlug job}}Link to repo{{/linkTo}}
so as long as we have information about repository slug in the job data,
such hacks are not be needed.
Previously we showed only accounts and repositories, to which you have
admin access. To improve usability, it's better to show all accounts and
all repositories, but explain why part of the repositories are not
manageable.
In order to not load too many repositories when not needed I was using
construct of repoData on Job and Worker models. repoData was a simple
object with id and slug attributes, which was used to generate url for a
repo. That way I didn't have to instantiate Repo object for generating
urls. The problem is that our API does not return repositorySlug along
with Job record, so the value of repositorySlug was overwritten and in
consequence repoData was becoming empty.
I could change the API, but I feel that the whole repoData concept is
flawed. A bit better solution is to load incomplete repository data into
the store (just an id and a slug) and then instantiate repo record - as
long as it will not need to provide other fields than an id and a slug,
we will not have to do an ajax request.
When additional items are included into matrix via 'matrix.include' key
in .travis.yml they may contain config keys, which are not available on
build.
For example build can contain only 'rvm' key, but we may add the
following include:
matrix:
include:
- rvm: '2.0.0'
env: 'FOO=bar'
In such case, we need to take into account also keys from additional
job, not only from the build.
(closes#172)