Repository: ishepard/pydriller (python)

Issue:
commit.project_name broken when working on multiple repos
**Describe the bug**
commit.project_name broken when working on multiple repos

**To Reproduce**
```
from pydriller import RepositoryMining

repos = [
    "C:/jcb/code/montagel",
    "C:/jcb/code/Xrf",
]
print(repos)

starttag = "com.jcbachmann.xrf.suite/v11"
endtag = "com.jcbachmann.xrf.suite/v12"

for commit in RepositoryMining(path_to_repo=repos[0], from_tag=starttag, to_tag=endtag).traverse_commits():
    print(commit.project_name)
print("repo 0 OK")

for commit in RepositoryMining(path_to_repo=repos[1], from_tag=starttag, to_tag=endtag).traverse_commits():
    print(commit.project_name)
print("repo 1 OK")

for commit in RepositoryMining(path_to_repo=repos, from_tag=starttag, to_tag=endtag).traverse_commits():
    print(commit.project_name)
    pass
print("repos tagged OK")
```

gives

```
C:\jcb\venvs\Xrf\Scripts\python.exe C:/jcb/code/Xrf-Python/Documentation/chapters/software/bug.py
['C:/jcb/code/montagel', 'C:/jcb/code/Xrf']
montagel
[...]
repo 0 OK
Xrf
[...]
repo 1 OK
Traceback (most recent call last):
  File "C:/jcb/code/Xrf-Python/Documentation/chapters/software/bug.py", line 23, in <module>
    print(commit.project_name)
  File "C:\jcb\venvs\Xrf\lib\site-packages\pydriller\domain\commit.py", line 479, in project_name
    return Path(self._conf.get('path_to_repo')).name
  File "C:\Python37\lib\pathlib.py", line 1003, in __new__
    self = cls._from_parts(args, init=False)
  File "C:\Python37\lib\pathlib.py", line 658, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "C:\Python37\lib\pathlib.py", line 642, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not list

Process finished with exit code 1

```


**OS Version:**
pydriller 1.15 with C:\Python37\python.exe


Pull request description:
Fix commit.project_name when multiple repos are given as parameters
Fix #121 

Patch:
diff --git a/pydriller/repository_mining.py b/pydriller/repository_mining.py
index 2eb1f93..e524526 100644
--- a/pydriller/repository_mining.py
+++ b/pydriller/repository_mining.py
@@ -164,7 +164,14 @@ class RepositoryMining:
                 path_repo = self._clone_remote_repos(self._clone_folder(), path_repo)
 
             git_repo = GitRepository(path_repo, self._conf)
+            # saving the GitRepository object for further use
             self._conf.set_value("git_repo", git_repo)
+
+            # when multiple repos are given in input, this variable will serve as a reminder
+            # of which one we are currently analyzing
+            self._conf.set_value('path_to_repo', path_repo)
+
+            # checking that the filters are set correctly
             self._conf.sanity_check_filters()
 
             logger.info('Analyzing git repository in %s', git_repo.path)
diff --git a/pydriller/utils/conf.py b/pydriller/utils/conf.py
index e8d1530..78cc416 100644
--- a/pydriller/utils/conf.py
+++ b/pydriller/utils/conf.py
@@ -59,8 +59,7 @@ class Conf:
         @param path_to_repo: path to the repo as provided by the user.
         @return:
         """
-        if not isinstance(path_to_repo, str) and \
-                not isinstance(path_to_repo, list):
+        if not isinstance(path_to_repo, str) and not isinstance(path_to_repo, list):
             raise Exception("The path to the repo has to be of type 'string' or 'list of strings'!")
 
     def _check_only_one_from_commit(self):


Test patch:
diff --git a/tests/test_commit.py b/tests/test_commit.py
index be3feb1..32bb200 100644
--- a/tests/test_commit.py
+++ b/tests/test_commit.py
@@ -11,7 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
 from pydriller.git_repository import GitRepository
 from pathlib import Path
 import pytest
diff --git a/tests/test_repository_mining.py b/tests/test_repository_mining.py
index 4f7ca59..88b77ef 100644
--- a/tests/test_repository_mining.py
+++ b/tests/test_repository_mining.py
@@ -234,3 +234,22 @@ def test_clone_repo_to_not_existing():
     with pytest.raises(Exception):
         list(RepositoryMining("https://github.com/ishepard/pydriller",
                               clone_repo_to="NOTEXISTINGDIR").traverse_commits())
+
+
+def test_projectname_multiple_repos():
+    repos = [
+        'test-repos/files_in_directories',
+        'test-repos/files_in_directories',
+        'test-repos/files_in_directories'
+    ]
+    for commit in RepositoryMining(path_to_repo=repos).traverse_commits():
+        assert commit.project_name == 'files_in_directories'
+
+
+def test_projectname_multiple_repos_remote():
+    repos = [
+        'https://github.com/ishepard/pydriller',
+        'test-repos/pydriller'
+    ]
+    for commit in RepositoryMining(path_to_repo=repos).traverse_commits():
+        assert commit.project_name == 'pydriller'