File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Close Single-Word Issues
2+
3+ on :
4+ issues :
5+ types :
6+ - opened
7+
8+ permissions :
9+ issues : write
10+
11+ jobs :
12+ close-issue :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Close Single-Word Issue
17+ uses : actions/github-script@v7
18+ with :
19+ github-token : ${{ secrets.GITHUB_TOKEN }}
20+ script : |
21+ const issueTitle = context.payload.issue.title.trim();
22+ const isSingleWord = /^\S+$/.test(issueTitle);
23+
24+ if (isSingleWord) {
25+ const issueNumber = context.payload.issue.number;
26+ const repo = context.repo.repo;
27+
28+ // Close the issue and add the invalid label
29+ github.rest.issues.update({
30+ owner: context.repo.owner,
31+ repo: repo,
32+ issue_number: issueNumber,
33+ labels: ['invalid'],
34+ state: 'closed'
35+ });
36+
37+ // Comment on the issue
38+ await github.rest.issues.createComment({
39+ owner: context.repo.owner,
40+ repo: repo,
41+ issue_number: issueNumber,
42+ body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title.`
43+ });
44+ }
Original file line number Diff line number Diff line change 1+ name : No Response
2+
3+ # Both `issue_comment` and `scheduled` event types are required for this Action
4+ # to work properly.
5+ on :
6+ issue_comment :
7+ types : [created]
8+ schedule :
9+ # Schedule for five minutes after the hour, every hour
10+ - cron : ' 5 * * * *'
11+
12+ permissions :
13+ issues : write
14+
15+ jobs :
16+ noResponse :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : lee-dohm/no-response@v0.5.0
20+ with :
21+ token : ${{ secrets.GITHUB_TOKEN }}
22+ closeComment : >
23+ Thank you for your issue!
24+
25+ We haven’t gotten a response to our questions above. With only the
26+ information that is currently in the issue, we don’t have enough
27+ information to take action. We’re going to close this but don’t
28+ hesitate to reach out if you have or find the answers we need. If
29+ you answer our questions above, this issue will automatically
30+ reopen.
31+ daysUntilClose : 7
32+ responseRequiredLabel : more-info-needed
Original file line number Diff line number Diff line change 1+ name : ' Marks stale issues and PRs'
2+ on :
3+ schedule :
4+ - cron : ' 30 1 * * *' # 1:30 AM UTC
5+
6+ permissions :
7+ issues : write
8+
9+ jobs :
10+ stale :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/stale@v9
14+ with :
15+ stale-issue-label : ' stale, triage' # The label that will be added to the issues when automatically marked as stale
16+ start-date : ' 2025-01-01T00:00:00Z' # Skip stale action for issues created before it
17+ days-before-stale : 365
18+ days-before-close : -1 # If -1, the issues nor pull requests will never be closed automatically.
19+ days-before-pr-stale : -1 # If -1, no pull requests will be marked as stale automatically.
20+ exempt-issue-labels : ' never-stale, help wanted' # issues labeled as such will be excluded them from being marked as stale
You can’t perform that action at this time.
0 commit comments