Skip to content

Commit 9a73729

Browse files
committed
Merge master
2 parents c432cd0 + f105813 commit 9a73729

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ 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
with:
1212
python-version: '3.10'
1313
- name: Install dependencies
@@ -17,7 +17,7 @@ jobs:
1717
run: |
1818
sphinx-build -b html docs/source docs/build/html
1919
- name: Deploy
20-
uses: peaceiris/actions-gh-pages@v3
20+
uses: peaceiris/actions-gh-pages@v4
2121
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2222
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/testing' }}
2323
with:

.github/workflows/pythonapp.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ 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.10
23-
uses: actions/setup-python@v1
23+
uses: actions/setup-python@v5
2424
with:
25-
python-version: '3.10'
25+
python-version: 3.10
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip

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/commands/help_msg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/anunciar: te pide el nombre de un proyecto y pingea por privado a les \
1717
interesades avisando que esta por empezar (solo para admins u owners del proyecto).
1818
/su (passwrd): convierte al usuario en admin. Si sabe el password :P
19-
/mostrar_version: te muestra qué versión del bot está corriendo y otros detalles
19+
/mostrar\\_version: te muestra qué versión del bot está corriendo y otros detalles
2020
/admins: lista a todos los admins.
2121
/ayuda: esta ayuda.'''
2222

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)