MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / github_workflow_unimportant

Function github_workflow_unimportant

scripts/test.py:795–808  ·  view source on GitHub ↗

Returns true if we are running a Github scheduled workflow but in a repository not called 'PyMuPDF'. This can be used to avoid consuming unnecessary Github minutes running workflows on non-main repositories such as ArtifexSoftware/PyMuPDF-julian.

()

Source from the content-addressed store, hash-verified

793
794
795def github_workflow_unimportant():
796 '''
797 Returns true if we are running a Github scheduled workflow but in a
798 repository not called 'PyMuPDF'. This can be used to avoid consuming
799 unnecessary Github minutes running workflows on non-main repositories such
800 as ArtifexSoftware/PyMuPDF-julian.
801 '''
802 GITHUB_EVENT_NAME = os.environ.get('GITHUB_EVENT_NAME')
803 GITHUB_REPOSITORY = os.environ.get('GITHUB_REPOSITORY')
804 if GITHUB_EVENT_NAME == 'schedule' and GITHUB_REPOSITORY != 'pymupdf/PyMuPDF':
805 log(f'## This is an unimportant Github workflow: a scheduled event, not in the main repository `pymupdf/PyMuPDF`.')
806 log(f'## {GITHUB_EVENT_NAME=}.')
807 log(f'## {GITHUB_REPOSITORY=}.')
808 return True
809
810def venv_info(pytest_args=None):
811 '''

Callers 1

mainFunction · 0.85

Calls 2

logFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…