Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelfino committed Oct 5, 2024
2 parents c432cd0 + f105813 commit 9a73729
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
Expand All @@ -17,7 +17,7 @@ jobs:
run: |
sphinx-build -b html docs/source docs/build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/testing' }}
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion bin/run_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
from pycamp_bot.commands import schedule
from pycamp_bot.commands import announcements
from pycamp_bot.commands import devtools
from pycamp_bot.constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
from pycamp_bot.models import models_db_connection
from pycamp_bot.logger import logger


SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'
if SENTRY_DATA_SOURCE_NAME_ENVVAR in os.environ:
sentry_sdk.init(dsn=os.environ[SENTRY_DATA_SOURCE_NAME_ENVVAR])

Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions src/pycamp_bot/commands/devtools.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import subprocess
import sys

from telegram.ext import CommandHandler

from pycamp_bot.constants import SENTRY_DATA_SOURCE_NAME_ENVVAR
from pycamp_bot.utils import escape_markdown


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

if SENTRY_DATA_SOURCE_NAME_ENVVAR in os.environ:
sentry_envvar_set = '🟢'
else:
sentry_envvar_set = '🔴'

lines = [
f'Commit deployado: `{commit}`',
f'Fecha del commit \\(author date\\): `{escape_markdown(author_date)}`',
Expand All @@ -37,6 +44,7 @@ async def show_version(update, context):
'```',
*dependencies,
'```',
f'Variable de entorno de Sentry definida: {sentry_envvar_set}',
]

await update.message.reply_text('\n'.join(lines), parse_mode='MarkdownV2')
Expand Down
2 changes: 1 addition & 1 deletion src/pycamp_bot/commands/help_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/anunciar: te pide el nombre de un proyecto y pingea por privado a les \
interesades avisando que esta por empezar (solo para admins u owners del proyecto).
/su (passwrd): convierte al usuario en admin. Si sabe el password :P
/mostrar_version: te muestra qué versión del bot está corriendo y otros detalles
/mostrar\\_version: te muestra qué versión del bot está corriendo y otros detalles
/admins: lista a todos los admins.
/ayuda: esta ayuda.'''

Expand Down
1 change: 1 addition & 0 deletions src/pycamp_bot/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENTRY_DATA_SOURCE_NAME_ENVVAR = 'SENTRY_DATA_SOURCE_NAME'

0 comments on commit 9a73729

Please sign in to comment.