Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforming git url to http url while downloading commits from Jenki… #7650

Merged
merged 3 commits into from
Jul 7, 2018

Conversation

kasubram
Copy link

@kasubram kasubram commented Jul 7, 2018

…ns job.

@kasubram kasubram requested a review from GitHubSriramB July 7, 2018 07:00
if (!!commitUrl) {
if (commitUrl.startsWith('git@')) {
tl.debug('repo url is a git protocol url');

Copy link
Contributor

Choose a reason for hiding this comment

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

remove blank line


return JSON.stringify(commitMessages);

} catch(error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

space after catch



if (commitUrl.startsWith('[email protected]')) {
result= commitUrl.replace('[email protected]:', 'https://gitlab.com/').replace('.git/', '/');
Copy link
Contributor

Choose a reason for hiding this comment

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

you mentioned user name related handling for GitLab. is this required?

Copy link
Author

Choose a reason for hiding this comment

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

sorry, yes this is sufficient. This is how the url looks like [email protected]:username/project.git we should translate this to https://gitlab.com/username/project/commit/{commitId} same with github. GitHub url looks like [email protected]:kasubram/TestRepo.git we should translate this to kasubram/TestRepo@{commitId}

@kasubram kasubram merged commit 378d51d into master Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants