diff --git a/index.js b/index.js index b1eab1e..6c8fbf3 100644 --- a/index.js +++ b/index.js @@ -20,6 +20,9 @@ module.exports = async app => { app.on(events, unmark) app.on('schedule.repository', markAndSweep) + /** + * @param {import('probot').Context} context + */ async function unmark (context) { if (!context.isBot) { const stale = await forRepository(context) @@ -44,12 +47,18 @@ module.exports = async app => { } } + /** + * @param {import('probot').Context} context + */ async function markAndSweep (context) { const stale = await forRepository(context) await stale.markAndSweep('pulls') await stale.markAndSweep('issues') } + /** + * @param {import('probot').Context} context + */ async function forRepository (context) { let config = await getConfig(context, 'stale.yml') diff --git a/lib/stale.js b/lib/stale.js index 0c13b8d..b7ee6fe 100644 --- a/lib/stale.js +++ b/lib/stale.js @@ -2,6 +2,9 @@ const schema = require('./schema') const maxActionsPerRun = 30 module.exports = class Stale { + /** + * @param {import('probot').Context['github']} github + */ constructor (github, { owner, repo, logger = console, ...config }) { this.github = github this.logger = logger