dist/index.js
/**
 * @param cwdSetting - Current working directory setting
 * @returns List of dependencies to ignore from dependabot config
 */
@param cwdSetting - Current working directory setting
@returns List of dependencies to ignore from dependabot config
@param cwdSetting - Current working directory setting @returns List of dependencies to ignore from dependabot config
async function loadIgnoreFromDependabotConfig(cwdSetting) {
    const dependabotConfig = loadDependabotConfig();
    core.debug('Searching dependabot config for ignore settings which match current working directory');
    const settingsForPath = dependabotConfig?.updates?.find((updateSetting) => {
        if (updateSetting?.['package-ecosystem'] === 'npm') {
            const directorySetting = updateSetting?.directory || '';
            const cleanDirectorySetting = directorySetting.replace(/^\/|\/$/g, '');
            return cwdSetting
                ? cleanDirectorySetting === cwdSetting?.replace(/^\/|\/$/g, '')
                : updateSetting?.directory === '/';
        }
        return false;
    });
    if (!settingsForPath?.ignore) {
        return [];
    }
    return settingsForPath.ignore.map((ignoreSetting) => ignoreSetting['dependency-name']);
}
async function loadIgnoreFromDependabotConfig ( cwdSetting ) { const dependabotConfig = loadDependabotConfig ( ) ; core . debug ( 'Searching dependabot config for ignore settings which match current working directory' ) ; const settingsForPath = dependabotConfig ?. updates ?. find ( ( updateSetting ) => { if ( updateSetting ?. [ 'package-ecosystem' ] === 'npm' ) { const directorySetting = updateSetting ?. directory || '' ; const cleanDirectorySetting = directorySetting . replace ( / ^\/|\/$ / g , '' ) ; return cwdSetting ? cleanDirectorySetting === cwdSetting ?. replace ( / ^\/|\/$ / g , '' ) : updateSetting ?. directory === '/' ; } return false ; } ) ; if ( ! settingsForPath ?. ignore ) { return [ ] ; } return settingsForPath . ignore . map ( ( ignoreSetting ) => ignoreSetting [ 'dependency-name' ] ) ; }
@param cwdSetting - Current working directory setting
 @returns List of dependencies to ignore from dependabot config
@param cwdSetting - Current working directory setting @returns List of dependencies to ignore from dependabot config
// Look for settings which match the current path //  Trim leading and trailing slashes from directory setting and cwdSetting