Feature: "Add New File" detects keyword "License" & "Readme" #11741

Open
opened 2025-11-02 09:46:22 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Aetherinox on GitHub (Sep 28, 2023).

Feature Description

Currently, Github has a feature which allows for a user to select "Add New File", just as Gitea also includes. However, with Github, it auto detects terms such as "License", and automatically provides a button that will appear which allows you to select which license you want to use. (Figure 1)

Github's version of this feature is obviously complicated and brings you to a whole different page which lists out all of the licenses, details about them, etc.

I don't think Gitea needs all of those extra steps, however, it would be awesome if Gitea would at least include a "Choose a License Template" and then have a simple dropdown box where the user can select which license to attach. Much like we currently have when creating a new repo. (Figure 2)

Selecting a license from the dropdown could auto-inject the text straight into the text box where the user can then modify the license a bit if they wish before committing.

Obviously if the developers have a better way of implementing the dropdown, by all means. This is just a rough example which utilizes existing features in Gitea such as the license dropdown, and the existing hidden tab "Preview" on the "Add New File" page.

Screenshots

Figure 1

eQokFgy

Figure 2

ewKowGk

r1pNBzH

Originally created by @Aetherinox on GitHub (Sep 28, 2023). ### Feature Description Currently, Github has a feature which allows for a user to select "Add New File", just as Gitea also includes. However, with Github, it auto detects terms such as "License", and automatically provides a button that will appear which allows you to select which license you want to use. `(Figure 1)` Github's version of this feature is obviously complicated and brings you to a whole different page which lists out all of the licenses, details about them, etc. I don't think Gitea needs all of those extra steps, however, it would be awesome if Gitea would at least include a "Choose a License Template" and then have a simple dropdown box where the user can select which license to attach. Much like we currently have when creating a new repo. `(Figure 2)` Selecting a license from the dropdown could auto-inject the text straight into the text box where the user can then modify the license a bit if they wish before committing. Obviously if the developers have a better way of implementing the dropdown, by all means. This is just a rough example which utilizes existing features in Gitea such as the license dropdown, and the existing hidden tab "Preview" on the "Add New File" page. ### Screenshots ### Figure 1 ![eQokFgy](https://github.com/go-gitea/gitea/assets/118329232/4bd09920-3e52-42de-8439-042f7d141d47) ### Figure 2 ![ewKowGk](https://github.com/go-gitea/gitea/assets/118329232/e71f02d0-47af-48d4-b5d6-5a7fc9131be4) ![r1pNBzH](https://github.com/go-gitea/gitea/assets/118329232/9fe68916-a5df-479a-a648-f5b38046717f)
GiteaMirror added the type/proposal label 2025-11-02 09:46:22 -06:00
Author
Owner

@balki commented on GitHub (Feb 6, 2025):

I prefer just having a 'Add license' button/link in the description where license is is shown.

Image

With 'push to create' enabled, I don't use the UI to create a new repo . It would be nice to a have a way to add it later easily.

@balki commented on GitHub (Feb 6, 2025): I prefer just having a 'Add license' button/link in the description where license is is shown. ![Image](https://github.com/user-attachments/assets/8805f2a3-70af-4a9f-9e8b-6f977856ad26) With 'push to create' enabled, I don't use the UI to create a new repo . It would be nice to a have a way to add it later easily.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11741