SlHelpers
SlKernCVS::Maintainers Class Reference

Loads and holds information from both Linux and SUSE MAINTAINERS files. More...

#include <Maintainers.h>

Public Types

using MaintainersType = std::vector< Stanza >
 Maintainers are a list of stanzas.
 

Public Member Functions

const StanzafindBestMatch (const std::set< std::filesystem::path > &paths) const
 Find the best matched maintainer from the SUSE's MAINTAINERS file. More...
 
const StanzafindBestMatchUpstream (const std::set< std::filesystem::path > &paths) const
 Find the best matched maintainer from the Linux's MAINTAINERS file. More...
 
const MaintainersTypemaintainers () const
 Get all parsed SUSE maintainers. More...
 
const MaintainersTypeupstream_maintainers () const
 Get all parsed Linux maintainers. More...
 
const std::set< std::string > & suse_users () const
 Get all met SUSE users. More...
 

Static Public Member Functions

static std::optional< Maintainersload (const std::filesystem::path &SUSE, const std::filesystem::path &linuxRepo, const std::string &origin, const Stanza::TranslateEmail &translateEmail)
 Load maintainers info. More...
 

Detailed Description

Loads and holds information from both Linux and SUSE MAINTAINERS files.

It can be searched via findBestMatch() and findBestMatchUpstream() functions.

Member Function Documentation

◆ findBestMatch()

const Stanza* SlKernCVS::Maintainers::findBestMatch ( const std::set< std::filesystem::path > &  paths) const
inline

Find the best matched maintainer from the SUSE's MAINTAINERS file.

Parameters
pathsSet of paths for which a maintainers is looked for
Returns
Stanza if found or nullptr.

◆ findBestMatchUpstream()

const Stanza* SlKernCVS::Maintainers::findBestMatchUpstream ( const std::set< std::filesystem::path > &  paths) const
inline

Find the best matched maintainer from the Linux's MAINTAINERS file.

Parameters
pathsSet of paths for which a maintainers is looked for
Returns
Stanza if found or nullptr.

◆ load()

static std::optional<Maintainers> SlKernCVS::Maintainers::load ( const std::filesystem::path &  SUSE,
const std::filesystem::path &  linuxRepo,
const std::string &  origin,
const Stanza::TranslateEmail translateEmail 
)
inlinestatic

Load maintainers info.

Parameters
SUSEpath to SUSE's MAINTAINERS file
linuxRepopath to upstream linux repository (LINUX_GIT)
originname of branch (of LINUX_GIT) to load upstream MAINTAINERS from
translateEmaila function translating emails (eg. to map login -> bugzilla)
Returns
Maintainers if load was successful, otherwise std::nullopt

SUSE is usually fetched from kerncvs.

◆ maintainers()

const MaintainersType& SlKernCVS::Maintainers::maintainers ( ) const
inline

Get all parsed SUSE maintainers.

Returns
SUSE maintainers.

◆ suse_users()

const std::set<std::string>& SlKernCVS::Maintainers::suse_users ( ) const
inline

Get all met SUSE users.

Returns
SUSE users met in both MAINTAINERS files.

◆ upstream_maintainers()

const MaintainersType& SlKernCVS::Maintainers::upstream_maintainers ( ) const
inline

Get all parsed Linux maintainers.

Returns
Linux maintainers.

The documentation for this class was generated from the following file: