Projects onedev server Issues #1230
#1230  Support for initializing projects with LICENSE files
dopel opened 1 month 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 month ago
Previous Value Current Value
Support for initializing projects with LICENSE & readme files
Support for initializing projects with LICENSE files
Robin Shen commented 1 month ago

Thanks for your feedback and the great implementation suggestion.

polarian commented 1 month 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 month 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

polarian commented 1 month ago

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

issue 1 of 1
New Feature
Issue Votes (0)
Watchers (5)
issue onedev/server#1230
Please wait...
Page is in error, reload to recover