diff options
author | AJ ONeal <coolaj86@gmail.com> | 2021-07-28 21:39:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 05:39:46 +0200 |
commit | b9a0e33238da353ff39258af3f0befbb83da981e (patch) | |
tree | f2cd690133d498b966bdaf33678c786071c231a7 /docs | |
parent | 4e68d6f41d21e7c5465be6bdb6713c36eb586dfd (diff) | |
download | gitea-b9a0e33238da353ff39258af3f0befbb83da981e.tar.gz gitea-b9a0e33238da353ff39258af3f0befbb83da981e.zip |
Pre-fill suggested New File 'name' and 'content' with Query Params (#16556)
* feature: add (GitHub-style) querystrings for pre-filling new file content
* docs: add query parameters for new files
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/developers/integrations.en-us.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/content/doc/developers/integrations.en-us.md b/docs/content/doc/developers/integrations.en-us.md index 8a111a3a8d..15d5e7e59e 100644 --- a/docs/content/doc/developers/integrations.en-us.md +++ b/docs/content/doc/developers/integrations.en-us.md @@ -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! +``` |