Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cfg.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ access_token = ""
app_client_id = ""
app_client_secret = ""

# Priority values above max_priority will be refused.
max_priority = 9001

[git]

# Use the local Git command. Required to use some advanced features. It also
Expand Down
12 changes: 10 additions & 2 deletions homu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,18 @@ def parse_commands(body, username, repo_cfg, state, my_username, db, states,
realtime, my_username):
continue
try:
state.priority = int(word[len('p='):])
pvalue = int(word[len('p='):])
except ValueError:
pass
continue

if pvalue > global_cfg['max_priority']:
if realtime:
state.add_comment(
':stop_sign: Priority higher than @{} is ignored.'
.format(global_cfg['max_priority'])
)
continue
state.priority = pvalue
state.save()

elif word.startswith('delegate='):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='homu',
version='0.2.0',
version='0.3.0',
author='Barosl Lee',
url='https://github.com/barosl/homu',
description=('A bot that integrates with GitHub '
Expand Down