commit 3d1de9b73e725706e032e17175728946fa58c562
parent e0713460a7b5d457e2dc48e844571263c4c4a555
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date: Thu, 18 Jun 2026 00:27:28 +0200
Use me instead of repositories
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/mirror.sh b/mirror.sh
@@ -17,7 +17,7 @@ while read line; do
wrepodir="$PWD/web/$reponame"
if [ -d "$srepodir" ]; then
- git -C "$repodir" remote update
+ git -C "$srepodir" remote update
else
git clone --mirror "$srepo" "$srepodir"
fi
diff --git a/worker/src/index.ts b/worker/src/index.ts
@@ -28,8 +28,8 @@ export default {
},
body: JSON.stringify({
"query": `{
- repositories(filter: {count: 1, search: "~ashymad/mirrorer"}) {
- results {
+ me {
+ repository(name: "mirrorer") {
path(path: ".build.yml") {
object {
... on TextBlob {
@@ -39,9 +39,11 @@ export default {
}
}
}
- }`})
+ }`
+ })
});
- let yml = (await yml_req.json()).data.repositories.results[0].path.object.text;
+ let yml_json = await yml_req.json();
+ let yml = yml_json.data.me.repository.path.object.text;
let job_req = await fetch("https://builds.sr.ht/query", {
method: "POST",
headers: {