Skip to content

Commit

Permalink
✨ Make change notes ignoring label customizable
Browse files Browse the repository at this point in the history
This patch will allow the end users to set their own label name for
letting the bot ignore missing changelog fragments in PRs.

Ref: #12.
  • Loading branch information
webknjaz committed Mar 9, 2023
1 parent cc5c4c7 commit c2377a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ exclude:
humans:
- pyup-bot

labels:
skip-changelog: skip news # default: `bot:chronographer:skip`

...
```

Expand Down
5 changes: 4 additions & 1 deletion chronographer/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ async def on_pr(event):
{external_docs_url!s}
"""

if LABEL_SKIP in pr_labels:
labels_config = repo_config.get('labels', {})
repo_skip_label = labels_config.get('skip-changelog', LABEL_SKIP)

if repo_skip_label in pr_labels:
logger.info(
'Skipping PR event because the `%s` label is present',
LABEL_SKIP,
Expand Down

0 comments on commit c2377a7

Please sign in to comment.