def METHOD_NAME(func):
    """decorator to track command in GH issue / gists"""
    def wrapper(*args, **kwargs):
        ret = func(*args, **kwargs)
        ctx = click.get_current_context()
        if not isinstance(ret, Enum):
            raise EmmetCliError(f"Tracking `{ctx.command_path}` requires Enum!")
        if ctx.grand_parent.params["run"]:
            logger.info(ret.value)
            gh = ctx.grand_parent.obj["GH"]
            user = gh.me().login
            issue_number = ctx.grand_parent.params["issue"]
            issue = gh.issue(
                SETTINGS.tracker["org"], SETTINGS.tracker["repo"], issue_number
            )
            # create or retrieve gist for log files
            gist_name = f"{SETTINGS.tracker['repo']}-issue{issue_number}.md"
            directory = ctx.parent.params["directory"]
            emmet_dir = os.path.join(os.path.expanduser("~"), ".emmet")
            if not os.path.exists(emmet_dir):
                os.mkdir(emmet_dir)
                logger.debug(f"{emmet_dir} created")
            gist_id_fn = os.path.join(emmet_dir, gist_name)
            gist = None
            if os.path.exists(gist_id_fn):
                with open(gist_id_fn, "r") as fd:
                    gist_id = fd.readline().strip()
                    # NOTE failed with KeyError 'total': gist = gh.gist(gist_id)
                    url = gh._build_url("gists", str(gist_id))
                    resp = gh._get(url)
                    json = gh._json(resp, 200)
                    gist = gh._instance_or_null(ShortGist, json)
            else:
                description = f"Logs for {SETTINGS.tracker['repo']}#{issue_number}"
                files = {gist_name: {"content": issue.html_url}}
                gist = gh.create_gist(description, files, public=False)
                with open(gist_id_fn, "w") as fd:
                    fd.write(gist.id)
                txt = GIST_COMMENT_TEMPLATE.format(gist.html_url)
                comment = issue.create_comment(txt)
                logger.info(f"Gist Comment: {comment.html_url}")
            # update gist with logs for new command
            logger.debug(f"Log Gist: {gist.html_url}")
            now = str(datetime.now()).replace(" ", "-")
            filename = ctx.command_path.replace(" ", "-") + f"_{now}"
            logs = ctx.grand_parent.obj["LOG_STREAM"]
            gist.edit(files={filename: {"content": logs.getvalue()}})
            if not ctx.grand_parent.params["sbatch"]:
                # add comment for new command
                command = reconstruct_command()
                raw_url = f"{GIST_RAW_URL}/{user}/{gist.id}/raw/{filename}"
                txt = COMMENT_TEMPLATE.format(
                    ctx.command_path, ret.value, command, raw_url
                )
                comment = issue.create_comment(txt)
                logger.info(comment.html_url)
        return ret
    return update_wrapper(wrapper, func)