aboutsummaryrefslogtreecommitdiffstats
path: root/git.sr.ht
diff options
context:
space:
mode:
Diffstat (limited to 'git.sr.ht')
-rw-r--r--git.sr.ht/index.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/git.sr.ht/index.md b/git.sr.ht/index.md
index 2a1a662..f072ee6 100644
--- a/git.sr.ht/index.md
+++ b/git.sr.ht/index.md
@@ -147,6 +147,32 @@ jq -R '{
-d@- https://git.sr.ht/query
```
+This looks a bit complicated, so to explain what's happening here: we want to
+execute the following GraphQL request:
+
+```
+mutation UpdateRepo($id: Int!, $readme: String!) {
+ updateRepository(id: 60, input: { readme: $readme }) { id }
+}
+```
+
+The [jq](https://stedolan.github.io/jq) command takes the input (your README
+file) and incorporates it into a JSON string with the following format:
+
+```
+{
+ "query": "the desired GraphQL query...",
+ "variables": {
+ "id": 1337,
+ "readme": "your README HTML..."
+ }
+}
+```
+
+This is [the input](https://man.sr.ht/graphql.md#performing-graphql-queries) to
+the git.sr.ht GraphQL endpoint at `git.sr.ht/graphql`, which is piped from jq
+into [curl](https://curl.se) to send the request to git.sr.ht.
+
It may be desirable to configure a builds.sr.ht job to compile your README from
another markup format and submit it on each git push. If so, you will need to
review the [build secrets tutorial][secrets] to safely store your OAuth token.