# Path: badwolf/utils.py
# def to_text(value, encoding='utf-8', errors='ignore'):
#     """Convert value to unicode, default encoding is utf-8
# 
#     :param value: Value to be converted
#     :param encoding: Desired encoding
#     """
#     if not value:
#         return ''
#     if isinstance(value, str):
#         return value
#     if isinstance(value, bytes):
#         return value.decode(encoding, errors)
#     return str(value)


import os
import uuid
from flask import current_app
from badwolf.utils import to_text
# -*- coding: utf-8 -*-




class Context(object):
    """Badwolf build/lint context"""
    def __init__(self, repository, actor, type, message, source, target=None,
                 rebuild=False, pr_id=None, nocache=False, clone_depth=50,
                 skip_lint=False):

# Path: badwolf/utils.py
# def to_text(value, encoding='utf-8', errors='ignore'):
#     """Convert value to unicode, default encoding is utf-8
# 
#     :param value: Value to be converted
#     :param encoding: Desired encoding
#     """
#     if not value:
#         return ''
#     if isinstance(value, str):
#         return value
#     if isinstance(value, bytes):
#         return value.decode(encoding, errors)
#     return str(value)


# Path: badwolf/context.py
import os
import uuid
from flask import current_app
from badwolf.utils import to_text

# -*- coding: utf-8 -*-




class Context(object):
    """Badwolf build/lint context"""
    def __init__(self, repository, actor, type, message, source, target=None,
                 rebuild=False, pr_id=None, nocache=False, clone_depth=50,
                 skip_lint=False):

        self.task_id = to_text(uuid.uuid4())