{#- Badge class for thread reply kind -#} {% macro reply_kind_badge(kind) -%} {% if kind == "comment" %}text-bg-secondary {%- elif kind == "proposal" %}text-bg-info {%- elif kind == "review" %}text-bg-warning text-dark {%- elif kind == "decision" %}text-bg-primary {%- elif kind == "implementation" %}text-bg-success {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Badge class for thread reply status -#} {% macro reply_status_badge(status) -%} {% if status == "accepted" %}text-bg-success {%- elif status == "rejected" %}text-bg-danger {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Accent border class for thread reply kind -#} {% macro reply_kind_accent(kind) -%} {% if kind == "comment" %}border-secondary-subtle {%- elif kind == "proposal" %}border-info-subtle {%- elif kind == "review" %}border-warning-subtle {%- elif kind == "decision" %}border-primary-subtle {%- elif kind == "implementation" %}border-success-subtle {%- else %}border-secondary-subtle {%- endif %} {%- endmacro %} {#- Badge class for thread kind -#} {% macro thread_kind_badge(kind) -%} {% if kind == "change" %}text-bg-info {%- elif kind == "task" %}text-bg-primary {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Badge class for thread status -#} {% macro thread_status_badge(status) -%} {% if status == "draft" %}text-bg-light border {%- elif status == "closed" %}text-bg-danger {%- elif status == "done" %}text-bg-success {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Accent border class for thread kind -#} {% macro thread_kind_accent(kind) -%} {% if kind == "change" %}border-info-subtle {%- elif kind == "task" %}border-primary-subtle {%- else %}border-secondary-subtle {%- endif %} {%- endmacro %} {#- Badge class for pull protection status -#} {% macro protection_status_badge(status) -%} {% if status == "ok" %}text-bg-success {%- elif status == "pending" %}text-bg-warning {%- elif status == "failed" %}text-bg-danger {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Badge class for pull review status -#} {% macro review_status_badge(status) -%} {% if status == "approved" %}text-bg-success {%- elif status == "changes" %}text-bg-danger {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Badge class for approver role -#} {% macro approver_badge(role) -%} {% if role == "trusted" %}text-bg-info {%- elif role == "eligible" %}text-bg-primary {%- else %}text-bg-secondary {%- endif %} {%- endmacro %} {#- Badge class for thread link kind -#} {% macro link_badge(kind) -%} {% if kind == "pull" %}text-bg-info {%- elif kind == "commit" %}text-bg-light border {%- elif kind == "branch" %}text-bg-success {%- elif kind == "thread" %}text-bg-secondary {%- else %}text-bg-secondary {%- endif %} {%- endmacro %}