Skip to content

GitHub setup failed for mcpmark-cicd__issue_management_workflow: ERROR: Cannot import template to a public repository. #234

@RyanSun04

Description

@RyanSun04

This is what the log report when i run github mcp tasks,specifically mcpmark-cicd tasks:

Reason: The template contains @ mentions of real GitHub users from the original
repository. Importing to a public repository would send notifications to these
users, which is disruptive and inappropriate.

Solution: Set private=True when calling _import_template_repo().
| Failed to create initial state for mcpmark-cicd__linting_ci_workflow
| State setup failed for task: mcpmark-cicd__linting_ci_workflow
Retrying task due to pipeline error (State Duplication Error): mcpmark-cicd__pr_automation_workflow

The code that report this issue lies in github_state_manager.py:

            if "mcpmark-cicd" in template_name:
                repo_url = self._import_template_repo(template_dir, owner, False)
            else:
                repo_url = self._import_template_repo(template_dir, owner, True)

private = False when "mcpmark-cicd" in template_name, which leads to a state duplication error.
but in github_state_manager.py _import_template_repo, this code enables a safety check for prviate=True

        # Safety check: Prevent importing to public repositories
        # Public repos would send @ mention notifications to real users, causing spam
        if not private:
            error_msg = (
                "ERROR: Cannot import template to a public repository.\n\n"
                "Reason: The template contains @ mentions of real GitHub users from the original\n"
                "repository. Importing to a public repository would send notifications to these\n"
                "users, which is disruptive and inappropriate.\n\n"
                "Solution: Set private=True when calling _import_template_repo()."
            )
            logger.error(error_msg)
            # Clean up the created repo before raising
            self._delete_repository(owner, repo_name)
            raise RuntimeError(error_msg)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions