diff --git a/devel/Makefile b/devel/Makefile index 6b005e75e5c58..290786b358728 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -807,6 +807,7 @@ SUBDIR += git-cola SUBDIR += git-delta SUBDIR += git-extras + SUBDIR += git-lab SUBDIR += git-lfs SUBDIR += git-merge-changelog SUBDIR += git-modes diff --git a/devel/git-lab/Makefile b/devel/git-lab/Makefile new file mode 100644 index 0000000000000..0989769703393 --- /dev/null +++ b/devel/git-lab/Makefile @@ -0,0 +1,21 @@ +PORTNAME= git-lab +DISTVERSION= 0.1 +CATEGORIES= devel + +MAINTAINER= adridg@FreeBSD.org +COMMENT= GitLab management commands for git CLI + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}appdirs>0:devel/py-appdirs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gitpython>=2.1.8:devel/py-gitpython@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-gitlab>=2.7.1:devel/py-python-gitlab@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent distutils + +USE_GITLAB= yes +GL_SITE= https://invent.kde.org +GL_ACCOUNT= sdk +GL_PROJECT= ${PORTNAME} +GL_COMMIT= 68c892f1f5268652d23cea04b1af294b8fc32dbb + +.include diff --git a/devel/git-lab/distinfo b/devel/git-lab/distinfo new file mode 100644 index 0000000000000..f660f01ad2b3d --- /dev/null +++ b/devel/git-lab/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1621507987 +SHA256 (sdk-git-lab-68c892f1f5268652d23cea04b1af294b8fc32dbb_GL0.tar.gz) = 20deea47ec16dab1e47250cc07ae4c1bdb68a54ffa1e2c9a0ff7250194f41e23 +SIZE (sdk-git-lab-68c892f1f5268652d23cea04b1af294b8fc32dbb_GL0.tar.gz) = 21975 diff --git a/devel/git-lab/files/patch-git-23fd64b b/devel/git-lab/files/patch-git-23fd64b new file mode 100644 index 0000000000000..7bc28ceee846c --- /dev/null +++ b/devel/git-lab/files/patch-git-23fd64b @@ -0,0 +1,26 @@ +diff --git lab/repositoryconnection.py lab/repositoryconnection.py +index c7170de..23fd64b 100644 +--- lab/repositoryconnection.py ++++ lab/repositoryconnection.py +@@ -71,7 +71,7 @@ class RepositoryConnection: + + try: + self._remote_project = self._connection.projects.get( +- Utils.str_id_for_url(Utils.normalize_url(repository)) ++ Utils.str_id_for_url(repository) + ) + except (GitlabHttpError, GitlabGetError): + Utils.log(LogType.Error, "The repository could not be found on the GitLab instance.") +diff --git lab/utils.py lab/utils.py +index c0490ac..3c4c707 100644 +--- lab/utils.py ++++ lab/utils.py +@@ -60,7 +60,7 @@ class Utils: + """ + normalized_url: str = Utils.normalize_url(url) + repository_url: ParseResult = urlparse(normalized_url.replace(".git", "")) +- return quote_plus(repository_url.path[1:]) ++ return quote_plus(repository_url.path[1:], safe='/') + + @staticmethod + def log(log_type: LogType, *message: str) -> None: diff --git a/devel/git-lab/pkg-descr b/devel/git-lab/pkg-descr new file mode 100644 index 0000000000000..688a3e54b6342 --- /dev/null +++ b/devel/git-lab/pkg-descr @@ -0,0 +1,7 @@ +git-lab is an extension for the git command-line tool that +helps with interacting with a gitlab instance (e.g. gitlab.com, +or GNOME or KDE gitlab instances). It adds a `git lab` +subcommand to git, which allows you to manage issues, +merge requests and more from the command-line. + +WWW: https://invent.kde.org/sdk/git-lab