Browse files

Sort github commits

  • Loading branch information...
1 parent caa23df commit 1a74c1ddbff4624306507a47cefb29513a7e1771 @jordanbyron jordanbyron committed Sep 26, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/github/submission_commits_finder.rb
View
4 app/models/github/submission_commits_finder.rb
@@ -39,7 +39,7 @@ def find_and_store_new_commits_for_submission(submission)
commit.login == submission.user.github_account_name &&
( submission.last_commit_time.nil? ||
commit.commit_time > submission.last_commit_time )
- end
+ end.sort_by {|c| c.commit_time }
if(user_commits.empty?)
puts "No new commits."
@@ -61,7 +61,7 @@ def get_commits_across_branches(repository)
def get_commits_for_branch(repository, branch)
begin
- @client.commits(repository, branch).map {|c| GithubCommit.new(c)}
+ @client.commits(repository, branch).map {|c| GithubCommit.new(c) }
rescue
#If this repo is a fork, branches will be returned by the Github API
#that don't exist on this fork.

0 comments on commit 1a74c1d

Please sign in to comment.