Compare commits

...

2 Commits

Author SHA1 Message Date
Daylin Morgan fd3a9c4e83
bump soft serve 2023-12-17 18:26:17 -06:00
Daylin Morgan e4db7bae04
collect 2023-12-17 17:36:15 -06:00
2 changed files with 10 additions and 8 deletions

View File

@ -20,7 +20,7 @@ services:
soft-serve:
container_name: soft-serve
image: charmcli/soft-serve:v0.6.2
image: charmcli/soft-serve:v0.7.4
restart: unless-stopped
volumes:
- ./soft/data:/soft-serve

View File

@ -8,10 +8,9 @@ curl -L \
]#
{.define: ssl.}
import std/[
httpclient, json,
os, osproc,
options, sequtils,
strformat, strutils,
httpclient, json, os, osproc,
options, strformat, strutils,
sugar
]
type
@ -20,7 +19,7 @@ type
description: string
html_url: string
template use(client: HttpClient, body: untyped) =
template use(client: HttpClient, body: untyped) =
try:
body
finally:
@ -85,9 +84,12 @@ when isMainModule:
let
ghRepos = getGhRepos()
softRepos = getSoftRepos()
toBeMirrored = collect:
for repo in ghRepos:
if repo.name in reposList and
repo.name notin softRepos:
repo
let repos = ghRepos.filterIt(it.name in reposList)
let toBeMirrored: seq[Repo] = repos.filterIt(it.name notin softRepos)
if toBeMirrored.len > 0:
for repo in toBeMirrored:
mirrorToSoft(repo, dryrun)