38 const std::filesystem::path &linuxRepo,
39 const std::string &origin,
41 loadSUSE(SUSE, translateEmail);
43 if (!linuxRepo.empty())
44 loadUpstream(linuxRepo, origin, translateEmail);
53 return findBestMatchInMaintainers(m_maintainers, paths);
61 return findBestMatchInMaintainers(m_upstream_maintainers, paths);
78 const std::set<std::string> &
suse_users()
const {
return m_suse_users; }
80 void readSUSEStanza(std::ifstream &file,
Stanza &st,
82 void loadSUSE(
const std::filesystem::path &filename,
87 void loadUpstream(
const std::filesystem::path &lsource,
const std::string &origin,
91 const std::set<std::filesystem::path> &paths);
95 std::set<std::string> m_suse_users;
Stanza (a subsystem) from MAINTAINERS file.
Definition: Stanza.h:24
std::function< std::string(std::string_view sv)> TranslateEmail
Callback to translate an e-mail.
Definition: Stanza.h:27
const std::set< std::string > & suse_users() const
Get all met SUSE users.
Definition: Maintainers.h:78
Loads and holds information from both Linux and SUSE MAINTAINERS files.
Definition: Maintainers.h:23
Maintainers(const std::filesystem::path &SUSE, const std::filesystem::path &linuxRepo, const std::string &origin, const Stanza::TranslateEmail &translateEmail)
Load maintainers info.
Definition: Maintainers.h:37
const MaintainersType & maintainers() const
Get all parsed SUSE maintainers.
Definition: Maintainers.h:68
Parses a string view into lines.
Definition: String.h:26
Definition: Branches.h:15
const MaintainersType & upstream_maintainers() const
Get all parsed Linux maintainers.
Definition: Maintainers.h:73
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:60
std::vector< Stanza > MaintainersType
Maintainers are a list of stanzas.
Definition: Maintainers.h:26
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:52