Skip to content

Commit 7f918aa

Browse files
[Fix] Финальная проверка кода
1 parent e75fff5 commit 7f918aa

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/cicd_tests_on_push.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ jobs:
99
run_tests:
1010
runs-on: [ubuntu-latest]
1111
steps:
12-
# Чекаутим код
1312
- uses: actions/checkout@master
14-
# Устанавливаем python нужной версии
1513
- uses: actions/setup-python@v1
1614
with:
1715
python-version: '3.8'
1816
architecture: 'x64'
1917
- name: Install requirements
20-
# Устанавливаем зависимости
2118
run: pip install -r requirements.txt
2219
- name: Run tests
2320
run: coverage run tests.py

main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,15 @@ def get_issues_by_param(self, url: str, param: str):
115115
page = 1
116116
issues = []
117117
while True:
118-
tmp = AnalyseException.get_error_or_json(self.session.get(f'{url}state={param}&page={page}&per_page=1000'))
118+
tmp = AnalyseException.get_error_or_json(
119+
self.session.get(f'{url}state={param}&page={page}&per_page=1000'))
119120
if len(tmp) == 0:
120121
break
121122
issues += list(filter(
122-
lambda issue: self.end > GitHubAnalyzer.get_input_date_by_format(issue['created_at']), tmp
123+
lambda issue: GitHubAnalyzer.compare_dates(
124+
self.end, GitHubAnalyzer.get_input_date_by_format(issue['created_at']),
125+
lambda d1, d2: d1 > d2
126+
), tmp
123127
))
124128
page += 1
125129
return issues

0 commit comments

Comments
 (0)