Skip to content

Commit

Permalink
Merge pull request #185 from smk4664/release-1.11.0
Browse files Browse the repository at this point in the history
Release 1.11.0
  • Loading branch information
smk4664 authored Mar 11, 2023
2 parents 814a869 + dfe40ae commit e9456b2
Show file tree
Hide file tree
Showing 20 changed files with 1,870 additions and 1,655 deletions.
1 change: 0 additions & 1 deletion changes/138.removed

This file was deleted.

1 change: 0 additions & 1 deletion changes/147.changed

This file was deleted.

1 change: 0 additions & 1 deletion changes/166.added

This file was deleted.

1 change: 0 additions & 1 deletion changes/171.added

This file was deleted.

1 change: 0 additions & 1 deletion changes/173.changed

This file was deleted.

1 change: 0 additions & 1 deletion changes/174.changed

This file was deleted.

1 change: 0 additions & 1 deletion changes/182.added

This file was deleted.

1 change: 0 additions & 1 deletion changes/94.changed

This file was deleted.

3 changes: 1 addition & 2 deletions docs/admin/install/webex_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
- event: "created"
- secret: (enter a secret string that you don't mind having passed around as plaintext)
- Change the `resource` to "attachmentActions" and run the API call again to create a second webhook.
4. Configure the `webex_signing_secret` in your `.creds.env` to match the secret string that you selected in
step 3 above.
4. Configure the `webex_signing_secret` in your `.creds.env` to match the Webhook secret string that you selected above.
5. Proceed to the [Install Guide](index.md#Install-Guide) section.

## Deprecation Warning
Expand Down
22 changes: 22 additions & 0 deletions docs/admin/release_notes/version_1.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- markdownlint-disable MD024 -->
# v1.11 Release Notes

<!-- towncrier release notes start -->
## [v1.11.0 (2023-03-11)](https://github.com/nautobot/nautobot-plugin-chatops/releases/tag/v1.11.0)

### Added

- [#166](https://github.com/nautobot/nautobot-plugin-chatops/issues/166) - Add documentation for contributing WebSocket Platform support.
- [#171](https://github.com/nautobot/nautobot-plugin-chatops/issues/171) - Enable Upstream Testing with Nautobot.
- [#182](https://github.com/nautobot/nautobot-plugin-chatops/issues/182) - Add option to limit Help prompt based on user Access Grants.

### Changed

- [#94](https://github.com/nautobot/nautobot-plugin-chatops/issues/94) - Clarified the description of Access Grants for Webex Teams.
- [#147](https://github.com/nautobot/nautobot-plugin-chatops/issues/147) - Left Align Column headers for tables to match the rows.
- [#173](https://github.com/nautobot/nautobot-plugin-chatops/issues/173) - Update App description.
- [#174](https://github.com/nautobot/nautobot-plugin-chatops/issues/174) - Change list views to use generic/object_list.html template.

### Removed

- [#138](https://github.com/nautobot/nautobot-plugin-chatops/issues/138) - Remove WEBEX_TOKEN warning when Webex is disabled.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ nav:
- Compatibility Matrix: "admin/compatibility_matrix.md"
- Release Notes:
- "admin/release_notes/index.md"
- v1.11: "admin/release_notes/version_1.11.md"
- v1.10: "admin/release_notes/version_1.10.md"
- v1.9: "admin/release_notes/version_1.9.md"
- v1.8: "admin/release_notes/version_1.8.md"
Expand Down
6 changes: 4 additions & 2 deletions nautobot_chatops/api/views/ms_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

def get_bot_signing_keys(metadata_uri=BOT_CONNECTOR_METADATA_URI):
"""Get the keys used by the Bot Connector service to sign requests and the associated algorithms."""
response = requests.get(metadata_uri)
response = requests.get(metadata_uri, timeout=15)
id_token_signing_alg_values_supported = response.json()["id_token_signing_alg_values_supported"]
jwks_uri = response.json()["jwks_uri"]

response = requests.get(jwks_uri)
response = requests.get(jwks_uri, timeout=15)
# https://renzo.lucioni.xyz/verifying-jwts-with-jwks-and-pyjwt/
public_keys = {}
for jwk in response.json()["keys"]:
Expand Down Expand Up @@ -155,6 +155,7 @@ def post(self, request, *args, **kwargs):
response = requests.get(
f"{context['service_url']}/v3/teams/{context['org_id']}",
headers={"Authorization": f"Bearer {MSTeamsDispatcher.get_token()}"},
timeout=15,
)
response.raise_for_status()
context["org_name"] = response.json()["name"]
Expand All @@ -168,6 +169,7 @@ def post(self, request, *args, **kwargs):
response = requests.get(
f"{context['service_url']}/v3/teams/{context['org_id']}/conversations",
headers={"Authorization": f"Bearer {MSTeamsDispatcher.get_token()}"},
timeout=15,
)
response.raise_for_status()
for conversation in response.json()["conversations"]:
Expand Down
6 changes: 3 additions & 3 deletions nautobot_chatops/dispatchers/mattermost.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def post(self, endpoint, params=None, data=None, multipart_formdata=None) -> Dic
data = json.dumps(data)

mm_response = requests.post(
self._url + endpoint, headers=self._headers, params=params, data=data, files=multipart_formdata
self._url + endpoint, headers=self._headers, params=params, data=data, files=multipart_formdata, timeout=15
)
mm_response.raise_for_status()

Expand All @@ -156,7 +156,7 @@ def get(self, endpoint, params=None, raw=False) -> Dict:
Returns:
dict: Response from Mattermost API. Unless raw, which returns the string.
"""
mm_response = requests.get(self._url + endpoint, headers=self._headers, params=params)
mm_response = requests.get(self._url + endpoint, headers=self._headers, params=params, timeout=15)
mm_response.raise_for_status()
if raw:
return mm_response
Expand All @@ -170,7 +170,7 @@ def delete(self, endpoint):
Args:
endpoint (string): Endpoint to post delete to.
"""
mm_response = requests.delete(self._url + endpoint, headers=self._headers)
mm_response = requests.delete(self._url + endpoint, headers=self._headers, timeout=15)
mm_response.raise_for_status()

def chat_post_message(self, channel_id, message=None, blocks=None, files=None, snippet=None):
Expand Down
5 changes: 5 additions & 0 deletions nautobot_chatops/dispatchers/ms_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_token():
"client_secret": settings.PLUGINS_CONFIG["nautobot_chatops"]["microsoft_app_password"],
"scope": "https://api.botframework.com/.default",
},
timeout=15,
)
token = response.json()["access_token"]
return token
Expand Down Expand Up @@ -90,6 +91,7 @@ def _send(self, content, content_type="message"):
f"{self.context['service_url']}/v3/conversations/{self.context['conversation_id']}/activities",
headers={"Authorization": f"Bearer {self.get_token()}"},
json=content,
timeout=15,
)
return response

Expand Down Expand Up @@ -133,6 +135,7 @@ def ask_permission_to_send_image(self, filename, action_id):
"tenantId": self.context["tenant_id"],
"topicName": "Image upload",
},
timeout=15,
)
response.raise_for_status()
self.context["conversation_id"] = response.json()["id"]
Expand Down Expand Up @@ -191,6 +194,7 @@ def send_image(self, image_path):
"Content-Length": str(file_size),
"Content-Range": f"bytes 0-{file_size-1}/{file_size}",
},
timeout=15,
)
response.raise_for_status()

Expand Down Expand Up @@ -221,6 +225,7 @@ def delete_message(self, message_id):
requests.delete(
f"{self.context['service_url']}/v3/conversations/{self.context['conversation_id']}/activities/{message_id}",
headers={"Authorization": f"Bearer {self.get_token()}"},
timeout=15,
)

def user_mention(self):
Expand Down
1 change: 0 additions & 1 deletion nautobot_chatops/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion nautobot_chatops/migrations/0002_commandlog_params1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("nautobot_chatops", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion nautobot_chatops/migrations/0003_params_to_params1.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def reverse_migrate_params(apps, schema_editor):


class Migration(migrations.Migration):

dependencies = [
("nautobot_chatops", "0002_commandlog_params1"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Migration(migrations.Migration):

dependencies = [
("nautobot_chatops", "0003_params_to_params1"),
]
Expand Down
Loading

0 comments on commit e9456b2

Please sign in to comment.