discover-rewards-notifier icon indicating copy to clipboard operation
discover-rewards-notifier copied to clipboard

Expired Data Detection

Open nareddyt opened this issue 6 years ago • 5 comments

In data/deals.json, some objects contain an expiry date. We can check this expiry date against the current date to infer when our data is stale, signalling that we MUST update the data.

So it would be nice to have a script that checks this data. Perhaps a new node script in tools/ that we can run via an npm script in package.json.

It would be awesome if we could integrate this into our CircleCI workflow. In case someone publishes the extension with expired data, CircleCI could throw an error and prevent it from being published!

Note: Some deals have no expiry date, so those may expire at any time. Those deals are out-of-scope for this issue, so feel free to ignore them.

nareddyt avatar Mar 13 '18 05:03 nareddyt

Hi @nareddyt I would like to work on this issue, this would be my first time contribution.

arwalokhandwala avatar May 21 '18 15:05 arwalokhandwala

Sounds good! Let me know if you have any questions. I'm a little busy this week but I'd be glad to clarify anything that is unclear.

You can view some example data in the data folder. Note that only deals can have expiry dates, but not all deals have expiry dates. Take a look at data/deals/schema.json for an example of what values the expiry date can take on!

Here's a brief overview of what continuous integration is if you choose to integrate it into out CircleCI workflow.

nareddyt avatar May 22 '18 05:05 nareddyt

Hi @nareddyt, it looks like there hasn't been any work on this is a few months so I can take a stab at it!

jmoore914 avatar Oct 19 '18 14:10 jmoore914

Here's a link to the PR: https://github.com/nareddyt/discover-rewards-notifier/pull/82#issue-224329650

This is my first contribution so sorry if I didn't follow proper protocol!

jmoore914 avatar Oct 19 '18 15:10 jmoore914

Thanks, that works! I'll take a look at it soon

nareddyt avatar Oct 19 '18 16:10 nareddyt