Should I use probot-scheduler to generate weekly-digest?
abhijeetps opened this issue · 1 comments
As discussed in #3 , @gr2m suggested that instead of always triggering bot for every action, what the bot should do is to get the issues and pull requests once in a week.
I explored octokit/rest.js and found that there are two methods to get all pull requests (http://octokit.github.io/rest.js/#api-PullRequests-getAll) and issues (http://octokit.github.io/rest.js/#api-Issues-getAll) and I think getAll
method for issues has a timestamp parameter to get issues (opened/closed/etc.) for last week.
So, it's possible to run this scheduler once in a week so that it can be generate weekly report accordingly.
Currently, we have probot-scheduler
which helps to trigger app every hour. Maybe, we might need something like this for weekly basis, which can trigger weekly-digest bot every week.
What are your thoughts on this?
Should I fork a clone of probot-scheduler
for weekly use?
yeah using probot-scheduler
sounds like a good plan. Feel free to fork it if the current version does not all you need, I could imagine that once you have what you need it’d be a good opportunity to contribute it back to probot-scheduler :)