Skip to content

Conversation

pixel-shock
Copy link

Hi,

this is a new PR for this one: #6127
It's now possible to create project-template and create projects from these templates.

Hope you like it ...

001
002
003
004
005
006
007
008
009
010
011
012

@@ -0,0 +1,55 @@
class Admin::ProjectTemplatesController < Admin::ApplicationController

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use nested module/class definitions instead of compact style.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment can be ignored

@@ -100,6 +100,8 @@ def verify_constant(modul, current, default)
Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)
Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root)
Settings.gitlab['templates_path'] = File.join(File.absolute_path(Settings.gitlab['templates_path'] || Settings.gitlab['user_home'] + '/gitlab-templates'),'/')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [158/80]
Space missing after comma.

@dosire
Copy link
Member

dosire commented Jun 4, 2014

@pixel-shock Thanks for your contribution but the same comment as in 6127 applies:
#6127 (comment)
I propose to start from simple init with README. Without templates

Also see the contribution guidelines:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md
Please keep the change in a single MR as small as possible. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? The smaller a MR is the more likely it is it will be merged, after that you can send more MR's to enhance it.

We can always enhance it later but each MR has to be as small as possible. Please stick to the AMR conditions in http://feedback.gitlab.com/forums/176466-general/suggestions/3797854-create-empty-repo-on-project-creation for the first MR

@pixel-shock
Copy link
Author

@dosire

Hi,

so the small "version" of this MR is this I think:

1.) simple checkbox at project creation ("init" [yes/no])
2.) create a README after init the repo, commit and push it

Is this correct?

EDIT: Sorry for the large MR, but I thought I should do it as "feature complete" as possible to avoid much work for you 😄

@dosire
Copy link
Member

dosire commented Jun 4, 2014

@pixel-shock Yes, I check with @randx and that would be an awesome minimal size for the first MR.

@dosire
Copy link
Member

dosire commented Jun 4, 2014

@pixel-shock And no problem about trying to make it feature complete, it is maybe counter intuitive but smaller steps make everything go faster.

default_value_for :template_name_length, 100
default_value_for :template_description_length, 750

attr_accessor :template_name_length, :template_description_length
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@randx Since we currently use Rails4, maybe we should start using the strong params in new classes?

@jvanbaarsen
Copy link
Contributor

@pixel-shock I jumped true the code, and put some comments everywhere, but didn't realise that @dosire had already responded 💃

So if you're going to create a new MR, please ignore my comments :-)

@pixel-shock
Copy link
Author

@jvanbaarsen thx for your quick email-reply 😉
I'll try to fix this stuff asap (hopefully tomorrow) and if this stuff is fixed, I'll do another branch for the minimal initialization ...

THX for your comments and advices ...

@abargutu
Copy link

it works for gitlab 7?

@pixel-shock
Copy link
Author

Hi,

sorry, didn’t tested it yet … I’ve spend a lot of time at work at the moment, so I can’t test it in GL7 :(

Cheers
Tino

Am 25.06.2014 um 10:55 schrieb abargutu notifications@github.com:

it works for gitlab 7?


Reply to this email directly or view it on GitHub.

@abargutu
Copy link

could you sendme the link where i can see the definitly changes because it is a little confuse
please
thanks in advance

@pixel-shock
Copy link
Author

do you mean my changes in the LG code?

#7069

scroll down and you can see all my changes.

Am 25.06.2014 um 11:03 schrieb abargutu notifications@github.com:

could you sendme the link where i can see the definitly changes because it is a little confuse
please
thanks in advance


Reply to this email directly or view it on GitHub.

@abargutu
Copy link

yes
i'm looking this one https://github.com/gitlabhq/gitlabhq/pull/7069/files is that correct?
i think the last updates are here https://github.com/gitlabhq/gitlabhq/pull/7069/files

thanks a lot!!!!
i'm going to check it in gitlab 7

@abargutu
Copy link

oooooooooooooooooooooHHHHH
i create a readme.txt and zip it and upload to poject template and it is ready to use
but when i create a repo and selectting projetc template and push create repo still apears the 'how to create repo manually' :((((

@jvanbaarsen
Copy link
Contributor

@pixel-shock Is this PR ready for review?

@pixel-shock
Copy link
Author

@jvanbaarsen Hi, in principle it is ready for review (functionality) but I have to fix some code-style issues first and I have to merge it into the 7.1 branch I think.
At the moment I have a lot to do - so my spare-time is very overloaded :-(

@jvanbaarsen
Copy link
Contributor

Ok! Thanks for your reply!
-- 
Jeroen van Baarsen

On 4 augustus 2014 at 11:38:49, Tino W. (notifications@github.com) wrote:

@jvanbaarsen Hi, in principle it is ready for review (functionality) but I have to fix some code-style issues first and I have to merge it into the 7.1 branch I think.
At the moment I have a lot to do - so my spare-time is very overloaded :-(


Reply to this email directly or view it on GitHub.

@ksavoie
Copy link

ksavoie commented Aug 26, 2014

Hi everyone, excuse my ignorance on how project updates work, but has this feature (create empty repo on project creation) been committed to the latest version of GitLab as I could really benifit? I'm running 7.2 of GitLab CE and do not see how to opt to create a empty repo on new project within the Web UI.
Thanks for any assistance.

@bbodenmiller
Copy link
Contributor

@pixel-shock really hope you can get a very basic init repo functionality added soon. Need this for #7759.

@dblessing
Copy link
Member

@pixel-shock If you don't have time to pursue this at the moment, do you mind if we close it? You can always resurrect when you have time.

@vicendominguez
Copy link

Oh man! is there other way then? (to create the git project with a readme or a project-template)

@dblessing
Copy link
Member

This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request.

@dblessing dblessing closed this Nov 11, 2014
@pixel-shock pixel-shock deleted the repo_init branch April 7, 2015 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

9 participants