glab
glab copied to clipboard
`issue/mr` create templates are fetched from PWD
For the current behaviour, the templates are fetched from the current working git directory. This is okay if the issue or mr is being created for the project in the current working git directory.
It becomes an issue when the project path is overridden with the -R | --repo flag. In such cases, the templates are still fetched from .gitlab folder of the current working git directory. So literally, the templates suggested are not for the project specified with the --repo flag.
glab repo create
# uses templates from the .gitlab directory in the current working git directory
glab mr create --repo myorg/repo
# still uses templates from the .gitlab directory in the current working git directory
To fix this, the templates should be fetched by downloading the template files for the repository if the --repo flag is specified