Skip to content

Commit

Permalink
added GIT_URL variable
Browse files Browse the repository at this point in the history
* Added GIT_URL variable
* Updated the repository fetch url to use the new GIT_URL variable
  • Loading branch information
tdonaworth authored Jul 20, 2021
1 parent decdb07 commit b79267b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const toolkit = require( 'actions-js-toolkit' );

const repositoryDetails = ( input_repo ) => {
let GIT_TOKEN = require( './variables' ).GITHUB_TOKEN;
let GIT_URL = require( './variables' ).GIT_URL;
let WORKSPACE = require( './variables' ).WORKSPACE;
input_repo = input_repo.split( '@' );

Expand All @@ -14,7 +15,7 @@ const repositoryDetails = ( input_repo ) => {
return {
owner: input_repo[ 0 ],
repository: input_repo[ 1 ],
git_url: `https://x-access-token:${GIT_TOKEN}@github.com/${input_repo[ 0 ]}/${input_repo[ 1 ]}.git`,
git_url: `https://x-access-token:${GIT_TOKEN}@${GIT_URL}/${input_repo[ 0 ]}/${input_repo[ 1 ]}.git`,
branch,
local_path: `${WORKSPACE}${input_repo[ 0 ]}/${input_repo[ 1 ]}/${branch}/`
};
Expand Down Expand Up @@ -171,4 +172,4 @@ module.exports = {
repositoryClone: repositoryClone,
source_file_location: source_file_location,
extract_workflow_file_info: extract_workflow_file_info,
};
};

0 comments on commit b79267b

Please sign in to comment.