Skip to content

Commit

Permalink
Merge pull request #71 from CodingAnarchy/fix_deprecated_repo_code
Browse files Browse the repository at this point in the history
Replace soon-to-be deprecated code
  • Loading branch information
tombell committed Aug 30, 2015
2 parents e0ca1f9 + 00eb63b commit b7b32a0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/build-status-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,14 @@ class BuildStatusView extends View
subscribeToRepo: =>
@unsubscribe(@repo) if @repo?

repos = atom.project.getRepositories()
repos = Promise.all(atom.project.getDirectories().map(
atom.project.repositoryForDirectory.bind(atom.project)))
console.log "DEBUG:", repos
name = atom.config.get('travis-ci-status.travisCiRemoteName')
repo = repos.filter((r) -> /(.)*github\.com/i.test(r.getConfigValue("remote.#{name}.url")))
@repo = repo[0]

$(@repo).on 'status-changed', (path, status) =>
@update() if path is @getActiveItemPath()

$(@repo).on 'statuses-changed', @update
@update()
$(@repo).onDidChangeStatuses(@update)

# Internal: Update the repository build status from Travis CI.
#
Expand Down

0 comments on commit b7b32a0

Please sign in to comment.