From 680a7071e5e27691893cb8816909ace5efdf771c Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 23 Sep 2021 00:52:32 +0200 Subject: [PATCH] check git verification state --- InvenTree/plugins/integration/integration.py | 6 +++--- .../templates/InvenTree/settings/plugin_settings.html | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/InvenTree/plugins/integration/integration.py b/InvenTree/plugins/integration/integration.py index 0000c17249..77131130ce 100644 --- a/InvenTree/plugins/integration/integration.py +++ b/InvenTree/plugins/integration/integration.py @@ -149,12 +149,12 @@ class NavigationMixin: def get_git_log(path): path = path.replace(os.path.dirname(settings.BASE_DIR), '')[1:] - command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%ad%n%f'", '--follow', '--', path] + command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%aI%n%f%n%G?%n%GK'", '--follow', '--', path] try: output = str(subprocess.check_output(command, cwd=os.path.dirname(settings.BASE_DIR)), 'utf-8')[1:-1].split('\n') except subprocess.CalledProcessError: - output = 5 * [''] - return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4]} + output = 7 * [''] + return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4], 'verified': output[5], 'key': output[6]} class IntegrationPlugin(MixinBase, plugin.InvenTreePlugin): diff --git a/InvenTree/templates/InvenTree/settings/plugin_settings.html b/InvenTree/templates/InvenTree/settings/plugin_settings.html index e5f209b17e..5426a78644 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_settings.html +++ b/InvenTree/templates/InvenTree/settings/plugin_settings.html @@ -37,6 +37,14 @@ {% trans "Commit Message" %}{{ plugin.commit.message }}{% include "clip.html" %} + + + {% trans "Commit verified" %}{{ plugin.commit.verified }} + + + + {% trans "Commit Sign Key" %}{{ plugin.commit.key }}{% include "clip.html" %} +