Skip to content

Commit 2e44362

Browse files
committed
Merge remote-tracking branch 'blueprint/dev' into dev
2 parents 8a7686f + 5a0449f commit 2e44362

File tree

11 files changed

+44
-26
lines changed

11 files changed

+44
-26
lines changed

.github/workflows/issue-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
lock:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: dessant/lock-threads@v2
11+
- uses: dessant/lock-threads@v3
1212
with:
1313
github-token: ${{ github.token }}
1414
issue-lock-inactive-days: 30

.github/workflows/py-dead-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
python-version: '3.8'
2121

2222
- name: "Cache pip"
23-
uses: actions/cache@v2.1.6
23+
uses: actions/cache@v2.1.7
2424
with:
2525
# This path is specific to Ubuntu
2626
path: ~/.cache/pip

.github/workflows/py-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
python-version: '3.8'
2929

3030
- name: "Cache pip"
31-
uses: actions/cache@v2.1.6
31+
uses: actions/cache@v2.1.7
3232
with:
3333
# This path is specific to Ubuntu
3434
path: ~/.cache/pip
@@ -77,7 +77,7 @@ jobs:
7777
python-version: ${{ matrix.python-version }}
7878

7979
- name: "Cache pip"
80-
uses: actions/cache@v2.1.6
80+
uses: actions/cache@v2.1.7
8181
with:
8282
# This path is specific to Ubuntu
8383
path: ~/.cache/pip

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
python-version: 3.9
6363

6464
- name: "Cache pip"
65-
uses: actions/cache@v2.1.6
65+
uses: actions/cache@v2.1.7
6666
with:
6767
# This path is specific to Ubuntu
6868
path: ~/.cache/pip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ See separate [license file](LICENSE.md) for full text.
335335

336336
[component]: https://github.com/Limych/ha-average
337337
[commits-shield]: https://img.shields.io/github/commit-activity/y/Limych/ha-average.svg?style=popout
338-
[commits]: https://github.com/Limych/ha-average/commits/master
338+
[commits]: https://github.com/Limych/ha-average/commits/dev
339339
[hacs-shield]: https://img.shields.io/badge/HACS-Default-orange.svg?style=popout
340340
[hacs]: https://hacs.xyz
341341
[exampleimg]: https://github.com/Limych/ha-average/raw/dev/example.png

bin/gen_releasenotes

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import logging
55
import os
66
import subprocess
77
from datetime import datetime
8-
from typing import List, Optional
8+
from typing import List, Optional, Tuple
99

1010
from awesomeversion.match import is_pep440
1111
from github import Github, GithubException, Repository, Tag
@@ -19,7 +19,7 @@ logging.basicConfig(level=logging.CRITICAL)
1919

2020
_LOGGER = logging.getLogger(__name__)
2121

22-
VERSION = "1.1.9"
22+
VERSION = "1.2.0"
2323

2424
ROOT = os.path.dirname(os.path.abspath(f"{__file__}/.."))
2525

@@ -28,6 +28,10 @@ BODY = """
2828
2929
{changes}
3030
31+
... and by bots:
32+
33+
{bot_changes}
34+
3135
## Links
3236
3337
- [If you like what I (@limych) do please consider sponsoring me on Patreon](https://www.patreon.com/join/limych?)
@@ -84,9 +88,11 @@ def get_period(repo: Repository, release: Optional[str] = None) -> List[datetime
8488
return list(reversed(data[-2:]))
8589

8690

87-
def gen_changes(repo: Repository, tag: Optional[str] = None) -> str:
91+
def gen_changes(repo: Repository, tag: Optional[str] = None) -> Tuple[str, str, str]:
8892
"""Generate list of commits."""
89-
changes = ""
93+
all_changes = ""
94+
human_changes = ""
95+
bot_changes = ""
9096
period = get_period(repo, tag)
9197
_LOGGER.debug("Period: %s", period)
9298

@@ -106,11 +112,21 @@ def gen_changes(repo: Repository, tag: Optional[str] = None) -> str:
106112
or "Fix errors" in msg
107113
):
108114
continue
109-
changes += CHANGE.format(
115+
116+
change = CHANGE.format(
110117
line=msg, link=commit.html_url, author=commit.author.login
111118
)
119+
all_changes += change
120+
if "[bot]" not in commit.author.login:
121+
human_changes += change
122+
else:
123+
bot_changes += change
112124

113-
return changes if changes != "" else NOCHANGE
125+
return (
126+
all_changes if all_changes != "" else NOCHANGE,
127+
human_changes if human_changes != "" else NOCHANGE,
128+
bot_changes if bot_changes != "" else NOCHANGE,
129+
)
114130

115131

116132
def _bump_release(release, bump_type):
@@ -199,7 +215,7 @@ def main():
199215
_LOGGER.debug("Repo: %s", arguments.repo)
200216
repo = github.get_repo(arguments.repo)
201217
if arguments.release is None:
202-
changes = gen_changes(repo)
218+
changes = gen_changes(repo)[0]
203219
_LOGGER.debug(changes)
204220
if changes != NOCHANGE:
205221
version = Version(get_release_tags(repo)[0].name.lstrip("v"))
@@ -218,10 +234,12 @@ def main():
218234
tag = arguments.release.replace("refs/tags/", "")
219235
_LOGGER.debug("Release tag: %s", tag)
220236
version = Version(tag)
237+
(_, human_changes, bot_changes) = gen_changes(repo, tag)
221238
msg = BODY.format(
222239
repo=arguments.repo,
223240
version=str(version),
224-
changes=gen_changes(repo, tag),
241+
changes=human_changes,
242+
bot_changes=bot_changes,
225243
)
226244
if arguments.dry_run:
227245
print("Is prerelease:", version.is_prerelease)

custom_components/average/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Base component constants
1010
NAME = "Average Sensor"
1111
DOMAIN = "average"
12-
VERSION = "2.2.0"
12+
VERSION = "2.2.1-alpha"
1313
ISSUE_URL = "https://github.com/Limych/ha-average/issues"
1414

1515
STARTUP_MESSAGE = f"""

custom_components/average/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "average",
33
"name": "Average Sensor",
4-
"version": "2.2.0",
4+
"version": "2.2.1-alpha",
55
"documentation": "https://github.com/Limych/ha-average",
66
"issue_tracker": "https://github.com/Limych/ha-average/issues",
77
"dependencies": [],

requirements-dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-r requirements-test.txt
2-
black==21.7b0
3-
packaging==21.0
4-
pre-commit~=2.14
5-
PyGithub~=1.54
6-
pyupgrade~=2.24
2+
black==21.12b0
3+
packaging==21.3
4+
pre-commit~=2.16
5+
PyGithub~=1.55
6+
pyupgrade~=2.31
77
yamllint~=1.26

requirements-test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
-r requirements.txt
22
asynctest~=0.13
3-
flake8~=3.9
3+
flake8~=4.0
44
flake8-docstrings~=1.6
5-
mypy==0.910
6-
pylint~=2.10
5+
mypy==0.930
6+
pylint~=2.12
77
pylint-strict-informational==0.1
88
pytest~=6.2
9-
pytest-cov~=2.10
9+
pytest-cov~=2.12
1010
pytest-homeassistant-custom-component>=0.4

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
homeassistant
1+
homeassistant>=2021.7

0 commit comments

Comments
 (0)