Skip to content

feat: link OwnerAdmin owner-id array fields to admin pages#1407

Open
thomasrockhu-codecov wants to merge 1 commit into
mainfrom
th/owner-admin-array-field-display
Open

feat: link OwnerAdmin owner-id array fields to admin pages#1407
thomasrockhu-codecov wants to merge 1 commit into
mainfrom
th/owner-admin-array-field-display

Conversation

@thomasrockhu-codecov

Copy link
Copy Markdown
Contributor

Summary

Makes the raw owner-id / repo-id array fields on the Django OwnerAdmin change page human-readable.

  • admins and organizations (owner-id arrays) render as read-only lists of links to each Owner's change page, labelled <ownerid> — <username> (<email>).
  • permission (repo-id array) renders as links to each Repository's change page, labelled <repoid> — <owner>/<repo> (private|public).
  • Missing ids render as <id> — (not found).

This lets staff see who/what each id refers to and jump straight to the related record instead of eyeballing raw integer arrays. The array fields are surfaced through read-only *_display methods (the raw fields stay excluded from the editable form).

Test plan

  • pytest codecov_auth/tests/test_admin.py::OwnerAdminTest (added test_admins_display_*, test_organizations_display_*, test_permission_display_*, test_admins_and_organizations_are_read_only).

Notes

Split out from the combined change; the changelist count-query performance fix is in a separate PR (#1406).

Made with Cursor

Render the admins, organizations, and permission array fields as
read-only lists of links to the related admin change pages. Owner-id
arrays (admins, organizations) link to each Owner and are labelled
"<ownerid> — <username> (<email>)"; the permission array (repoids)
links to each Repository, labelled "<repoid> — <owner>/<repo>
(private|public)". Missing ids render as "<id> — (not found)".

This lets staff see who each id refers to and jump straight to the
related record instead of eyeballing raw integer arrays.
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.89%. Comparing base (701e991) to head (a974598).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/codecov_auth/admin.py 97.14% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1407   +/-   ##
=======================================
  Coverage   91.89%   91.89%           
=======================================
  Files        1325     1325           
  Lines       50868    50902   +34     
  Branches     1626     1626           
=======================================
+ Hits        46744    46777   +33     
- Misses       3818     3819    +1     
  Partials      306      306           
Flag Coverage Δ
apiunit 94.94% <97.14%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/codecov_auth/admin.py 97.14% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant