lib/index.js
async function getConfig(context, fileName, defaultConfig, deepMergeOptions) {
  const filePath = path.posix.join(CONFIG_PATH, fileName);
  const params = context.repo({
    path: filePath,
  });

  const config = await loadYaml(context, params);
  let baseRepo;
  if (config == null) {
    baseRepo = DEFAULT_BASE;
  } else if (config != null && BASE_KEY in config) {
    baseRepo = config[BASE_KEY];
    delete config[BASE_KEY];
  }

  let baseConfig;
  if (baseRepo) {
    const baseParams = getBaseParams(params, baseRepo);
    baseConfig = await loadYaml(context, baseParams);
  }

  if (config == null && baseConfig == null && !defaultConfig) {
    return null;
  }

  return deepMergeConfigs(
    [defaultConfig, baseConfig, config],
    deepMergeOptions
  );
}
async function getConfig(context, fileName, defaultConfig, deepMergeOptions) {
  const filePath = path.posix.join(CONFIG_PATH, fileName);
  const params = context.repo({
    path: filePath,
  });

  const config = await loadYaml(context, params);
  let baseRepo;
  if (config == null) {
    baseRepo = DEFAULT_BASE;
  } else if (config != null && BASE_KEY in config) {
    baseRepo = config[BASE_KEY];
    delete config[BASE_KEY];
  }

  let baseConfig;
  if (baseRepo) {
    const baseParams = getBaseParams(params, baseRepo);
    baseConfig = await loadYaml(context, baseParams);
  }

  if (config == null && baseConfig == null && !defaultConfig) {
    return null;
  }

  return deepMergeConfigs(
    [defaultConfig, baseConfig, config],
    deepMergeOptions
  );
}
Loads the specified config file from the context's repository

If the config file contains a top-level key "_extends", it is merged
with a config of the same name in the repository specified by the
_extends key.  The repository of the base configuration can either be
given as "repository" or as "organization/repository".

If the config file does not exist in the context's repository, `null`
is returned. If the base repository does not exist or does not contain
the config file, it is ignored.

If a default config is given, it is merged with the config from the
repository, if it exists.

@param {Context} context A Probot context
@param {string} fileName Name of the config file
@param {object} defaultConfig A default config that is merged in
@param {object} deepMergeOptions from deepmerge
@returns {object} The merged configuration
@async