diff --git a/.github/workflows/changes-requested.yml b/.github/workflows/changes-requested.yml index d2f4670..c06e7cf 100644 --- a/.github/workflows/changes-requested.yml +++ b/.github/workflows/changes-requested.yml @@ -12,3 +12,5 @@ jobs: - uses: luanpotter/changes-requested@master with: github-token: ${{ secrets.GITHUB_TOKEN }} + days-until-close: 0 + dry-run: true diff --git a/action.yaml b/action.yaml index e7bf5f7..1a9bfe3 100644 --- a/action.yaml +++ b/action.yaml @@ -17,6 +17,10 @@ inputs: description: 'The message added by the bot on the closing comment on the issue.' required: true default: 'This issue was closed by the changes-requested bot due to inactivity.' + dry-run: + description: 'Set to true for testing, it will log but not actually close anything.' + required: true + default: false runs: using: 'node12' diff --git a/dist/index.js b/dist/index.js index da7e6e1..0b63149 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35,7 +35,7 @@ async function run() { const daysUntilClose = parseInt(core.getInput('days-until-close', { required: true })); const triggerLabel = core.getInput('trigger-label', { required: true }); const closingComment = core.getInput('closing-comment', { required: true }); - const dryRun = true; + const dryRun = core.getInput('dry-run', { required: true }) !== 'false'; const repository = (_a = github.context.payload.repository) === null || _a === void 0 ? void 0 : _a.full_name; if (!repository) { core.error('Unable to run action; was not associated to any repository.'); diff --git a/src/index.ts b/src/index.ts index b2892a2..d98312c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ async function run(): Promise { const daysUntilClose = parseInt(core.getInput('days-until-close', {required: true})); const triggerLabel = core.getInput('trigger-label', {required: true}); const closingComment = core.getInput('closing-comment', {required: true}); - const dryRun = true; + const dryRun = core.getInput('dry-run', {required: true}) !== 'false'; const repository = github.context.payload.repository?.full_name; if (!repository) {