Skip to content

Conversation

@kevalyq
Copy link
Contributor

@kevalyq kevalyq commented Nov 2, 2025

Problem

PR #81 included --no-verify as option 3, which violates Critical Rule #4: No Bypass.

Copilot correctly flagged this in SecPal/.github#171, SecPal/frontend#56, SecPal/contracts#40.

Solution

Removed --no-verify suggestion. Only .preflight-allow-large-pr remains as legitimate override.

Follow-up to #81

Removed option 3 from pre-push error message as it violates
Critical Rule #4: No Bypass policy.

The only legitimate override is .preflight-allow-large-pr for
exceptional cases with maintainer approval.

Follow-up to #81 based on Copilot review feedback.
Copilot AI review requested due to automatic review settings November 2, 2025 19:37
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

💡 Tip: Consider Using Draft PRs

Benefits of opening PRs as drafts initially:

  • 💰 Saves CI runtime and Copilot review credits
  • 🎯 Automatically sets linked issues to "🚧 In Progress" status
  • 🚀 Mark "Ready for review" when done to trigger full CI pipeline

How to convert:

  1. Click "Still in progress? Convert to draft" in the sidebar, OR
  2. Use gh pr ready when ready for review

This is just a friendly reminder - feel free to continue as is! 😊

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies the guidance provided when a large PR is detected by removing the suggestion to bypass the preflight check entirely using --no-verify, and adds clarification that the override option should only be used for exceptional cases.

Changes

  • Removes the third option suggesting git push --no-verify as a way to bypass the preflight hook
  • Adds clarifying text "(for exceptional cases)" to the override check option to discourage routine use

- Replace bash-specific [[ =~ ]] with POSIX-compliant case statement
- Combine multiple grep -v calls into single grep -Ev with pattern group
- Use grep -m 1 for early termination (performance improvement)
- Fix sed range calculation (UNRELEASED_END is relative, not absolute)
- Add clarifying comments about CHANGELOG_EXEMPT_PREFIXES and case sync
- Improve warning message with specific line count and non-blocking note
- Extract filter logic to reusable filter_changelog_content() function

Aligns api/scripts/preflight.sh with optimizations applied to frontend,
contracts, and .github repositories per Copilot review feedback.
@kevalyq kevalyq merged commit 5424e53 into main Nov 2, 2025
12 checks passed
@kevalyq kevalyq deleted the fix/remove-no-verify-suggestion branch November 2, 2025 19:57
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

💡 Tip: Consider Using Draft PRs

Benefits of opening PRs as drafts initially:

  • 💰 Saves CI runtime and Copilot review credits
  • 🎯 Automatically sets linked issues to "🚧 In Progress" status
  • 🚀 Mark "Ready for review" when done to trigger full CI pipeline

How to convert:

  1. Click "Still in progress? Convert to draft" in the sidebar, OR
  2. Use gh pr ready when ready for review

This is just a friendly reminder - feel free to continue as is! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants