@@ -31,19 +31,19 @@ def __init__(self, github_token: str, repo_name: str):
3131 self .github = Github (github_token )
3232 self .repo = self .github .get_repo (repo_name )
3333 self .repo_name = repo_name
34-
34+
3535 # Load configuration
3636 self .config = self ._load_config ()
37-
37+
3838 # Get retryable workflows for this repository
3939 self .retryable_workflows = self .config .get ('retryable_workflows' , {}).get (
40- repo_name ,
40+ repo_name ,
4141 self .config .get ('retryable_workflows' , {}).get ('default' , [])
4242 )
43-
43+
4444 self .workflow_manager = WorkflowManager (self .github , repo_name , self .retryable_workflows )
4545 self .comment_handler = CommentHandler (self .repo )
46-
46+
4747 def _load_config (self ) -> dict :
4848 """Load bot configuration from config.yaml or fetch from main repo."""
4949 # Try to load local config first
@@ -56,11 +56,11 @@ def _load_config(self) -> dict:
5656 return config
5757 except Exception :
5858 pass
59-
59+
6060 # Fallback: fetch from main repository
6161 main_repo = 'faneX-ID/core'
6262 main_branch = 'main'
63-
63+
6464 try :
6565 config_url = f"https://raw.githubusercontent.com/{ main_repo } /{ main_branch } /github-bot/config.yaml"
6666 response = requests .get (config_url , timeout = 10 )
@@ -70,7 +70,7 @@ def _load_config(self) -> dict:
7070 return config
7171 except Exception as e :
7272 print (f"Could not fetch config from main repo: { e } " )
73-
73+
7474 # Default config
7575 return {
7676 'enabled' : True ,
@@ -228,10 +228,10 @@ def _test_command(self, pr, commenter: str) -> str:
228228 # Check permissions
229229 admin_users = self .config .get ('admin_users' , [])
230230 admin_only_commands = self .config .get ('admin_only_commands' , [])
231-
231+
232232 if 'test' in admin_only_commands and commenter not in admin_users :
233233 return f"❌ Only admins can use `/test`. Admins: { ', ' .join (admin_users )} "
234-
234+
235235 try :
236236 # Get available workflows from config or use defaults
237237 workflows_to_trigger = self .retryable_workflows [:5 ] if self .retryable_workflows else []
0 commit comments