Skip to content

Commit 6059581

Browse files
committed
Update trigger payload structure
1 parent e39c968 commit 6059581

3 files changed

Lines changed: 28 additions & 37 deletions

File tree

sensors/jira_sensor.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@ def setup(self):
6464
"key_cert": self._rsa_key,
6565
}
6666

67-
self._jira_client = JIRA(
68-
options=options, oauth=oauth_creds, get_server_info=False
69-
)
67+
self._jira_client = JIRA(options=options, oauth=oauth_creds)
7068
elif auth_method == "basic":
7169
basic_creds = (self._config["username"], self._config["password"])
72-
self._jira_client = JIRA(
73-
options=options, basic_auth=basic_creds, get_server_info=False
74-
)
70+
self._jira_client = JIRA(options=options, basic_auth=basic_creds)
7571

7672
else:
7773
msg = (

sensors/jira_sensor.yaml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
---
2-
class_name: "JIRASensor"
3-
entry_point: "jira_sensor.py"
4-
description: "Sensor which monitors JIRA for new tickets"
5-
poll_interval: 30
6-
trigger_types:
7-
-
8-
name: "issues_tracker"
9-
description: "Trigger which indicates that a new issue has been created"
10-
payload_schema:
11-
type: "object"
12-
properties:
13-
project:
14-
type: "string"
15-
issue_name:
16-
type: "string"
17-
issue_url:
18-
type: "string"
19-
created:
20-
type: "string"
21-
assignee:
22-
type: "string"
23-
fix_versions:
24-
type: "string"
25-
issue_type:
26-
type: "string"
2+
class_name: "JIRASensor"
3+
entry_point: "jira_sensor.py"
4+
description: "Sensor which monitors JIRA for new tickets"
5+
poll_interval: 30
6+
trigger_types:
7+
- name: "issues_tracker"
8+
description: "Trigger which indicates that a new issue has been created"
9+
payload_schema:
10+
type: "object"
11+
properties:
12+
project:
13+
type: "string"
14+
issue_name:
15+
type: "string"
16+
issue_url:
17+
type: "string"
18+
created:
19+
type: "string"
20+
assignee:
21+
type: "string"
22+
fix_versions:
23+
type: "list"
24+
issue_type:
25+
type: "string"

sensors/jira_sensor_for_apiv2.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@ def setup(self):
6464
"key_cert": self._rsa_key,
6565
}
6666

67-
self._jira_client = JIRA(
68-
options=options, oauth=oauth_creds, get_server_info=False
69-
)
67+
self._jira_client = JIRA(options=options, oauth=oauth_creds)
7068
elif auth_method == "basic":
7169
basic_creds = (self._config["username"], self._config["password"])
72-
self._jira_client = JIRA(
73-
options=options, basic_auth=basic_creds, get_server_info=False
74-
)
70+
self._jira_client = JIRA(options=options, basic_auth=basic_creds)
7571

7672
else:
7773
msg = (

0 commit comments

Comments
 (0)