Github support #394

Merged
merged 56 commits into from Oct 24, 2012

Conversation

Projects
None yet
2 participants

No description provided.

Andre Rodrigues added some commits Oct 18, 2012

lib/cli/linkedrevisioncontrol_.js
+
+LinkedRevisionControlClient.getRepository = function (repositories, remoteUri) {
+ var parsedRepositoryUri = url.parse(remoteUri);
+ var pathParts = parsedRepositoryUri.pathname.split('/');
@andrerod

andrerod Oct 23, 2012

Check initial slash. Consider comparing full name.

+exports.GitClient = GitClient;
+
+function LinkedRevisionControlClient(cli) {
+ this.cli = cli;
lib/cli/linkedrevisioncontrol_.js
+
+ if (!context.remoteUri) {
+ // Look for git repository in local git remotes
+ context.remoteUri = this._getRemoteUri(_);
@andrerod

andrerod Oct 23, 2012

Ask glenn about azure / origin.

lib/cli/linkedrevisioncontrol_.js
+ context.repository = LinkedRevisionControlClient.getRepository(repositories, context.remoteUri);
+ }
+
+ if ((context.flags && context.flags.forceRepositorySelection) || !context.repository) {
@andrerod

andrerod Oct 23, 2012

Force selection should be moved upwards.

lib/cli/linkedrevisioncontrol_.js
+ var parsedRepositoryUri = url.parse(context.repositoryUri);
+ parsedRepositoryUri.auth = context.repositoryAuth;
+ parsedRepositoryUri.pathname = '/deploy';
+ var hookUrl = url.format(parsedRepositoryUri).replace('https://%24', 'https://$');
@andrerod

andrerod Oct 23, 2012

Add code comment to explain this.

@andrerod

andrerod Oct 23, 2012

Move format part inside the createOrUpdate and pass the object.

lib/cli/linkedrevisioncontrol_.js
+ var progress = this.cli.progress('Retrieving repositories');
+ var userRepos = [];
+
+ function sortFunction (repositoryA, repositoryB) {
+
+ hookExists.should.be.ok;
+
+ // Delete created site
@andrerod

andrerod Oct 23, 2012

Consider moving to tear down.

test/cli/commands/cli.site-tests.js
+ test('site create', function(done) {
+ var siteName = 'cliuttestsite1';
+
+ // Setup
test/cli/commands/cli.site-tests.js
+
+ // List sites
+ cmd = 'node cli.js site list --json'.split(' ');
+ cmd.push('--github');
@andrerod

andrerod Oct 23, 2012

Needs to be moved up.

+ var originUrl = {
+ stdout: 'origin\tgit://github.com/andrerod/mynewsite999.git (fetch)\n' +
+ 'origin\tgit://github.com/andrerod/mynewsite999.git (push)\n',
+ stderr: ''
@andrerod

andrerod Oct 23, 2012

Add one more UT for both origin and azure and see that it picks the azure one.

+ context.lvcClient.init(context, _);
+
+ // Scaffold
+ copyIisNodeWhenServerJsPresent(_);
@christav

christav Oct 23, 2012

Contributor

Wasn't this going to be moved upwards out of this if block?

@andrerod

andrerod Oct 24, 2012

If we do decide to move, it'll be the iisnode scaffolding. But we still havent settled. So for now its going to proceed with the same behavior as powershell. Follow up / stabilization / finalization issues will follow.

Contributor

christav commented Oct 23, 2012

One question, otherwise LGTM

andrerod pushed a commit that referenced this pull request Oct 24, 2012

@andrerod andrerod merged commit 80254cc into Azure:dev Oct 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment