Skip to content

Commit f26f464

Browse files
skirpichevhugovkAA-Turner
authored
Add docs label for markdown files (#657)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 494d3de commit f26f464

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bedevere/prtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def classify_by_filepaths(gh, pull_request, filenames):
4343
if util.is_news_dir(filename):
4444
news = True
4545
filepath = pathlib.PurePath(filename)
46-
if filepath.suffix == ".rst" or filepath.name == ".nitignore":
46+
if filepath.suffix in {".md", ".rst"} or filepath.name == ".nitignore":
4747
docs = True
4848
elif filepath.name.startswith(("test_", "_test")):
4949
tests = True

tests/test_prtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def test_news_only():
6666

6767

6868
async def test_docs_no_news():
69-
filenames = {"path/to/docs1.rst"}
69+
filenames = {"path/to/docs1.rst", "other/path/to/docs2.md"}
7070
issue = {"labels": [], "labels_url": "https://api.github.com/some/label"}
7171
gh = FakeGH(getitem=issue)
7272
event_data = {

0 commit comments

Comments
 (0)