Skip to content

Commit 78bc307

Browse files
author
AJ ONeal
committed
docs: add query parameters for new files
1 parent 735b7dd commit 78bc307

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/content/doc/developers/integrations.en-us.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,22 @@ If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#user-conten
2424
an [SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk),
2525
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#user-content-themes),
2626
you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository!
27+
28+
## Pre-Fill New File name and contents
29+
30+
If you'd like to open a new file with a given name and contents,
31+
you can do so with query parameters:
32+
33+
```txt
34+
GET /{{org}}/{{repo}}/_new/{{filepath}}
35+
?filename={{filename}}
36+
&value={{content}}
37+
```
38+
39+
For example:
40+
41+
```txt
42+
GET https://git.example.com/johndoe/bliss/_new/articles/
43+
?filename=hello-world.md
44+
&value=Hello%2C%20World!
45+
```

0 commit comments

Comments
 (0)