Skip to content

Builds: Add get_result_display property to Build model#13105

Open
ericholscher wants to merge 2 commits into
mainfrom
claude/kind-planck-45KWp
Open

Builds: Add get_result_display property to Build model#13105
ericholscher wants to merge 2 commits into
mainfrom
claude/kind-planck-45KWp

Conversation

@ericholscher
Copy link
Copy Markdown
Member

Adds a get_result_display property to the Build model that returns a human-readable build result string: "Build passed", "Build failed", "Build cancelled", or "Building". This centralizes logic that was previously duplicated in templates and JavaScript.

Companion to ext-theme#758, which uses this property for OpenGraph meta tags on build detail pages.


Generated by Claude Code


Generated by Claude Code

Centralizes the human-readable build result logic (passed/failed/
cancelled/building) so templates and other code can reuse it.

https://claude.ai/code/session_012fjaaMr8qJHLJsqmJqE78e
@ericholscher ericholscher marked this pull request as ready for review June 4, 2026 16:59
@ericholscher ericholscher requested a review from a team as a code owner June 4, 2026 16:59
@ericholscher ericholscher requested review from Copilot and stsewd June 4, 2026 16:59
Copy link
Copy Markdown
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 centralizes “human-readable build result” formatting on the Build model, so templates/clients can rely on a single source of truth (notably for build detail OpenGraph metadata).

Changes:

  • Add Build.get_result_display to return a user-facing string for build outcomes (passed/failed/cancelled/in-progress).
  • Import BUILD_STATE_CANCELLED to support cancelled-state handling in the new display logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread readthedocs/builds/models.py Outdated
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.

3 participants