Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
altlinux-packages-bot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Unitsaev
altlinux-packages-bot
Commits
c7ae622d
Verified
Commit
c7ae622d
authored
Aug 07, 2025
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all modules: fix errors
parent
673f3cf4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
9 deletions
+14
-9
bugs.py
src/handlers/bugs.py
+1
-1
ftbfs.py
src/handlers/ftbfs.py
+1
-1
news.py
src/handlers/news.py
+1
-1
statistics.py
src/handlers/statistics.py
+1
-1
watch.py
src/handlers/watch.py
+5
-5
utils.py
src/services/utils.py
+5
-0
No files found.
src/handlers/bugs.py
View file @
c7ae622d
...
...
@@ -22,7 +22,7 @@ async def bugs_handler(m: Message, user: User | None, maintainer: str | None = N
_maintainer
=
maintainer
.
lower
()
maintainer
=
DB
.
maintainer
.
get
(
_maintainer
)
if
not
maintainer
:
await
m
.
answer
(
f
"Сопровождающий
{_maintainer}
не найден."
)
await
m
.
answer
(
f
"Сопровождающий не найден."
)
return
else
:
if
user
:
...
...
src/handlers/ftbfs.py
View file @
c7ae622d
...
...
@@ -20,7 +20,7 @@ async def ftbfs_handler(m: Message, user: User | None, _maintainer: str | None =
if
not
_maintainer
and
not
any
(
_g
.
group
==
maintainer
for
_g
in
group_data
.
groups
)
and
not
maintainer
in
[
"@nobody"
]:
await
m
.
answer
(
f
"Сопровождающий или группа
{maintainer}
не найдены."
)
await
m
.
answer
(
f
"Сопровождающий или группа не найдены."
)
return
else
:
...
...
src/handlers/news.py
View file @
c7ae622d
...
...
@@ -15,7 +15,7 @@ dp = Dispatch()
"news"
,
Argument
(
"news_type"
,
optional
=
True
),
Argument
(
"translate"
,
optional
=
True
),
)
)
,
IsPrivate
()
)
@dp.callback_query
(
CallbackDataMarkup
(
"news/<news_type>/<translate:int>"
))
async
def
news_handler
(
...
...
src/handlers/statistics.py
View file @
c7ae622d
...
...
@@ -20,7 +20,7 @@ async def statistics_handler(m: Message, user: User | None, branch: str | None =
if
branch
:
branch
=
branch
.
strip
()
.
lower
()
if
branch
not
in
active_branches
:
await
m
.
answer
(
f
"Репозиторий
{branch}
не найден"
)
await
m
.
answer
(
f
"Репозиторий не найден"
)
return
else
:
if
user
:
...
...
src/handlers/watch.py
View file @
c7ae622d
from
telegrinder
import
Dispatch
,
Message
from
telegrinder.rules
import
Command
,
Argument
,
Text
,
Is
User
from
telegrinder.rules
import
Command
,
Argument
,
Text
,
Is
Private
from
telegrinder.tools.formatting
import
HTMLFormatter
from
altrepo
import
altrepo
...
...
@@ -7,7 +7,7 @@ from altrepo import altrepo
from
database.models
import
User
from
database.func
import
DB
from
data.keyboards
import
watch_keyboards
from
services.utils
import
_bold
from
services.utils
import
_bold
,
is_valid_str
dp
=
Dispatch
()
...
...
@@ -17,7 +17,7 @@ dp = Dispatch()
Argument
(
"maintainer"
,
optional
=
True
),
Argument
(
"acl"
,
optional
=
True
))
)
@dp.message
(
Text
([
"watch"
,
"отслеживание"
],
ignore_case
=
True
),
Is
User
())
@dp.message
(
Text
([
"watch"
,
"отслеживание"
],
ignore_case
=
True
),
Is
Private
())
async
def
watch_test_handler
(
m
:
Message
,
user
:
User
|
None
,
maintainer
:
str
|
None
=
None
,
acl
:
str
|
None
=
None
)
->
None
:
...
...
@@ -26,7 +26,7 @@ async def watch_test_handler(
maintainer
=
maintainer
.
lower
()
_maintainer
=
DB
.
maintainer
.
get
(
maintainer
)
if
not
_maintainer
:
await
m
.
answer
(
f
"Сопровождающий
{maintainer}
не найден."
)
await
m
.
answer
(
f
"Сопровождающий не найден."
)
return
else
:
if
user
:
...
...
@@ -34,7 +34,7 @@ async def watch_test_handler(
else
:
return
acl
=
acl
or
"by-acl"
acl
=
acl
if
is_valid_str
(
acl
)
else
"by-acl"
watch_data
=
await
altrepo
.
parser
.
packages
.
watch_by_maintainer
(
maintainer
,
acl
)
if
not
len
(
watch_data
):
...
...
src/services/utils.py
View file @
c7ae622d
...
...
@@ -2,6 +2,7 @@ from telegrinder.tools.formatting import HTMLFormatter, bold
import
asyncio
from
database.func
import
DB
import
re
async
def
_translate
(
text
):
...
...
@@ -53,3 +54,7 @@ def chunk_list(lst, size):
def
_bold
(
text
:
str
):
return
HTMLFormatter
(
bold
(
text
))
def
is_valid_str
(
name
:
str
)
->
bool
:
pattern
=
r"^[A-Za-z0-9@]+$"
return
re
.
fullmatch
(
pattern
,
name
)
is
not
None
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment