Skip to content

ci: use shared PR validation action from shared-ai-standards#24

Merged
andreiships-bot merged 1 commit intodevfrom
feat/use-shared-pr-validation-rebased
Feb 26, 2026
Merged

ci: use shared PR validation action from shared-ai-standards#24
andreiships-bot merged 1 commit intodevfrom
feat/use-shared-pr-validation-rebased

Conversation

@andreiships-bot
Copy link
Copy Markdown
Collaborator

Summary

Replaces the inline PR title validation step with the shared composite action from andreiships/shared-ai-standards, reducing duplication and keeping validation logic in one place.

Changes

  • Replace inline title-check step with andreiships/shared-ai-standards/.github/actions/pr-validation@<sha>
  • Keep label management and linked-issue GraphQL check as local steps
  • Fix: c.body?.includes() optional chaining (was c.body.includes() — would throw on null body)
  • Fix: skipped/cancelled title-check outcomes treated as pass (prevents infra failures triggering needs:title)
  • Fix: correct stale log message (docs/refactor only skip issue check, not feat)

Test Plan

  • PR with invalid title → needs:title label added, comment posted, job fails
  • PR with valid title but no linked issue → needs:issue label added
  • PR with valid title and linked issue → both labels removed, job passes
  • docs:/refactor: PR → issue check skipped

Related

Depends on andreiships/shared-ai-standards PR #3 (merged).

@github-actions
Copy link
Copy Markdown

Hey! Your PR title ci: use shared PR validation action from shared-ai-standards doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

Copy link
Copy Markdown
Collaborator Author

@andreiships-bot andreiships-bot left a comment

Choose a reason for hiding this comment

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

Single-pass review (Claude)

Overall: The core integration is correct and well-reasoned:

  • SHA-pinned shared action (4a7766058a3981a4cd54b440c594aae1d8121c77) rather than @main — correct
  • continue-on-error: true on the shared action step — correct
  • skipped/cancelled outcomes treated as pass (intentional infra-failure protection) — correct
  • Optional chaining fix c.body?.includes(markerText) in check-standards — correct
  • title-types input alongside the shared action's regex — correct usage
  • Job-level if skip replaced with in-script TEAM_MEMBERS check — correct

One real bug found in the new check-compliance job (see inline comment).

Comment thread .github/workflows/pr-standards.yml Outdated
Replace inline title regex check with shared composite action from
andreiships/shared-ai-standards. The shared action validates PR titles
against conventional commit format; this workflow manages labels and
linked-issue enforcement on top.

- Fixes c.body?.includes (null-safety for PRs with no body)
- Treats skipped/cancelled title-check outcome as pass to avoid
  false positives when the shared action is unreachable
- Adds core.setFailed() so check-standards job fails visibly
@andreiships-bot andreiships-bot force-pushed the feat/use-shared-pr-validation-rebased branch from 02a78b1 to cc2fde0 Compare February 26, 2026 03:15
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator Author

@andreiships-bot andreiships-bot left a comment

Choose a reason for hiding this comment

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

Single-pass review (Claude)

Overall: Clean, well-scoped refactor. The integration is correct and the safety properties (infra-failure protection, null-body guard, explicit core.setFailed) are all improvements over the inline version. The prior review comment about check-compliance is now obsolete -- that job is not present in this version of the PR.

