Skip to content

Commit

Permalink
Filter submissions properly so the last submission doesn't get resubm…
Browse files Browse the repository at this point in the history
…itted
  • Loading branch information
joshcai committed Jul 7, 2020
1 parent 4688284 commit 3b5976a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function commit(octokit, owner, repo, commitInfo, treeSHA, latestCommitSHA
// Returns false if no more submissions should be added.
function addToSubmissions(response, lastTimestamp, filterDuplicateSecs, submissions_dict, submissions) {
for (const submission of response.data.submissions_dump) {
if (submission.timestamp < lastTimestamp) {
if (submission.timestamp <= lastTimestamp) {
return false;
}
if (submission.status_display !== 'Accepted') {
Expand Down

0 comments on commit 3b5976a

Please sign in to comment.