Skip to content

Commit cd768e1

Browse files
committed
Actions: enable manual stale issue management
1 parent 872f49b commit cd768e1

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/community-issue-comment.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This workflow handles issue comments.
2+
# See for more info: https://github.com/actions/github-script
23

3-
name: Issue Assignee Comment
4+
name: Issue Comments
45

56
on:
67
issues:
@@ -11,8 +12,8 @@ on:
1112
jobs:
1213
# When issues are assigned, a comment is posted
1314
# Tags the assignee with links to helpful resources
14-
# See for more info: https://github.com/actions/github-script
1515
assigned-comment:
16+
if: github.event.action == 'assigned'
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Post assignee issue comment
@@ -33,3 +34,23 @@ jobs:
3334
Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
3435
Learn more about Chayn [here](https://linktr.ee/chayn) and [explore our projects](https://org.chayn.co/projects). 🌸`
3536
})
37+
38+
# When issues are labeled as stale, a comment is posted.
39+
# Tags the assignee with warning.
40+
# Enables manual issue management in addition to community-stale-management.yml
41+
stale-label-comment:
42+
if: github.event.action == 'labeled' && github.event.label.name == 'stale'
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Post stale issue comment
46+
id: stale-label-comment
47+
uses: actions/github-script@v7
48+
with:
49+
github-token: ${{secrets.GITHUB_TOKEN}}
50+
script: |
51+
github.rest.issues.createComment({
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
issue_number: context.payload.issue.number,
55+
body: `@${context.payload.issue.assignee.login} As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned.`
56+
})

.github/workflows/community-stale-management.yml

-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ jobs:
4141
ignore-pr-updates: true
4242
stale-pr-message: "As per Chayn policy, after 30 days of inactivity, we will close this PR."
4343
close-pr-message: "This PR has been closed due to inactivity."
44-
stale-issue-message: "As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned."

0 commit comments

Comments
 (0)