From 9bb825588c7edfdd4f3b3e7dd2551b0a55b735f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Wed, 2 Nov 2022 16:06:36 +0100 Subject: [PATCH] Initial commit --- readme.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 readme.html diff --git a/readme.html b/readme.html new file mode 100644 index 0000000..92309d2 --- /dev/null +++ b/readme.html @@ -0,0 +1,28 @@ +

+ This repository demonstrates how to set a + custom README + with the development version of + hut. +

+

Setting the custom README

+

+ hut git update --readme readme.html --repo + https://git.xenrox.net/~xenrox/custom-readme +

+

Removing the custom README

+

+ If you want to go back to sourcehut's default way of rendering the + README from markdown, you can do this by manually executing a GraphQL + mutation. hut does not yet support this functionality. +

+
# enter your own OAuth2 token
+export TOKEN="YourOAuth2Token"
+# find out the ID of your repository
+curl --oauth2-bearer $TOKEN https://git.sr.ht/query -d '{"query": "query { me { repository(name: \"custom-readme\"){ id } }  }"}'
+# remove custom README
+curl --oauth2-bearer $TOKEN https://git.sr.ht/query -d '{"query": "mutation{ updateRepository(id: 70332, input: { readme: null }) { id }  }"}'
+
-- 2.44.0