Add issue and PR templates#515
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e55f592c42
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| await addLabels(context, pr.number, labelsToAdd); | ||
| await upsertIssueComment(context, pr.number, MARKER, failureBody(result)); | ||
|
|
||
| const expired = !pr.draft && hoursSince(pr.created_at) >= HOURS_BEFORE_CLOSE; |
There was a problem hiding this comment.
Base auto-close window on warning time
In the scheduled/manual scan from the new PR policy workflow, any open PR created more than 48 hours ago that does not already match the new template satisfies this condition on the first run and is closed immediately, before the bot has provided the promised correction window. The same applies to older drafts when they are marked ready; use the timestamp of the first warning/label instead of created_at so only PRs that stayed incomplete for 48 hours after notification are closed.
Useful? React with 👍 / 👎.
| /issue number if applicable/i, | ||
| /what you expected to happen/i, | ||
| /what actually happened/i, | ||
| /steps to reproduce/i, |
There was a problem hiding this comment.
Anchor placeholder checks to placeholder-only text
Because hasNonPlaceholderContent rejects a field when any placeholder regex matches anywhere in the section, a valid bug report that starts the field with a normal prefix like Steps to reproduce: followed by real numbered steps is treated as missing reproduction details. That leaves otherwise complete issues labeled needs reproduction and eligible for the 14-day stale close, so these placeholder patterns should only match fields that are still just the placeholder text.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6191834498
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (event.action !== "opened" && !warningComment) { | ||
| return; |
There was a problem hiding this comment.
Revalidate PRs after clean opens
In .github/workflows/pr-policy.yml I checked that this job runs on edited and synchronize; when a PR first opens with a valid template, there is no marker comment, so this guard returns success on a later body edit that deletes required sections or a push that adds visual files without screenshots. That lets the required check pass instead of enforcing the current PR state; use the warning only to compute the close window, not to skip validation.
Useful? React with 👍 / 👎.
| const warningComment = await existingBugWarningComment(context, issue.number); | ||
| if (event.action !== "opened" && !warningComment) return; |
There was a problem hiding this comment.
Revalidate bug issues after clean opens
In .github/workflows/issue-intake.yml the job runs on edited and reopened; if a bug report was valid when opened, no warning comment exists, so a later edit removing reproduction fields returns before validation and never applies needs reproduction. This leaves incomplete bug reports outside the stale-close path; revalidate bug issues on every issue event and use the existing comment only for comment updates.
Useful? React with 👍 / 👎.
Description
Add issue and PR templates
Type of Change