Findings:

  1. Behavior change: regex is now stricter (informational, not a blocker). The removed inline regex /^(feat|fix|docs|chore|refactor|test)\s*(\([a-zA-Z0-9-]+\))?\s*:/ allowed a space before (scope) (e.g. feat (scope): ...) and did not require content after the colon. The shared action regex ^(type)(\([\w-]+\))?!?:\s+.+$ is stricter: no space before (, ! breaking-change marker supported, requires at least one non-space character after : . This is a net improvement but is a subtle behavior change. Worth documenting in CONTRIBUTING.md.

  2. ci type excluded from contributor title check (informational). title-types: feat,fix,docs,chore,refactor,test does not include ci. If an external contributor ever opens a ci:-prefixed PR, it would get needs:title. Confirm this is intentional.

  3. SHA pin comment says # main (nitpick). SHA pinning is the correct practice. Just ensure the SHA gets bumped deliberately when the shared action receives updates.

  4. skip-users input not forwarded to shared action (design note, not a bug). The job-level if: already filters skip-users before any steps run, so the shared action built-in skip-users input is unused. Correct by design.

No blockers. The core.setFailed() additions are a genuine improvement -- the original would silently pass the job even after posting a needs:title/needs:issue label. The optional-chaining fix on c.body?.includes() is also correct.

@andreiships-bot
Copy link
Copy Markdown
Collaborator Author

Gemini Deep Review

Summary

This PR improves CI by replacing a local regex-based title check with a shared GitHub Action for validating PR standards, which is a great move for consistency and maintainability. The changes to fail the workflow on violations (core.setFailed) and the safer optional chaining (?.) are also excellent improvements. However, there's a syntax error in the uses clause for the new action that will prevent it from running.

Findings

[gemini-1] blocking: P0 | .github/workflows/pr-standards.yml:26 | The uses clause for the shared GitHub action has incorrect syntax. There is a space between the action path and the @ref, which will cause the workflow to fail when trying to resolve the action.
Fix: Remove the space between .../pr-validation and the @ symbol to form a valid owner/repo/path@ref syntax.

-        uses: andreiships/shared-ai-standards/.github/actions/pr-validation @41b2466c374cddf778ed0ea5bb2d08db7d9939d7 # main
+        uses: andreiships/shared-ai-standards/.github/actions/pr-validation@41b2466c374cddf778ed0ea5bb2d08db7d9939d7 # main

PR Metadata

Suggested PR Title: ci: use shared action for PR title and issue validation
Suggested Description Update: No update needed.

Questions

  • No questions.

Recommendation

[ ] Approve | [ ] Approve with changes | [x] Request changes

@andreiships-bot
Copy link
Copy Markdown
Collaborator Author

Codex Review

Summary

This PR is focused and improves maintainability by delegating title validation to the shared action while preserving local label/issue enforcement. I found one reliability issue in failure-mode handling that should be fixed before merge.

Findings

[FINDING-1] issue: P1 | .github/workflows/pr-standards.yml:87 | title-check failures are treated as invalid titles, but steps.title-check.outcome === 'failure' also includes infra/action runtime failures. This can incorrectly label PRs with needs:title, post misleading guidance, and block merge for non-title reasons.
Fix: Use an explicit validation output from the shared action (for example valid=true/false) and branch separately for infra failures with a distinct error message/comment path.

Code Quality

  • Types correct
  • No duplication introduced
  • Naming and structure are clear
  • issue: Validation-result and infra-failure paths are conflated at .github/workflows/pr-standards.yml:87

Architecture

  • Follows existing CI workflow patterns (github-script for labels/comments)
  • No architecture drift
  • Single-concern change in one workflow file

PR Metadata

Suggested PR Title: ci: use shared PR validation action for title checks
Suggested Description Update: Document expected behavior when the shared validator action itself fails (infra/runtime), separate from invalid PR title behavior.

Recommendation

[ ] Approve | [ ] Approve with changes | [x] Request changes

Escalate to Gemini?

[ ] Yes - [reason] | [x] No

@andreiships-bot
Copy link
Copy Markdown
Collaborator Author

Dual-Review Summary (Round 1)

Reviewer P0 P1 P2 Total Status
Codex 0 1 0 1 ❌ REQUEST_CHANGES
Gemini 1 0 0 1 ❌ REQUEST_CHANGES

Convergence: ❌ Not achieved (2 blocking findings)

Rounds: 1
Duration: 2 minutes


Findings

[Codex #1] P1 - .github/workflows/pr-standards.yml:87

title-check failures are treated as invalid titles, but steps.title-check.outcome === 'failure' also includes infra/action runtime failures. This can incorrectly label PRs with needs:title, post misleading guidance, and block merge for non-title reasons.

[Gemini #1] P0 - .github/workflows/pr-standards.yml:26

The uses clause for the shared GitHub action has incorrect syntax. There is a space between the action path and the @ref, which will cause the workflow to fail when trying to resolve the action.

@andreiships-bot andreiships-bot marked this pull request as ready for review February 26, 2026 03:24
@andreiships-bot andreiships-bot enabled auto-merge (squash) February 26, 2026 03:24
@andreiships-bot andreiships-bot merged commit c543bf5 into dev Feb 26, 2026
11 checks passed
@andreiships-bot andreiships-bot deleted the feat/use-shared-pr-validation-rebased branch February 26, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants