Skip to content

Commit 61154ee

Browse files
feat: add date in theme message
1 parent 390b7da commit 61154ee

2 files changed

Lines changed: 31 additions & 9 deletions

File tree

.github/workflows/linter_pull_request.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,35 @@ jobs:
88
lint:
99
name: Linter pull request
1010
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: .
1114
steps:
1215
- name: Checkout Code
1316
uses: actions/checkout@v3
1417
with:
1518
fetch-depth: 0
19+
- name: Install Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.10'
23+
check-latest: true
24+
- name: Setup Poetry
25+
uses: Gr1N/setup-poetry@v7
26+
- name: Install dependencies
27+
run: poetry install
1628
- name: Lint python code
17-
uses: github/super-linter@v4
18-
env:
19-
VALIDATE_ALL_CODEBASE: false
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
DEFAULT_BRANCH: main
22-
PYTHON_FLAKE8_CONFIG_FILE: .flake8
23-
VALIDATE_PYTHON_FLAKE8: true
29+
run: poetry run flake8
30+
# steps:
31+
# - name: Checkout Code
32+
# uses: actions/checkout@v3
33+
# with:
34+
# fetch-depth: 0
35+
# - name: Lint python code
36+
# uses: github/super-linter@v4
37+
# env:
38+
# VALIDATE_ALL_CODEBASE: false
39+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
# DEFAULT_BRANCH: main
41+
# PYTHON_FLAKE8_CONFIG_FILE: .flake8
42+
# VALIDATE_PYTHON_FLAKE8: true

services/send_email.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from email.mime.text import MIMEText
77

88

9-
async def generate_message(
10-
login: str,
9+
async def generate_message(login: str,
1110
password: str,
1211
sender: str,
1312
receivers: str,
@@ -17,6 +16,10 @@ async def generate_message(
1716
site_name: str
1817
) -> None:
1918
"""Функция оформления письма и прикрепление файла для отправки на почту."""
19+
20+
21+
22+
2023
current_date = (date.today() - timedelta(days=1)).strftime('%d-%m-%Y')
2124
message = MIMEMultipart()
2225
message['Subject'] = 'Отчет о состоянии IT-инфраструктуры и результатах ' \

0 commit comments

Comments
 (0)