Skip to content

fix(ci): carry PR-target/issue-quality harden onto dev2-go (#631) - #677

Merged
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:carry/631-enforce-pr-target-dev2-go
Jul 29, 2026
Merged

fix(ci): carry PR-target/issue-quality harden onto dev2-go (#631)#677
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:carry/631-enforce-pr-target-dev2-go

Conversation

@Wibias

@Wibias Wibias commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Go port

None — CI/workflows and issue-quality scripts only. No Go counterpart.

Test plan

  • Cherry-pick applied (conflict resolved)
  • bun test tests/ci-workflows.test.ts
  • node --test .github/scripts/enforce-pr-target.test.cjs
  • node --test .github/scripts/issue-quality.test.cjs
  • CI on dev2-go

…gates (lidge-jun#631)

Hardens wrong-base PR drafting so the required check fails even when draft GraphQL soft-fails, and tightens bug-form Version/OS/reproduction gates.

Go port: none — CI/workflows and issue-quality scripts only; no Go counterpart.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a6688471-7629-409c-a8f2-add4acc8d393

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 29, 2026
@Wibias Wibias changed the title fix(ci): carry PR-target/issue-quality harden onto dig2-go (#631) fix(ci): carry PR-target/issue-quality harden onto dev2-go (#631) Jul 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a25d4236ea

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

state.autoDraftedByBot = true;
// Checkpoint after a successful draft so ownership survives
// if the final explanation write fails.
await upsertComment(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep draft ownership when checkpointing fails

If convertToDraft() succeeds but this checkpoint comment update fails, the surrounding catch treats the comment failure as a failed conversion and resets state.autoDraftedByBot to false even though the PR is now a draft. Whether the final update recovers or a later event reruns the workflow, the stored false state means correcting the target branch will no longer restore the PR to ready-for-review. Catch only the GraphQL mutation failure and preserve ownership after a successful conversion.

Useful? React with 👍 / 👎.

Comment on lines +704 to +708
} else if (
!softPass &&
isNewBugForm &&
version !== null &&
(isEmpty(version) || isRawPlaceholder(version))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject removed required environment headings

When a contributor edits an otherwise valid new-form bug and deletes the entire Version heading, extractSection returns null and this version !== null guard skips the newly added missing-version error, so the report still validates; the Operating system branch repeats the same bypass. For isNewBugForm, treat null headings as missing too rather than only rejecting headings whose contents were cleared.

Useful? React with 👍 / 👎.

Comment on lines +265 to +267
core.setFailed(
`Pull request targets ${pr.base.ref}; allowed bases are ${ALLOWED_BASES.join(", ")}.`
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exempt maintainer promotions from the failing target check

For the documented release flow where a maintainer promotes dev to main, wrongBase is true and this unconditional failure makes the required target check impossible to satisfy even though that PR is an allowed exception. Add a securely verified maintainer-promotion exception while continuing to fail ordinary feature PRs aimed at main.

AGENTS.md reference: AGENTS.md:L55-L56

Useful? React with 👍 / 👎.

*/
function isTooTerseBugReproduction(text) {
if (isEmpty(text) || isPlaceholder(text)) return false;
if (hasConcreteDetail(text)) return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require substance alongside concrete-detail tokens

A reproduction consisting only of 1, 502, ocx, or config passes because any digit or product keyword makes hasConcreteDetail() true and returns before the word-count check. These inputs remain non-actionable despite the new vague-reproduction gate, so require a minimum amount of surrounding content even when a concrete-detail token is present.

Useful? React with 👍 / 👎.

@Wibias
Wibias merged commit d602454 into lidge-jun:dev2-go Jul 29, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant