Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
maubot-rt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isgphys
maubot-rt
Commits
1feefd19
Commit
1feefd19
authored
5 years ago
by
Sven Mäder
Browse files
Options
Downloads
Patches
Plain Diff
Use str parser for ticket number
parent
4a250bd6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rt.py
+6
-6
6 additions, 6 deletions
rt.py
with
6 additions
and
6 deletions
rt.py
+
6
−
6
View file @
1feefd19
...
...
@@ -124,7 +124,7 @@ class RT(Plugin):
pass
@rt.subcommand
(
"
properties
"
,
aliases
=
(
"
p
"
,
"
prop
"
),
help
=
"
Show all ticket properties.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
properties
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
@@ -136,7 +136,7 @@ class RT(Plugin):
await
evt
.
respond
(
markdown
)
@rt.subcommand
(
"
resolve
"
,
aliases
=
(
"
r
"
,
"
res
"
),
help
=
"
Mark the ticket as resolved.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
resolve
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
@@ -146,7 +146,7 @@ class RT(Plugin):
await
evt
.
respond
(
'
{} resolved
'
.
format
(
markdown_link
))
@rt.subcommand
(
"
open
"
,
aliases
=
(
"
o
"
,
"
op
"
),
help
=
"
Mark the ticket as open.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
open
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
@@ -156,7 +156,7 @@ class RT(Plugin):
await
evt
.
respond
(
'
{} opened
'
.
format
(
markdown_link
))
@rt.subcommand
(
"
stall
"
,
aliases
=
(
"
st
"
,
"
sta
"
),
help
=
"
Mark the ticket as stalled.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
stall
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
@@ -166,7 +166,7 @@ class RT(Plugin):
await
evt
.
respond
(
'
{} stalled
'
.
format
(
markdown_link
))
@rt.subcommand
(
"
delete
"
,
aliases
=
(
"
d
"
,
"
del
"
),
help
=
"
Mark the ticket as deleted.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
delete
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
@@ -194,7 +194,7 @@ class RT(Plugin):
await
evt
.
respond
(
'
{} comment added
'
.
format
(
markdown_link
))
@rt.subcommand
(
"
history
"
,
aliases
=
(
"
h
"
,
"
hist
"
),
help
=
"
Get a list of all history entries.
"
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
ss_raw
=
True
)
@command.argument
(
"
number
"
,
"
ticket number
"
,
pa
rser
=
str
)
async
def
history
(
self
,
evt
:
MessageEvent
,
number
:
str
)
->
None
:
if
not
await
self
.
can_manage
(
evt
)
or
not
self
.
is_valid_number
(
number
):
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment