Skip to content

Commit c6ac610

Browse files
authored
Relax command rules to allow add and remove to run on closed issue (#75)
1 parent fe6ad7c commit c6ac610

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.6.0
4+
5+
- **NEW**: Bot should allow `add` and `remove` commands in issue comments to modify labels even if the issue is closed.
6+
37
## 1.5.0
48

59
- **NEW**: New command added called `retrigger-local` which will force a pull request retrigger to use the configuration

label_bot/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from . import triage_labels
1515
from . import commands
1616
from . import util
17-
__version__ = '1.5.0'
17+
__version__ = '1.6.0'
1818

1919
router = routing.Router()
2020
routes = web.RouteTableDef()

label_bot/commands.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@ async def command_lgtm(event, gh):
110110
async def command_add_remove(event, gh, labels, remove=False):
111111
"""Handle "looks good to me" command."""
112112

113-
if (
114-
('issue' in event.data and event.data['issue']['state'] != 'open') or
115-
('pull_request' in event.data and event.data['pull_request']['state'] != 'open')
116-
):
117-
return None
118-
119113
valid_labels = []
120114
for item in labels.split(','):
121115
item = item.strip()

0 commit comments

Comments
 (0)