def test_get_version_from_scm_tag_in_git_repo( monkeypatch, tmp_git_repo, # pylint: disable=unused-argument git_cmd, git_commit_cmd, git_tag_cmd, ): """Check that get_version_from_scm_tag works properly in Git repo.""" assert get_self_version() == '0.1.dev0' git_commit_cmd('-m', 'Test commit') git_tag_cmd('v1.3.9') assert get_version_from_scm_tag() == '1.3.9' git_commit_cmd('-m', 'Test commit 2') head_sha1_hash = git_cmd('rev-parse', '--short', 'HEAD').strip() assert get_version_from_scm_tag() == f'1.3.10.dev1+g{head_sha1_hash}' with monkeypatch.context() as mp_ctx: mp_ctx.setenv('PYPI_UPLOAD', 'true') assert get_version_from_scm_tag() == f'1.3.10.dev1+g{head_sha1_hash}'
"Processing ping for App ID %s " "with Hook ID %s " "sharing Zen: %s", app_id, hook_id, zen) _LOGGER.info("GitHub App from context in ping handler: %s", RUNTIME_CONTEXT.github_app) @process_event("integration_installation", action="created") @process_webhook_payload async def on_install( action, # pylint: disable=unused-argument installation, sender, # pylint: disable=unused-argument repositories=None, # pylint: disable=unused-argument ): """React to GitHub App integration installation webhook event.""" _LOGGER.info("installed event install id %s", installation["id"]) _LOGGER.info("installation=%s", RUNTIME_CONTEXT.app_installation) if __name__ == "__main__": _LOGGER.setLevel(logging.DEBUG) _LOGGER.debug("Debug mode turned on") run_app( # pylint: disable=expression-not-assigned name="Qeb-Hwt", version=get_version_from_scm_tag(root="./", relative_to=__file__), url="https://github.com/apps/qeb-hwt", )
def test_get_version_from_scm_tag_outside_git_repo( temporary_working_directory, # pylint: disable=unused-argument ): """Check that version is unknown outside of Git repo.""" assert get_version_from_scm_tag() == 'unknown'
def test_get_version_from_scm_tag_outside_git_repo( temporary_working_directory, ): """Check that version is unknown outside of Git repo.""" assert get_version_from_scm_tag() == 'unknown'