i'm using the nodegit library to get all commits from my repository, and i want to get general information from the local repository as for example:
- the url from the remote repository (Ex: https://github.com/nodegit/nodegit/)
Is it possible?
i'm using the nodegit library to get all commits from my repository, and i want to get general information from the local repository as for example:
Is it possible?
According to the new APIs from [email protected]
export const getRemoteUrl = async (path, remoteName) => {
try {
const repository = await nodegit.Repository.open(path);
const remote = await repository.getRemote(remoteName); // e.g. "origin"
return await remote.url();
} catch (error) {
console.log(error);
}
};
// To use the above function within another async function:
const remoteUrl = await getRemoteUrl();