git: 68f7c252670f - main - devel/git-lab: new port adds `git lab` to CLI

Adriaan de Groot adridg at FreeBSD.org
Thu May 20 12:44:22 UTC 2021


The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=68f7c252670fcbaee2932e51ad57987d71145013

commit 68f7c252670fcbaee2932e51ad57987d71145013
Author:     Adriaan de Groot <adridg at FreeBSD.org>
AuthorDate: 2021-05-20 12:41:25 +0000
Commit:     Adriaan de Groot <adridg at FreeBSD.org>
CommitDate: 2021-05-20 12:44:19 +0000

    devel/git-lab: new port adds `git lab` to CLI
    
    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.
---
 devel/Makefile                        |  1 +
 devel/git-lab/Makefile                | 21 +++++++++++++++++++++
 devel/git-lab/distinfo                |  3 +++
 devel/git-lab/files/patch-git-23fd64b | 26 ++++++++++++++++++++++++++
 devel/git-lab/pkg-descr               |  7 +++++++
 5 files changed, 58 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 6b005e75e5c5..290786b35872 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 000000000000..098976970339
--- /dev/null
+++ b/devel/git-lab/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=       git-lab
+DISTVERSION=    0.1
+CATEGORIES=     devel
+
+MAINTAINER=     adridg at 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 <bsd.port.mk>
diff --git a/devel/git-lab/distinfo b/devel/git-lab/distinfo
new file mode 100644
index 000000000000..f660f01ad2b3
--- /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 000000000000..7bc28ceee846
--- /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 000000000000..688a3e54b634
--- /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


More information about the dev-commits-ports-all mailing list