fix: prioritize GIT_CREDENTIALS for gtit credentials

Allow to defined a both `GIT_CREDENTIALS` for repository access and `GH_TOKEN` or `GL_TOKEN` for API access
This commit is contained in:
Pierre Vanduynslager 2018-01-27 20:09:53 -05:00
parent 8b3605dd04
commit 467635bc14

View File

@ -2,7 +2,7 @@ const {parse, format} = require('url');
const {isUndefined} = require('lodash'); const {isUndefined} = require('lodash');
const gitUrlParse = require('git-url-parse'); const gitUrlParse = require('git-url-parse');
const GIT_TOKENS = ['GH_TOKEN', 'GITHUB_TOKEN', 'GL_TOKEN', 'GITLAB_TOKEN', 'GIT_CREDENTIALS']; const GIT_TOKENS = ['GIT_CREDENTIALS', 'GH_TOKEN', 'GITHUB_TOKEN', 'GL_TOKEN', 'GITLAB_TOKEN'];
/** /**
* Generate the git repository URL with creadentials. * Generate the git repository URL with creadentials.