howardroark / pollinate

Template your base files and generate new projects from Git(Hub).
The Unlicense
225 stars 16 forks source link

Modify fetchItem to allow overriding of fetch method #30

Closed ben657 closed 8 years ago

ben657 commented 8 years ago

Due to the way Team Foundation Server has its endpoints set up, the url doesn't look like a git url, but needs to be requested like one, this commit allows a way to tell pollinate to do that. I'm certain there will be other use cases.

Let me know what you think about this, I'll add a couple of lines to the docs too if it's useful.

Just for reference, the url looks like: http://myserv.com/tfs/project/collection/_git/template-project which doesn't really match any of the fetch methods, but should be done using git clone to take advantage of the credential manager.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.03%) to 94.359% when pulling 9ae7589fedee4e830d153e76d263156ecbe505e6 on ben657:develop into e8ccf79f63933407e6a52acf7391e8befd34ac9e on howardroark:develop.

howardroark commented 8 years ago

Oh Microsoft ;) I'm sure they are not the only ones though :P

I think this will only work if you only supply project data as CLI options. Setting this would override the "fetch type" for both the template and the project data source... so it wouldn't work if the second input was a file or URL.

Maybe it would be best to just assume that any URL (git or http) passed as the first input is a Git server. Also separate the logic a little more for the first and second. Does that make sense to you?

ben657 commented 8 years ago

Ah hadn't thought about the project data, haven't needed to use it for our use case :P

That sounds like a good idea though, will have a look at something like that when i've got some free time.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-9.6%) to 84.694% when pulling 2140b7a74de9caa238acd1f6597500d26b05250a on ben657:develop into e8ccf79f63933407e6a52acf7391e8befd34ac9e on howardroark:develop.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.5%) to 93.846% when pulling 9af400c34424c8f06d18cb6d64f08d8f9bf20ff4 on ben657:develop into e8ccf79f63933407e6a52acf7391e8befd34ac9e on howardroark:develop.

howardroark commented 8 years ago

Looks good! Thanks for this :)

howardroark commented 8 years ago

1.7.1 has been released :)

howardroark commented 8 years ago

Also, if you want to show up as a "contributor" you may have to add your other email to your GitHub account... I'm a bit lonely there ;)

ben657 commented 8 years ago

Awesome! Added the other e-mail to my account too :+1: