~xenrox/custom-readme

1c4ffcd563f00ce7be6ad5a270a09f2f42b674d3 — Thorben Günther 6 months ago ced4627 master
Hut supports clearing the README now
1 files changed, 2 insertions(+), 9 deletions(-)

M readme.html
M readme.html => readme.html +2 -9
@@ 25,13 25,6 @@
<h2 id="removing-the-custom-readme">Removing the custom README</h2>
<p>
    If you want to go back to sourcehut&#39;s default way of rendering the
    README from markdown, you can do this by manually executing a GraphQL
    mutation. <code>hut</code> does not yet support this functionality.
    README from markdown, you can do this with
    <code>hut git update --readme &quot;&quot;</code>.
</p>
<pre><code class="lang-bash"><span class="hljs-comment"># enter your own OAuth2 token</span>
<span class="hljs-built_in">export</span> TOKEN=<span class="hljs-string">"YourOAuth2Token"</span>
<span class="hljs-comment"># find out the ID of your repository</span>
curl --oauth2-bearer <span class="hljs-variable">$TOKEN</span> https://git.sr.ht/query <span class="hljs-_">-d</span> <span class="hljs-string">'{"query": "query { me { repository(name: \"custom-readme\"){ id } }  }"}'</span>
<span class="hljs-comment"># remove custom README</span>
curl --oauth2-bearer <span class="hljs-variable">$TOKEN</span> https://git.sr.ht/query <span class="hljs-_">-d</span> <span class="hljs-string">'{"query": "mutation{ updateRepository(id: 42, input: { readme: null }) { id }  }"}'</span>
</code></pre>