Skip to content

Commit 35cf9e6

Browse files
committed
Merge master
2 parents 5b401ec + f105813 commit 35cf9e6

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ jobs:
66
docs:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-python@v3
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
1111
- name: Install dependencies
1212
run: |
1313
pip install sphinx sphinx_rtd_theme
1414
- name: Sphinx build
1515
run: |
1616
sphinx-build -b html docs/source docs/build/html
1717
- name: Deploy
18-
uses: peaceiris/actions-gh-pages@v3
18+
uses: peaceiris/actions-gh-pages@v4
1919
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2020
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/testing' }}
2121
with:

.github/workflows/pythonapp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Set up Python 3.8
23-
uses: actions/setup-python@v1
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: 3.8
2626
- name: Install dependencies

bin/run_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
from pycamp_bot.commands import schedule
1414
from pycamp_bot.commands import announcements
1515
from pycamp_bot.commands import devtools
16+
from pycamp_bot.constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
1617
from pycamp_bot.models import models_db_connection
1718
from pycamp_bot.logger import logger
1819

1920

20-
SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'
2121
if SENTRY_DATA_SOURCE_NAME_ENVVAR in os.environ:
2222
sentry_sdk.init(dsn=os.environ[SENTRY_DATA_SOURCE_NAME_ENVVAR])
2323

src/pycamp_bot/commands/devtools.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import os
12
import subprocess
23
import sys
34

45
from telegram.ext import CommandHandler
56

7+
from pycamp_bot.constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
68
from pycamp_bot.utils import escape_markdown
79

810

@@ -28,6 +30,11 @@ async def show_version(update, context):
2830
for pip_line in pip_freeze.stdout.decode().splitlines():
2931
dependencies.append(escape_markdown(pip_line))
3032

33+
if SENTRY_DATA_SOURCE_NAME_ENVVAR in os.environ:
34+
sentry_envvar_set = '🟢'
35+
else:
36+
sentry_envvar_set = '🔴'
37+
3138
lines = [
3239
f'Commit deployado: `{commit}`',
3340
f'Fecha del commit \\(author date\\): `{escape_markdown(author_date)}`',
@@ -37,6 +44,7 @@ async def show_version(update, context):
3744
'```',
3845
*dependencies,
3946
'```',
47+
f'Variable de entorno de Sentry definida: {sentry_envvar_set}',
4048
]
4149

4250
await update.message.reply_text('\n'.join(lines), parse_mode='MarkdownV2')

src/pycamp_bot/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'

0 commit comments

Comments
 (0)