Skip to content

Conversation

@andypols
Copy link
Contributor

Summary

This PR addresses #1030. Previously, push rejections were recorded without any context. Reviewers now must provide an explanation when rejecting a push, and that explanation is stored and displayed so contributors can understand why their changes were not approved.

Solution

Backend

  • Database
    • Updated db.reject (file and Mongo) to accept a rejection object.
    • Persist the rejection on the Action via a new rejection property.
  • Push API
    • Updated POST /push/:id/reject to require a rejection reason.
    • Fetches the reviewer email (similar to approvals) and blocks the rejection if it’s missing.
    • Saves the rejection payload including:
      • reason
      • timestamp
      • reviewer

UI

  • Refactored PushDetails into smaller components for clarity and easier maintenance:
    • PushStatusHeader
    • StatusIcon
    • Attestation
    • Rejection
    • ApprovalBadge
    • RejectionBadge
  • Added a Rejection dialog that requires the reviewer to enter a reason before rejecting a push.
  • Added RejectionBadge and ApprovalBadge components to display:
    • reviewer
    • timestamp
    • rejection details (for rejections)

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 28e25b0
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/692b4b4cf7405300085a5e1f

@andypols andypols changed the title Add reject reason feat: Add reject reason Nov 29, 2025
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

❌ Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.45%. Comparing base (9f24d3f) to head (28e25b0).

Files with missing lines Patch % Lines
src/db/mongo/pushes.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1295      +/-   ##
==========================================
- Coverage   83.35%   80.45%   -2.91%     
==========================================
  Files          70       72       +2     
  Lines        3004     3162     +158     
  Branches      499      539      +40     
==========================================
+ Hits         2504     2544      +40     
- Misses        397      516     +119     
+ Partials      103      102       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant