[go: up one dir, main page]

Skip to content

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:

{{host}}/{{org}}/{{repo}}/-/new/{{branch}}/{{filepath}}
    ?filename={{filename}}
    &value={{contents}}

Example:

https://git.example.com/happy/bliss/-/new/master/blog
    ?filename=articles/hello.md
    &value=Hello+World!

See also:

Problem to solve

Being able to integrate with external tools, such as 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.

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

For example:

  1. You create some content in an editor like this:
  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.

Edited by AJ ONeal