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

Add remote urls to git-repo-info package #32

Closed
Green-Ranger11 opened this issue Nov 29, 2021 · 1 comment · Fixed by #31
Closed

Add remote urls to git-repo-info package #32

Green-Ranger11 opened this issue Nov 29, 2021 · 1 comment · Fixed by #31
Labels
enhancement New feature or request

Comments

@Green-Ranger11
Copy link
Collaborator

Green-Ranger11 commented Nov 29, 2021

This is from this comment. Currently, we have are using git-repo-info to infer the current sha in can-merge. We are using this package as it doesn't depend on whether git is installed so users who have not installed git can use can-merge however it does not have an implementation for getting remote urls which we are parsing to get the repository names.

This still means that in getRepo() we are still using git to get repository as shown below:

	const getRepos = String(execSync(`git ls-remote --get-url ${remote}`));
	const pushRepoRegex = /(?<=github\.com(?:\/|:))(?:.*)(?=\.git*)/gm;
	return getRepos.match(pushRepoRegex)[0];

We can add a PR to git-repo-info to implement getting the different remote urls.

@Green-Ranger11 Green-Ranger11 added the enhancement New feature or request label Nov 29, 2021
@Green-Ranger11 Green-Ranger11 linked a pull request Nov 29, 2021 that will close this issue
@ljharb
Copy link
Owner

ljharb commented Nov 30, 2021

Linking to rwjblue/git-repo-info#63

@ljharb ljharb closed this as completed in #31 Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants