Support for initializing projects with LICENSE files (OD-1230)
dopel opened 1 year ago

Currently, when a new project is created, it gets initialized with an empty code base with suggestions as below:


However, along with the suggested actions (adding files, setting up build spec, or pushing an existing repository), another suggestion can be added to add a LICENSE file with the appropriate license which could be selected from a dropdown menu:


Another alternative approach to the above can be similar to how build configuration files are detected when creating a file with name .onedev-buildspec.yml. In case of licenses, whenever a file with name which matches the regex pattern


is being created, the bottom section of the interface would be populated with the available licenses: image_4.png

Upon selecting the associated license option from the dropdown menu, a new license file would be created with the contents containing the associated license terms.

The following can be referred to for implementing the above:

PS: Something similar can be done for .gitignore file templates as well (but that might be out of scope of this issue).

dopel changed title 1 year ago
Previous Value Current Value
Support for initializing projects with LICENSE & readme files
Support for initializing projects with LICENSE files
Robin Shen commented 1 year ago

Thanks for your feedback and the great implementation suggestion.

Unknown commented 1 year ago

It would also be good if this is added to the create new repository page as well, it will create and initialise the repository with the license chosen in the drop down. If not the suggestion above could be used.

Both would compliment each other well :)

dopel commented 1 year ago

@polarian that's a good approach as well. Maybe while creating the project if Code Management is enabled, we could have the following options: Create Project.png ...similar to the work flow from GitHub: GitHub.png

Unknown commented 1 year ago

Yeah that was the general idea... I guess lets wait and see what Robin comes up with?

Robin Shen changed state to 'Closed' 5 months ago
Previous Value Current Value
dopel changed state to 'Open' 4 months ago
Previous Value Current Value
dopel commented 4 months ago

Hi @robin I have updated my OneDev server instance to the latest version(9.5.0). However, it seems like the above requested feature isn't visible. I also looked into the docs but couldn't find any mentions of the same. Is this a bug? Or has the feature request been dismissed/abandoned? Reopening the ticket for the time being.

Robin Shen commented 4 months ago

I am closing this as this feature is not very useful. User can simply add desired LICENSE file from add files menu.

issue 1 of 1
New Feature
Issue Votes (0)
Watchers (4)
Please wait...
Page is in error, reload to recover