From ccba2ec26e04308306ea248b6c02f9db0e82024c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20M=C3=A9nie?= Date: Wed, 22 Jan 2020 17:39:05 +0100 Subject: [PATCH] added update_reporter action --- actions/update_reporter.py | 13 +++++++++++++ actions/update_reporter.yaml | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 actions/update_reporter.py create mode 100644 actions/update_reporter.yaml diff --git a/actions/update_reporter.py b/actions/update_reporter.py new file mode 100644 index 0000000..5f23b10 --- /dev/null +++ b/actions/update_reporter.py @@ -0,0 +1,13 @@ +from lib.base import BaseJiraAction + +__all__ = [ + 'UpdateReporterValue' +] + + +class UpdateReporterValue(BaseJiraAction): + def run(self, issue_key, username, notify): + issue = self._client.issue(issue_key) + issue.update(reporter={'name': username}, notify=notify) + result = issue.fields.labels + return result diff --git a/actions/update_reporter.yaml b/actions/update_reporter.yaml new file mode 100644 index 0000000..cd0f668 --- /dev/null +++ b/actions/update_reporter.yaml @@ -0,0 +1,20 @@ +--- +name: update_reporter +runner_type: python-script +description: Update the reporter of a particular JIRA issue. +enabled: true +entry_point: update_reporter.py +parameters: + issue_key: + type: string + description: Issue key (e.g. PROJECT-1000). + required: true + username: + type: string + description: the reporter name. + required: true + notify: + type: boolean + description: jira will send notifications (default is true) + default: true + required: false