mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/toolkit: Check if git user.name config is set (#19821)
This commit is contained in:
parent
6e7c18fc1c
commit
2e18930285
@ -29,7 +29,10 @@ const RepositoriesPaths = {
|
||||
'datasource-plugin': 'https://github.com/grafana/simple-datasource.git',
|
||||
};
|
||||
|
||||
export const getGitUsername = async () => await simpleGit.raw(['config', '--global', 'user.name']);
|
||||
export const getGitUsername = async () => {
|
||||
const name = await simpleGit.raw(['config', '--global', 'user.name']);
|
||||
return name || '';
|
||||
};
|
||||
export const getPluginIdFromName = (name: string) => kebabCase(name);
|
||||
export const getPluginId = (pluginDetails: PluginDetails) =>
|
||||
`${kebabCase(pluginDetails.org)}-${getPluginIdFromName(pluginDetails.name)}`;
|
||||
|
Loading…
Reference in New Issue
Block a user