{% include '_header.html' %} {# This page's query string with some of it changed. #} {% macro query(tab=page.tab, org=page.org, server=page.server, days=page.days) -%} {%- set q = {"tab": tab} -%} {%- if org %}{% set _ = q.update({"org": org}) %}{% endif -%} {%- if server %}{% set _ = q.update({"server": server}) %}{% endif -%} {%- set _ = q.update({"days": days if days is not none else "all"}) -%} {{ q | urlencode }} {%- endmacro %} {# A link to this page with some of the query string changed. #} {% macro url(tab=page.tab, org=page.org, server=page.server, days=page.days) -%} /syncs/?{{ query(tab=tab, org=org, server=server, days=days) }} {%- endmacro %} {# An ISO timestamp with the time and offset after its date, in lighter gray. #} {% macro when(value) -%} {%- set date, t, rest = value.partition("T") -%} {{ date }}{% if t %}T{{ rest }}{% endif %} {%- endmacro %} {% macro command_box(id, text) -%}
{{ text }}
{%- endmacro %}

Syncs

Which repos are out of date, and the kgit commands to refresh them. This page only shows commands: copy one and run it yourself.

{% for tab, label in [("repos", "Repos"), ("orgs", "Org syncs")] %} {{ label }} {% endfor %}
{% if page.tab == "repos" %}
Not fetched in
{% for d, label in [(1, "1 day"), (7, "1 week"), (30, "30 days"), (none, "all")] %} {{ label }} {% endfor %}
{% endif %}
{% if page.tab == "repos" %} {% set view = page.repos %}

{% if page.days is not none and view.stale == 0 %}All repos refreshed within specified window.{% endif %} {{ view.stale }} of {{ view.total }} repos {% if page.days is not none %}not refreshed in {{ page.days }} day{{ "s" if page.days != 1 }}{% else %}in scope{% endif %}.

{% if view.fell_back %}

{{ view.fell_back }} of them have never been fetched by kgit; their last sync is used.

{% endif %} {{ command_box("pull-command", view.command) }}

Check first, offline:

{{ command_box("check-command", view.check_command) }}
{% for row in view.rows %} {% endfor %}
Repo Last fetch Last sync Last commit Status Sync Age (days)
{{ row.repo_id }} {{ when(row.last_fetch) }} {{ when(row.last_sync) }} {{ when(row.last_commit) }} {{ row.status }} {{ row.fetch_age }}
{% else %} {% set orgs = page.orgs %} {% if not orgs.available %}

This database is from before org sync history was recorded. Back it up, then run:

{{ command_box("upgrade-command", "kospex upgrade-db -apply") }}
{% elif not orgs.runs %}

No org syncs yet. Start one with kgit sync --org OWNER -inventory.

{% else %}
{% for h in ["Org", "Run", "State", "Listed", "Repos", "Synced", "Pending", "Skipped", "Failed", "Gone", "Archived", "Forks", "Finished"] %} {% endfor %} {% for run in orgs.runs %} {% set c = run.counts %} {% endfor %}
{{ h }}
{{ run.org_key }} {{ run.run_id }} {{ "finished" if run.finished_at else "in progress" }} {{ run.listed_at or run.started_at }} {{ run.listed }} {{ c.synced }} {{ c.pending + c.in_progress }} {{ c.skipped }} {{ c.failed }} {{ c.gone }} {{ run.archived }} {{ run.forks }} {{ run.finished_at or "—" }}
{% if run.continue_command %} Continue: {{ command_box("continue-" ~ loop.index, run.continue_command) }} {% endif %}
Commands ({{ run.commands | length }}) and listings ({{ run.listings | length }}) {% if run.commands %} {% for h in ["Started", "Command", "Listing", "Synced", "Failed", "Skipped", "Took", "State", "Token"] %} {% endfor %} {% for cmd in run.commands %} {% endfor %}
{{ h }}
{{ cmd.started_at }} {{ cmd.command }}{% if cmd.error %}
{{ cmd.error }}
{% endif %}
{{ cmd.listing or "" }} {{ cmd.synced if cmd.synced is not none else "" }} {{ cmd.failed if cmd.failed is not none else "" }} {{ cmd.skipped if cmd.skipped is not none else "" }} {{ cmd.took }} {{ cmd.state }} {{ cmd.token_text }}
{% else %}

Commands not recorded: this run is from before they were.

{% endif %} {% if run.listings %} {% for h in ["Listed at", "Kind", "Repos", "New", "Gone", "Back", "Renamed", "Archived+", "Unarchived"] %} {% endfor %} {% for l in run.listings %} {% for k in ["listed", "new", "gone", "back", "renamed", "newly_archived", "unarchived"] %} {% endfor %} {% endfor %}
{{ h }}
{{ l.listed_at }} {{ l.kind }}{{ l[k] if l[k] is not none else "" }}
{% endif %}
{% endif %} {% endif %}
{% include '_footer_scripts.html' %} {% include '_datatable_scripts.html' %}