Commit 98a93c5b authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

add hack to limit notification spam when we push update now

parent 03692b87
......@@ -164,6 +164,8 @@ function syncReleasesByProject(user, project, callback) {
// before initial successful sync and if notifications for this project are enabled, we mark the release as not notified yet
release.notified = !project.lastSuccessfulSyncAt ? true : !project.enabled;
release.createdAt = new Date(commit.createdAt).getTime();
// old code did not get all tags properly. this hack limits notifications to last 10 days
if (Date.now() - release.createdAt > 10 * 24 * 60 * 60 * 1000) release.notified = true;
delete release.sha;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment