You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const commentAge = now - new Date(complianceComment.created_at).getTime();
52
+
if (commentAge < twoHours) {
53
+
core.info(`${kind} #${item.number} still within 2-hour window (${Math.round(commentAge / 60000)}m elapsed)`);
54
+
continue;
55
+
}
56
+
57
+
const closeMessage = isPR
58
+
? 'This pull request has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new pull request that follows our guidelines.'
59
+
: 'This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new issue that follows our issue templates.';
60
+
61
+
await github.rest.issues.createComment({
62
+
owner: context.repo.owner,
63
+
repo: context.repo.repo,
64
+
issue_number: item.number,
65
+
body: closeMessage,
66
+
});
67
+
68
+
if (isPR) {
69
+
await github.rest.pulls.update({
70
+
owner: context.repo.owner,
71
+
repo: context.repo.repo,
72
+
pull_number: item.number,
73
+
state: 'closed',
74
+
});
75
+
} else {
76
+
await github.rest.issues.update({
77
+
owner: context.repo.owner,
78
+
repo: context.repo.repo,
79
+
issue_number: item.number,
80
+
state: 'closed',
81
+
state_reason: 'not_planned',
82
+
});
83
+
}
84
+
85
+
core.info(`Closed non-compliant ${kind} #${item.number} after 2-hour window`);
opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:'
37
+
opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:
38
38
39
-
Issue number:
40
-
${{ github.event.issue.number }}
39
+
Issue number: ${{ github.event.issue.number }}
41
40
42
-
Lookup this issue and search through existing issues (excluding #${{ github.event.issue.number }}) in this repository to find any potential duplicates of this new issue.
41
+
Lookup this issue with gh issue view ${{ github.event.issue.number }}.
42
+
43
+
You have TWO tasks. Perform both, then post a SINGLE comment (if needed).
44
+
45
+
---
46
+
47
+
TASK 1: CONTRIBUTING GUIDELINES COMPLIANCE CHECK
48
+
49
+
Check whether the issue follows our contributing guidelines and issue templates.
50
+
51
+
This project has three issue templates that every issue MUST use one of:
52
+
53
+
1. Bug Report - requires a Description field with real content
54
+
2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]:
55
+
3. Question - requires the Question field with real content
56
+
57
+
Additionally check:
58
+
- No AI-generated walls of text (long, AI-generated descriptions are not acceptable)
59
+
- The issue has real content, not just template placeholder text left unchanged
60
+
- Bug reports should include some context about how to reproduce
61
+
- Feature requests should explain the problem or need
62
+
- We want to push for having the user provide system description & information
63
+
64
+
Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content.
65
+
66
+
---
67
+
68
+
TASK 2: DUPLICATE CHECK
69
+
70
+
Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates.
43
71
Consider:
44
72
1. Similar titles or descriptions
45
73
2. Same error messages or symptoms
46
74
3. Related functionality or components
47
75
4. Similar feature requests
48
76
49
-
If you find any potential duplicates, please comment on the new issue with:
50
-
- A brief explanation of why it might be a duplicate
51
-
- Links to the potentially duplicate issues
52
-
- A suggestion to check those issues first
77
+
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, note the pinned keybinds issue #4997.
78
+
79
+
---
80
+
81
+
POSTING YOUR COMMENT:
82
+
83
+
Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows:
84
+
85
+
If the issue is NOT compliant, start the comment with:
86
+
<!-- issue-compliance -->
87
+
Then explain what needs to be fixed and that they have 2 hours to edit the issue before it is automatically closed. Also add the label needs:compliance to the issue using: gh issue edit ${{ github.event.issue.number }} --add-label needs:compliance
88
+
89
+
If duplicates were found, include a section about potential duplicates with links.
90
+
91
+
If the issue mentions keybinds/keyboard shortcuts, include a note about #4997.
92
+
93
+
If the issue IS compliant AND no duplicates were found AND no keybind reference, do NOT comment at all.
53
94
54
95
Use this format for the comment:
55
-
'This issue might be a duplicate of existing issues. Please check:
96
+
97
+
[If not compliant:]
98
+
<!-- issue-compliance -->
99
+
This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md).
100
+
101
+
**What needs to be fixed:**
102
+
- [specific reasons]
103
+
104
+
Please edit this issue to address the above within **2 hours**, or it will be automatically closed.
105
+
106
+
[If duplicates found, add:]
107
+
---
108
+
This issue might be a duplicate of existing issues. Please check:
56
109
- #[issue_number]: [brief description of similarity]
57
110
58
-
Feel free to ignore if none of these address your specific case.'
111
+
[If keybind-related, add:]
112
+
For keybind-related issues, please also check our pinned keybinds documentation: #4997
59
113
60
-
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, please add a comment mentioning the pinned keybinds issue #4997:
0 commit comments