<commit_before>`import Ember from 'ember'`
`import TravisRoute from 'travis/routes/basic'`
`import config from 'travis/config/environment'`

Route = TravisRoute.extend
  queryParams:
    filter: { replace: true }
  model: ->
    apiEndpoint = config.apiEndpoint
    $.ajax(apiEndpoint + '/v3/repos?repository.active=true', {
      headers: {
        Authorization: 'token ' + @auth.token()
      }
    }).then (response) ->
      response.repositories.sortBy('last_build.finished_at').filter( (repo) ->
        repo.last_build
      ).sort( (a, b) ->
        if !a.last_build.finished_at || a.last_build.finished_at > b.last_build.finished_at
          return -1
        else if !b.last_build.finished_at || b.last_build.finished_at > a.last_build.finished_at
          return 1
        else
          return 0
      ).map( (repo) ->
        Ember.Object.create(repo)
      )

`export default Route`<commit_msg>trying some api things<commit_after>`import Ember from 'ember'`
`import TravisRoute from 'travis/routes/basic'`
`import config from 'travis/config/environment'`

Route = TravisRoute.extend
  queryParams:
    filter: { replace: true }
  model: ->
    apiEndpoint = config.apiEndpoint
    console.log(@auth)
    # $.ajax(apiEndpoint + '/v3/repos?repository.active=true', {
    $.ajax(apiEndpoint + '/v3/#{params.owner}?include=user.repositories,organization.repositories,build.commit', {
      headers: {
        Authorization: 'token ' + @auth.token()
      }
    }).then (response) ->
      # response.repositories.sortBy('last_build.finished_at').filter( (repo) ->
      #   repo.last_build
      # ).sort( (a, b) ->
      #   if !a.last_build.finished_at || a.last_build.finished_at > b.last_build.finished_at
      #     return -1
      #   else if !b.last_build.finished_at || b.last_build.finished_at > a.last_build.finished_at
      #     return 1
      #   else
      #     return 0
      # ).map( (repo) ->
      #   Ember.Object.create(repo)
      # )

`export default Route`
{'fraction_non_alphanumeric': 0.13834586466165413, 'fraction_numerical': 0.004511278195488722, 'mean_word_length': 2.696296296296296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1354752', 'n_tokens_mistral': 660, 'n_tokens_neox': 647, 'n_words': 119}