Skip to content

Commit

Permalink
devel/git-lab: new port adds git lab to CLI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Adriaan de Groot authored and Adriaan de Groot committed May 20, 2021
1 parent 3aa0db1 commit 68f7c25
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions 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 <bsd.port.mk>
3 changes: 3 additions & 0 deletions 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
26 changes: 26 additions & 0 deletions 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:
7 changes: 7 additions & 0 deletions 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

0 comments on commit 68f7c25

Please sign in to comment.