Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Adriaan de Groot
authored and
Adriaan de Groot
committed
May 20, 2021
1 parent
3aa0db1
commit 68f7c25
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1621507987 | ||
SHA256 (sdk-git-lab-68c892f1f5268652d23cea04b1af294b8fc32dbb_GL0.tar.gz) = 20deea47ec16dab1e47250cc07ae4c1bdb68a54ffa1e2c9a0ff7250194f41e23 | ||
SIZE (sdk-git-lab-68c892f1f5268652d23cea04b1af294b8fc32dbb_GL0.tar.gz) = 21975 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |