mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 05:34:22 -07:00
rocketchat: deprecate default value of is_pre740 (#10490)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
* Deprecate default value of is_pre740. * Use correct markup. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
1518b43b85
commit
88bd44aea7
2 changed files with 14 additions and 3 deletions
3
changelogs/fragments/10490-rocketchat.yml
Normal file
3
changelogs/fragments/10490-rocketchat.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
deprecated_features:
|
||||||
|
- "rocketchat - the default value for ``is_pre740``, currently ``true``, is deprecated and will change to ``false`` in community.general 13.0.0
|
||||||
|
(https://github.com/ansible-collections/community.general/pull/10490)."
|
|
@ -104,10 +104,9 @@ options:
|
||||||
description:
|
description:
|
||||||
- If V(true), the payload matches Rocket.Chat prior to 7.4.0 format. This format has been used by the module since its
|
- If V(true), the payload matches Rocket.Chat prior to 7.4.0 format. This format has been used by the module since its
|
||||||
inception, but is no longer supported by Rocket.Chat 7.4.0.
|
inception, but is no longer supported by Rocket.Chat 7.4.0.
|
||||||
- The default value of the option is going to change to V(false) eventually.
|
- The default value of the option, V(true), is B(deprecated) since community.general 11.2.0 and will change to V(false) in community.general 13.0.0.
|
||||||
- This parameter is going to be removed in a future release when Rocket.Chat 7.4.0 becomes the minimum supported version.
|
- This parameter is going to be removed in a future release when Rocket.Chat 7.4.0 becomes the minimum supported version.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
|
||||||
version_added: 10.5.0
|
version_added: 10.5.0
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -230,7 +229,7 @@ def main():
|
||||||
validate_certs=dict(default=True, type='bool'),
|
validate_certs=dict(default=True, type='bool'),
|
||||||
color=dict(type='str', default='normal', choices=['normal', 'good', 'warning', 'danger']),
|
color=dict(type='str', default='normal', choices=['normal', 'good', 'warning', 'danger']),
|
||||||
attachments=dict(type='list', elements='dict'),
|
attachments=dict(type='list', elements='dict'),
|
||||||
is_pre740=dict(default=True, type='bool')
|
is_pre740=dict(type='bool')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -247,6 +246,15 @@ def main():
|
||||||
attachments = module.params['attachments']
|
attachments = module.params['attachments']
|
||||||
is_pre740 = module.params['is_pre740']
|
is_pre740 = module.params['is_pre740']
|
||||||
|
|
||||||
|
if is_pre740 is None:
|
||||||
|
module.deprecate(
|
||||||
|
"The default value 'true' for 'is_pre740' is deprecated and will change to 'false' in community.general 13.0.0."
|
||||||
|
" You can explicitly set 'is_pre740' in your task to avoid this deprecation warning",
|
||||||
|
version="13.0.0",
|
||||||
|
collection_name="community.general",
|
||||||
|
)
|
||||||
|
is_pre740 = True
|
||||||
|
|
||||||
payload = build_payload_for_rocketchat(module, text, channel, username, icon_url, icon_emoji, link_names, color, attachments, is_pre740)
|
payload = build_payload_for_rocketchat(module, text, channel, username, icon_url, icon_emoji, link_names, color, attachments, is_pre740)
|
||||||
do_notify_rocketchat(module, domain, token, protocol, payload)
|
do_notify_rocketchat(module, domain, token, protocol, payload)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue