Pre-fill New File 'name' and 'content' with Query Params
👀 👨‍💻 I'd be willing to work on this if it's acceptable and someone could point me in the right direction. ### Release notes Support pre-filled New File name and contents, just like GitHub, Gitea, and (soon) Gist. Format: ```txt {{host}}/{{org}}/{{repo}}/-/new/{{branch}}/{{filepath}} ?filename={{filename}} &value={{contents}} ``` Example: ```txt https://git.example.com/happy/bliss/-/new/master/blog ?filename=articles/hello.md &value=Hello+World! ``` See also: - https://github.com/isaacs/github/issues/1527#issuecomment-617466083 - https://github.com/go-gitea/gitea/pull/16556/files ### Problem to solve Being able to **integrate with external tools**, such as [Bliss](https://github.com/coolaj86/bliss), that create New File templates with pre-filled content, shortening the time it takes to create **static site** content with SSGs. ### Proposal Either update the frontend JavaScript, or the server code to fill in the `File name` and `Content` fields with the values given from query params. ### Intended users Anybody that wants to make it easier to add content to a repo that auto-builds a site. * [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer) * [Devon (DevOps Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#devon-devops-engineer) * [Allison (Application Ops)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#allison-application-ops) * [Priyanka (Platform Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#priyanka-platform-engineer) ### User experience goal What is the single user experience workflow this problem addresses? The user should be able to use 3rd party template tools directly from the web, without going down to the CLI, or complex custom configurations - just supply the GitLab URL, and be done. ### Further details See the [Short Screen Capture Demo](https://youtu.be/5a-z-ZLeQj0) For example: 1. You create some content in an editor like this: <kbd><img src="https://i.imgur.com/fpLIgxT.png" /></kbd> 2. You click "Create on GitLab" 3. You get a new file, with all of the correct YAML pre-filled ### Permissions and Security No change. ### Documentation Not sure. Maybe API docs? ### Availability & Testing * End-to-end test change ### What does success look like, and how can we measure that? If I can add GitLab support for Bliss, then it worked.
issue