{% set pinned = state.pinned | default([]) %} {% set order = state.repo_order | default([]) %} {% macro repo_card(repo, is_pinned) %}
{{ repo.name }}
{{ repo.branch or "detached" }} {% if repo.stale %}stale{% endif %} {% if repo.ahead or repo.behind %} {% if repo.ahead %}↑{{ repo.ahead }}{% endif %} {% if repo.behind %}↓{{ repo.behind }}{% endif %} {% endif %}
{% if repo.default_ahead or repo.default_behind %}
{% if repo.default_ahead and repo.default_behind and not repo.stale %}diverged{% endif %} {% if repo.default_ahead %}↑{{ repo.default_ahead }}{% endif %} {% if repo.default_behind %}↓{{ repo.default_behind }}{% endif %} from {{ repo.default_branch }}
{% endif %} {% if repo.pull_status == "clean" %}
↓ pull available
{% elif repo.pull_status == "conflict" %}
⚠ conflict detected
{% endif %}
{% if repo.has_forge %}
{{ repo.pipeline_status or "no pipeline" }}
{% if repo.mr_count %}
{{ repo.mr_count }} MR{{ "s" if repo.mr_count > 1 }}
{% endif %} {% if repo.issue_count %}
{{ repo.issue_count }} issue{{ "s" if repo.issue_count > 1 }}
{% endif %} {% if repo.vuln_critical or repo.vuln_high %}
{% if repo.vuln_critical %}{{ repo.vuln_critical }} crit{% endif %} {% if repo.vuln_high %}{{ repo.vuln_high }} high{% endif %}
{% endif %}
{% endif %}
{% endmacro %} {% if state and state.repos %} {% set has_pullable = state.repos | selectattr("pull_status", "equalto", "clean") | list | length > 0 %} {% set has_stale = state.repos | selectattr("stale", "equalto", true) | list | length > 0 %}
{% set pinned_repos = state.repos | selectattr("name", "in", pinned) | list %} {% if pinned_repos %}
Pinned
{% for repo in pinned_repos %} {{ repo_card(repo, true) }} {% endfor %}
{% endif %}
{% for repo in state.repos if repo.name not in pinned %} {{ repo_card(repo, false) }} {% endfor %}
{% else %}

No repos discovered. Run project-hub init to get started.

{% endif %}