Skip to content

Commit fbd5ad8

Browse files
committed
Fixing GHA workflow
1 parent 641bdb9 commit fbd5ad8

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/require_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
pip install --upgrade pip
2929
pip install -r requirements.txt
3030
- name: Check if changelog entry file was added in this PR
31-
run: python scripts/release/check_changelog.py --base-sha "$BASE_SHA" --fail-on-no-changes $FAIL_ON_NO_CHANGES
31+
run: python -m scripts.release.check_changelog --base-sha "$BASE_SHA" --fail-on-no-changes $FAIL_ON_NO_CHANGES
3232
env:
3333
BASE_SHA: ${{ github.event.pull_request.base.sha }}
3434
FAIL_ON_NO_CHANGES: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }}

scripts/release/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Makes 'release' a Python package.

scripts/release/changelog_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22
import unittest
33

4-
from changelog import (
4+
from scripts.release.changelog import (
55
MAX_TITLE_LENGTH,
66
ChangeKind,
77
extract_changelog_entry_from_contents,

scripts/release/check_changelog.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55

66
from scripts.release.changelog import DEFAULT_CHANGELOG_PATH, get_changelog_entries
77

8+
89
def str2bool(v):
910
if isinstance(v, bool):
1011
return v
11-
if v.lower() in ('yes', 'true', 't', 'y', '1'):
12+
if v.lower() in ("yes", "true", "t", "y", "1"):
1213
return True
13-
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
14+
elif v.lower() in ("no", "false", "f", "n", "0"):
1415
return False
1516
else:
16-
raise argparse.ArgumentTypeError('Boolean value expected.')
17+
raise argparse.ArgumentTypeError("Boolean value expected.")
18+
1719

1820
if __name__ == "__main__":
1921
parser = argparse.ArgumentParser(
@@ -54,8 +56,7 @@ def str2bool(v):
5456
metavar="",
5557
action="store",
5658
type=str2bool,
57-
nargs='?',
58-
const=True,
59+
nargs="?",
5960
help="Fail if no changelog entries are found. Default is True.",
6061
)
6162
args = parser.parse_args()

0 commit comments

Comments
 (0)