35 static std::optional<Maintainers>
load(
const std::filesystem::path &SUSE,
36 const std::filesystem::path &linuxRepo,
37 const std::string &origin,
41 if (!m.loadSUSE(SUSE, translateEmail))
43 if (!linuxRepo.empty() && !m.loadUpstream(linuxRepo, origin, translateEmail))
55 return findBestMatchInMaintainers(m_maintainers, paths);
63 return findBestMatchInMaintainers(m_upstream_maintainers, paths);
80 const std::set<std::string> &
suse_users()
const {
return m_suse_users; }
84 bool loadSUSE(
const std::filesystem::path &filename,
86 bool loadUpstream(
const std::filesystem::path &lsource,
const std::string &origin,
89 static const Stanza *findBestMatchInMaintainers(
const MaintainersType &sl,
90 const std::set<std::filesystem::path> &paths);
94 std::set<std::string> m_suse_users;
Loads and holds information from both Linux and SUSE MAINTAINERS files.
Definition Maintainers.h:20
const MaintainersType & upstream_maintainers() const
Get all parsed Linux maintainers.
Definition Maintainers.h:75
const Stanza * findBestMatch(const std::set< std::filesystem::path > &paths) const
Find the best matched maintainer from the SUSE's MAINTAINERS file.
Definition Maintainers.h:54
const std::set< std::string > & suse_users() const
Get all met SUSE users.
Definition Maintainers.h:80
const MaintainersType & maintainers() const
Get all parsed SUSE maintainers.
Definition Maintainers.h:70
const Stanza * findBestMatchUpstream(const std::set< std::filesystem::path > &paths) const
Find the best matched maintainer from the Linux's MAINTAINERS file.
Definition Maintainers.h:62
static std::optional< Maintainers > load(const std::filesystem::path &SUSE, const std::filesystem::path &linuxRepo, const std::string &origin, const Stanza::TranslateEmail &translateEmail)
Load maintainers info.
Definition Maintainers.h:35
std::vector< Stanza > MaintainersType
Maintainers are a list of stanzas.
Definition Maintainers.h:23