Skip to content

Commit

Permalink
docs: add query parameters for new files
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Jul 28, 2021
1 parent 735b7dd commit 78bc307
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/content/doc/developers/integrations.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,22 @@ If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#user-conten
an [SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk),
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#user-content-themes),
you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository!

## Pre-Fill New File name and contents

If you'd like to open a new file with a given name and contents,
you can do so with query parameters:

```txt
GET /{{org}}/{{repo}}/_new/{{filepath}}
?filename={{filename}}
&value={{content}}
```

For example:

```txt
GET https://git.example.com/johndoe/bliss/_new/articles/
?filename=hello-world.md
&value=Hello%2C%20World!
```

0 comments on commit 78bc307

Please sign in to comment.