Repository: nf-core/tools

Issue:
Link in `nf-core modules info` broken
### Description of the bug

The link created by `nf-core modules info` is broken since the move from the github api. The link is set on https://github.com/nf-core/tools/blob/dev/nf_core/modules/info.py#L164-L168, but the `self.remote_location` is either a https or ssh address so the link is broken.

### Command used and terminal output

```console
$ nf-core modules info
```


### System information

nf-core/tools @2.5dev


Discussion:

Resolving patch:
diff --git a/nf_core/modules/info.py b/nf_core/modules/info.py
--- a/nf_core/modules/info.py
+++ b/nf_core/modules/info.py
@@ -21,11 +21,46 @@
 
 
 class ModuleInfo(ModuleCommand):
+    """
+    Class to print information of a module.
+
+    Attributes
+    ----------
+    meta : YAML object
+        stores the information from meta.yml file
+    local_path : str
+        path of the local modules
+    remote_location : str
+        remote repository URL
+    local : bool
+        indicates if the module is locally installed or not
+    repo_type : str
+        repository type. Can be either 'pipeline' or 'modules'
+    modules_json : ModulesJson object
+        contains 'modules.json' file information from a pipeline
+    module : str
+        name of the tool to get information from
+
+    Methods
+    -------
+    init_mod_name(module)
+        Makes sure that we have a module name
+    get_module_info()
+        Given the name of a module, parse meta.yml and print usage help
+    get_local_yaml()
+        Attempt to get the meta.yml file from a locally installed module
+    get_remote_yaml()
+        Attempt to get the meta.yml file from a remote repo
+    generate_module_info_help()
+        Take the parsed meta.yml and generate rich help
+    """
+
     def __init__(self, pipeline_dir, tool, remote_url, branch, no_pull, base_path):
         super().__init__(pipeline_dir, remote_url, branch, no_pull, base_path)
         self.meta = None
         self.local_path = None
         self.remote_location = None
+        self.local = None
 
         # Quietly check if this is a pipeline or not
         if pipeline_dir:
@@ -51,10 +86,10 @@ def init_mod_name(self, module):
             module: str: Module name to check
         """
         if module is None:
-            local = questionary.confirm(
+            self.local = questionary.confirm(
                 "Is the module locally installed?", style=nf_core.utils.nfcore_question_style
             ).unsafe_ask()
-            if local:
+            if self.local:
                 if self.repo_type == "modules":
                     modules = self.get_modules_clone_modules()
                 else:
@@ -78,7 +113,7 @@ def get_module_info(self):
         """Given the name of a module, parse meta.yml and print usage help."""
 
         # Running with a local install, try to find the local meta
-        if self.dir:
+        if self.local:
             self.meta = self.get_local_yaml()
 
         # Either failed locally or in remote mode
@@ -163,7 +198,11 @@ def generate_module_info_help(self):
         elif self.remote_location:
             intro_text.append(
                 Text.from_markup(
-                    f":globe_with_meridians: Repository: [link=https://github.com/{self.remote_location}]{self.remote_location}[/]\n"
+                    ":globe_with_meridians: Repository: "
+                    f"{ '[link={self.remote_location}]' if self.remote_location.startswith('http') else ''}"
+                    f"{self.remote_location}"
+                    f"{'[/link]' if self.remote_location.startswith('http') else '' }"
+                    "\n"
                 )
             )
 


Test patch: