Skip to content

Commit

Permalink
Clean up check-news.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj authored Sep 19, 2024
1 parent c62e49d commit e5c5086
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/check-news.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
def check_news_file(pr: PullRequest.PullRequest):
# Get the list of files changed in the PR
changed_files = pr.get_files()
pattern = 'news/*.rst'
for file in changed_files:
if file.status == 'added' and file.filename.startswith('news/'):
if (
file.status == 'added' and
fnmatch(file.filename, pattern)
):
return True
return False

Expand Down

0 comments on commit e5c5086

Please sign in to comment.