[packagedb-cli: 2/5] Add an utility method to find the ticket number of a given url
by Pierre-YvesChibon
commit 881ad7b9ce773d381ede2f149f280e9718b59e18
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Oct 8 09:49:26 2015 +0200
Add an utility method to find the ticket number of a given url
pkgdb2client/utils.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py
index e7ce19a..4e7d205 100644
--- a/pkgdb2client/utils.py
+++ b/pkgdb2client/utils.py
@@ -97,6 +97,21 @@ def comment_on_bug(bugid, comment):
return bug
+def get_bug_id_from_url(url):
+ ''' Return the bug identifier for a given URL.
+
+ :arg url: the url of the ticket
+
+ '''
+
+ bugid = url.rsplit('/', 1)[1]
+
+ if 'id=' in url:
+ bugid = url.split('id=', 1)[1]
+
+ return bugid
+
+
def get_bug(bugid):
''' Return the bug with the specified identifier.
8 years, 7 months
[packagedb-cli: 1/5] Add an utility method to comment on a bugzilla ticket
by Pierre-YvesChibon
commit 5189d3d898ab20bb0d965d1066ff332cdc78189b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Oct 8 09:49:05 2015 +0200
Add an utility method to comment on a bugzilla ticket
pkgdb2client/utils.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py
index b2fd87e..e7ce19a 100644
--- a/pkgdb2client/utils.py
+++ b/pkgdb2client/utils.py
@@ -83,6 +83,20 @@ def get_bugz(pkg_name):
return bugbz
+def comment_on_bug(bugid, comment):
+ ''' Comment on a bugzilla ticket.
+
+ :arg bugid: the identifier of the bug in bugzilla
+ :arg comment: the comment to post on that ticket
+
+ '''
+ bug = get_bug(bugid)
+
+ bug.addcomment(comment)
+
+ return bug
+
+
def get_bug(bugid):
''' Return the bug with the specified identifier.
8 years, 7 months
[packagedb-cli] (5 commits) ...Release 2.9.2
by Pierre-YvesChibon
Summary of changes:
5189d3d... Add an utility method to comment on a bugzilla ticket
881ad7b... Add an utility method to find the ticket number of a given
359d1e0... Comment on bugzilla when a request.package is approved or d
54504f9... Merge pull request #45 from fedora-infra/notify_ticket
c643f50... Release 2.9.2
8 years, 7 months
[packagedb-cli/readme] Indicate where the tarballs can be found
by Pierre-YvesChibon
commit b6597f86624183c56344e6dd35d8f441e13f0f64
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Oct 10 19:50:39 2015 +0200
Indicate where the tarballs can be found
README.rst | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/README.rst b/README.rst
index c57d329..8295e1e 100644
--- a/README.rst
+++ b/README.rst
@@ -28,6 +28,11 @@ as the pkgdb2client.cli module containing the command line interface and the
pkgdb2client.admin module containing a command line interface for admins to
interact with `pkgdb2`_.
+
+The tarball of the releases can be found at:
+`https://fedorahosted.org/released/packagedb-cli/
+<https://fedorahosted.org/released/packagedb-cli/>`_
+
------------
Installation
------------
8 years, 7 months
[packagedb-cli/readme: 3/3] Adjust the MANIFEST.in for the new name of the README
by Pierre-YvesChibon
commit d9cfad056990b5a51033a2af8a5187f44fdfdb76
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Oct 10 19:48:59 2015 +0200
Adjust the MANIFEST.in for the new name of the README
MANIFEST.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/MANIFEST.in b/MANIFEST.in
index 925c086..7ca7beb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-include LICENSE README test.py
+include LICENSE README.rst test.py
8 years, 7 months
[packagedb-cli/readme: 2/3] Mark the README as being rst
by Pierre-YvesChibon
commit 40cf6aeb8c901f906774a04e678139525d032c9a
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Oct 10 19:48:32 2015 +0200
Mark the README as being rst
README => README.rst | 0
1 files changed, 0 insertions(+), 0 deletions(-)
---
diff --git a/README b/README.rst
similarity index 100%
rename from README
rename to README.rst
8 years, 7 months
[packagedb-cli/readme: 1/3] Release 2.9.1
by Pierre-YvesChibon
commit 3a1afa9973c05c0c345530bc20d41dcf4b056cdd
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Oct 10 19:44:39 2015 +0200
Release 2.9.1
README | 4 ++--
setup.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/README b/README
index 68ef68a..c57d329 100644
--- a/README
+++ b/README
@@ -4,8 +4,8 @@ Fedora PackageDB-cli
:Author: Pierre-Yves Chibon
:Contact: pingou(a)fedoraproject.org
-:Date: Thu Sep 03, 2015
-:Version: 2.9
+:Date: Sat Oct 10 2015
+:Version: 2.9.1
The `PackageDB-cli` is a commande line interface to the PackageDB of Fedora.
diff --git a/setup.py b/setup.py
index 823a904..1724b86 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ from setuptools import setup
setup(
name='packagedb-cli',
description='A command line tool to access the Fedora Package Database.',
- version='2.9',
+ version='2.9.1',
license='GPLv2+',
download_url='https://fedorahosted.org/releases/p/a/packagedb-cli/',
url='https://fedorahosted.org/packagedb-cli/',
8 years, 7 months
[packagedb-cli] (3 commits) Created branch readme
by Pierre-YvesChibon
The branch 'readme' was created.
Summary of new commits:
3a1afa9... Release 2.9.1
40cf6ae... Mark the README as being rst
d9cfad0... Adjust the MANIFEST.in for the new name of the README
8 years, 7 months
[packagedb-cli: 2/2] Merge pull request #44 from fedora-infra/review_url
by Pierre-YvesChibon
commit 616142906290d1f08ff9ea247dcc1025a6e3b383
Merge: 6ba8ee9 1beea57
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Oct 8 09:31:28 2015 +0200
Merge pull request #44 from fedora-infra/review_url
Print the review url when showing information about a request.package
pkgdb2client/admin.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
8 years, 7 months
[packagedb-cli: 1/2] Print the review url when showing information about a request.package
by Pierre-YvesChibon
commit 1beea57cf5b0ff0717405bcf268c025d3323ade2
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Oct 7 15:17:37 2015 +0200
Print the review url when showing information about a request.package
fixes https://github.com/fedora-infra/pkgdb2/issues/231
pkgdb2client/admin.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pkgdb2client/admin.py b/pkgdb2client/admin.py
index 9518c46..e9d3672 100644
--- a/pkgdb2client/admin.py
+++ b/pkgdb2client/admin.py
@@ -128,13 +128,15 @@ def _action2msg(action):
'''
if action['action'] == 'request.package':
msg = '#%(id)s (%(status)s) - %(user)s requested the new package '\
- '"%(pkg)s" on "%(clt)s"' % (
+ '"%(pkg)s" on "%(clt)s"\n %(spaces)s review: %(review_url)s' % (
{
'id': action['id'],
'status': action['status'],
'user': action['user'],
'pkg': action['info']['pkg_name'],
'clt': action['info']['pkg_collection'],
+ 'spaces': ' '*len(str(action['id'])),
+ 'review_url': action['info']['pkg_review_url'],
}
)
8 years, 7 months