Skip to content

Commit

Permalink
Merge pull request #2 from jun-hara/main
Browse files Browse the repository at this point in the history
Partially resolves casa#2638
  • Loading branch information
FireLemons authored Jul 16, 2022
2 parents f542308 + d3d87b6 commit 21d6818
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description: 'Message posted on issue as unassign warning'
required: false
default: "Thanks for picking up this issue and supporting this project! It looks like there hasn’t been any activity on this ticket in a while. To keep things moving, you will be unassigned from this issue soon if there’s no new activity on it by then. But we encourage you to pick this issue (or a new one) back up in the future!"
office_hours:
description: 'Slack office hours included in warning or unassign message'
required: false
default: ''
runs:
using: 'node12'
main: 'index.js'
main: 'index.js'
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const unassignInactiveInHours = core.getInput('unassign_inactive_in_hours');
const unassignInactiveMessage = core.getInput('unassign_inactive_message');
const warningInactiveInHours = core.getInput('warning_inactive_in_hours');
const warningInactiveMessage = core.getInput('warning_inactive_message');
const officeHours = core.getInput('office_hours');
const repoOwner = github.context.repo.owner;
const repo = github.context.repo.repo;
const octokit = github.getOctokit(token);
Expand Down Expand Up @@ -175,7 +176,10 @@ async function main() {
const body = `This issue has been inactive for ${timeInactiveInHours} ` +
`hours (${(timeInactiveInHours/24).toFixed(2)} days) ` +
`and will be automatically unassigned after ${willBeUnassignedInHours} ` +
`more hours (${(willBeUnassignedInHours/24).toFixed(2)} days).` +
`more hours (${(willBeUnassignedInHours/24).toFixed(2)} days). ` +
`If you have questions, please visit the #casa channel in slack during ` +
`${officeHours}`+ `. ` +
`Link: https://rubyforgood.herokuapp.com/ \n\n` +
`${warningInactiveMessage}`;
try {
await octokit.issues.createComment({
Expand Down

0 comments on commit 21d6818

Please sign in to comment.