mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
backport_pr: add doc tests for _get_labels()
This commit is contained in:
parent
ac60154157
commit
292c5dd730
8
dist/tools/backport_pr/backport_pr.py
vendored
8
dist/tools/backport_pr/backport_pr.py
vendored
@ -33,6 +33,14 @@ BACKPORT_BRANCH = 'backport/{release}/{origbranch}'
|
||||
|
||||
|
||||
def _get_labels(pr):
|
||||
"""
|
||||
>>> _get_labels({'labels': [{'name': 'test'}, {'name': 'abcd'}]})
|
||||
['Process: release backport', 'abcd', 'test']
|
||||
>>> _get_labels({'labels': [{'name': 'Process: release backport'}]})
|
||||
['Process: release backport']
|
||||
>>> _get_labels({'labels': [{'name': 'Process: needs backport'}]})
|
||||
['Process: release backport']
|
||||
"""
|
||||
labels = {label['name'] for label in pr['labels']}
|
||||
for remove in LABELS_REMOVE:
|
||||
labels.discard(remove)
|
||||
|
Loading…
Reference in New Issue
Block a user