FOSSology  4.4.0
Open Source License Compliance by Open Source Software
FoScanner.RepoSetup.RepoSetup Class Reference
Collaboration diagram for FoScanner.RepoSetup.RepoSetup:
Collaboration graph

Public Member Functions

def __init__ (self, CliOptions cli_options, ApiConfig api_config)
 
def __del__ (self)
 
str get_diff_dir (self)
 

Private Member Functions

bool __is_excluded_path (self, str path)
 

Detailed Description

Setup temp_dir using the diff or current MR

:ivar temp_dir: Temporary directory location for storing MR changes.
:ivar allowlist: Allow list from JSON
:ivar api_config: ApiConfig

Definition at line 21 of file RepoSetup.py.

Constructor & Destructor Documentation

◆ __init__()

def FoScanner.RepoSetup.RepoSetup.__init__ (   self,
CliOptions  cli_options,
ApiConfig  api_config 
)
Create a temp dir

:param cli_options: CliOptions object to get allow list from
:param api_config: API configuration for the CI

Definition at line 30 of file RepoSetup.py.

◆ __del__()

def FoScanner.RepoSetup.RepoSetup.__del__ (   self)
Clean the created temp dir

Definition at line 42 of file RepoSetup.py.

Member Function Documentation

◆ __is_excluded_path()

bool FoScanner.RepoSetup.RepoSetup.__is_excluded_path (   self,
str  path 
)
private
Check if the path is allow listed

The function used fnmatch to check if the path is in allow list or not.

:param path: path to check
:return: True if the path is in allow list, False otherwise

Definition at line 48 of file RepoSetup.py.

◆ get_diff_dir()

str FoScanner.RepoSetup.RepoSetup.get_diff_dir (   self)
Populate temp dir using the gitlab API `merge_requests`

:return: temp dir path

Definition at line 64 of file RepoSetup.py.


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