Luke Tainton
9830c5cc3a
* chore(pip-prod)(deps): bump pyparsing from 3.1.1 to 3.1.2 Bumps [pyparsing](https://github.com/pyparsing/pyparsing) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/pyparsing/pyparsing/releases) - [Changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES) - [Commits](https://github.com/pyparsing/pyparsing/compare/3.1.1...pyparsing_3.1.2) --- updated-dependencies: - dependency-name: pyparsing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump packaging from 23.2 to 24.0 Bumps [packaging](https://github.com/pypa/packaging) from 23.2 to 24.0. - [Release notes](https://github.com/pypa/packaging/releases) - [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pypa/packaging/compare/23.2...24.0) --- updated-dependencies: - dependency-name: packaging dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(actions)(deps): bump mathieudutour/github-tag-action Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.1 to 6.2. - [Release notes](https://github.com/mathieudutour/github-tag-action/releases) - [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2) --- updated-dependencies: - dependency-name: mathieudutour/github-tag-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump autopep8 from 2.0.4 to 2.1.0 Bumps [autopep8](https://github.com/hhatto/autopep8) from 2.0.4 to 2.1.0. - [Release notes](https://github.com/hhatto/autopep8/releases) - [Commits](https://github.com/hhatto/autopep8/compare/v2.0.4...v2.1.0) --- updated-dependencies: - dependency-name: autopep8 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump filelock from 3.13.1 to 3.13.2 Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.13.1 to 3.13.2. - [Release notes](https://github.com/tox-dev/py-filelock/releases) - [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/py-filelock/compare/3.13.1...3.13.2) --- updated-dependencies: - dependency-name: filelock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump filelock from 3.13.2 to 3.13.3 Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.13.2 to 3.13.3. - [Release notes](https://github.com/tox-dev/py-filelock/releases) - [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/py-filelock/compare/3.13.2...3.13.3) --- updated-dependencies: - dependency-name: filelock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump filelock from 3.13.3 to 3.13.4 Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.13.3 to 3.13.4. - [Release notes](https://github.com/tox-dev/py-filelock/releases) - [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/py-filelock/compare/3.13.3...3.13.4) --- updated-dependencies: - dependency-name: filelock dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump idna from 3.6 to 3.7 Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(pip-prod)(deps): bump virtualenv from 20.25.1 to 20.25.3 Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.25.1 to 20.25.3. - [Release notes](https://github.com/pypa/virtualenv/releases) - [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst) - [Commits](https://github.com/pypa/virtualenv/compare/20.25.1...20.25.3) --- updated-dependencies: - dependency-name: virtualenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Add APM (#184) * Add APM * Fix unit tests * Remove apm.py * Add SonarCloud recommendations * SonarCloud python:S6890 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import sentry_sdk
|
|
from sentry_sdk.integrations.stdlib import StdlibIntegration
|
|
|
|
from webex_bot.webex_bot import WebexBot
|
|
|
|
from app.commands.exit import ExitCommand
|
|
from app.commands.submit_task import SubmitTaskCommand
|
|
from app.utils.config import config
|
|
|
|
|
|
if config.sentry_enabled:
|
|
apm = sentry_sdk.init(
|
|
dsn=config.sentry_dsn,
|
|
enable_tracing=True,
|
|
environment=config.environment,
|
|
integrations=[StdlibIntegration()],
|
|
spotlight=True
|
|
)
|
|
|
|
|
|
def create_bot() -> WebexBot:
|
|
"""Create and return a Webex Bot object."""
|
|
webex_bot: WebexBot = WebexBot(
|
|
bot_name=config.bot_name,
|
|
teams_bot_token=config.webex_token,
|
|
approved_domains=["cisco.com"],
|
|
)
|
|
webex_bot.commands.clear()
|
|
webex_bot.add_command(SubmitTaskCommand())
|
|
webex_bot.add_command(ExitCommand())
|
|
webex_bot.help_command = SubmitTaskCommand()
|
|
webex_bot.help_command.delete_previous_message = True
|
|
|
|
return webex_bot
|
|
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
bot: WebexBot = create_bot()
|
|
bot.run()
|
|
except KeyboardInterrupt:
|
|
print("Shutting down bot...")
|
|
exit()
|