Coverage for CIResults/context_processors.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2024-12-19 09:20 +0000

1import os 

2 

3 

4class CIBugLog: 

5 def __init__(self, request): 

6 self.request = request 

7 

8 @property 

9 def version(self): 

10 return os.getenv('CIBUGLOG_VERSION', None) 

11 

12 @property 

13 def project_url(self): 

14 return "https://gitlab.freedesktop.org/gfx-ci/cibuglog" 

15 

16 @property 

17 def version_url(self): 

18 return "{}/commit/{}".format(self.project_url, self.version) 

19 

20 @property 

21 def admin_email(self): 

22 return os.getenv('ADMIN_EMAIL', None) 

23 

24 

25def global_context(request): 

26 return { 

27 "cibuglog": CIBugLog(request), 

28 }