Skip to content

Commit 21d6818

Browse files
authored
Merge pull request #2 from jun-hara/main
Partially resolves casa#2638
2 parents f542308 + d3d87b6 commit 21d6818

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ inputs:
2121
description: 'Message posted on issue as unassign warning'
2222
required: false
2323
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!"
24+
office_hours:
25+
description: 'Slack office hours included in warning or unassign message'
26+
required: false
27+
default: ''
2428
runs:
2529
using: 'node12'
26-
main: 'index.js'
30+
main: 'index.js'

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const unassignInactiveInHours = core.getInput('unassign_inactive_in_hours');
55
const unassignInactiveMessage = core.getInput('unassign_inactive_message');
66
const warningInactiveInHours = core.getInput('warning_inactive_in_hours');
77
const warningInactiveMessage = core.getInput('warning_inactive_message');
8+
const officeHours = core.getInput('office_hours');
89
const repoOwner = github.context.repo.owner;
910
const repo = github.context.repo.repo;
1011
const octokit = github.getOctokit(token);
@@ -175,7 +176,10 @@ async function main() {
175176
const body = `This issue has been inactive for ${timeInactiveInHours} ` +
176177
`hours (${(timeInactiveInHours/24).toFixed(2)} days) ` +
177178
`and will be automatically unassigned after ${willBeUnassignedInHours} ` +
178-
`more hours (${(willBeUnassignedInHours/24).toFixed(2)} days).` +
179+
`more hours (${(willBeUnassignedInHours/24).toFixed(2)} days). ` +
180+
`If you have questions, please visit the #casa channel in slack during ` +
181+
`${officeHours}`+ `. ` +
182+
`Link: https://rubyforgood.herokuapp.com/ \n\n` +
179183
`${warningInactiveMessage}`;
180184
try {
181185
await octokit.issues.createComment({

0 commit comments

Comments
 (0)