From 3793bbc6a82efeb1266e9dadebdb83034e3b79ea Mon Sep 17 00:00:00 2001 From: Peter Mosmans Date: Wed, 25 Jan 2017 14:46:21 +1100 Subject: [PATCH] Ignore casing of gitlab labels --- chatops/python/gitlab-to-pentext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chatops/python/gitlab-to-pentext.py b/chatops/python/gitlab-to-pentext.py index 9fd6e14..f047a57 100644 --- a/chatops/python/gitlab-to-pentext.py +++ b/chatops/python/gitlab-to-pentext.py @@ -7,7 +7,7 @@ Gitlab bridge for PenText: imports and updates gitlab issues into PenText This script is part of the PenText framework https://pentext.org - Copyright (C) 2016 Radically Open Security + Copyright (C) 2016-2017 Radically Open Security https://www.radicallyopensecurity.com Author(s): Peter Mosmans @@ -150,9 +150,9 @@ def list_issues(gitserver, options): per_page=99): if issue.state == 'closed' and not options['closed']: continue - if 'finding' in issue.labels: + if 'finding' in [x.lower() for x in issue.labels]: add_finding(issue, options) - if 'non-finding' in issue.labels: + if 'non-finding' in [x.lower() for x in issue.labels]: add_non_finding(issue, options) except Exception as exception: print_error('could not find any issues ({0})'.format(exception), -1) @@ -176,7 +176,7 @@ def parse_arguments(): description=textwrap.dedent('''\ gitlab-to-pentext - imports and updates gitlab issues into PenText (XML) format -Copyright (C) 2015-2016 Radically Open Security (Peter Mosmans) +Copyright (C) 2015-2017 Radically Open Security (Peter Mosmans) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by