gha-utils 4.4.3__py3-none-any.whl → 4.4.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gha-utils might be problematic. Click here for more details.

gha_utils/__init__.py CHANGED
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.4.3"
20
+ __version__ = "4.4.4"
gha_utils/changelog.py CHANGED
@@ -108,18 +108,19 @@ class Changelog:
108
108
 
109
109
  assert current_version in self.content
110
110
 
111
- # Analyse the current changelog.
111
+ # Extract parts of the changelog or set default values.
112
112
  SECTION_START = "##"
113
- changelog_header, last_entry, past_entries = self.content.split(
114
- SECTION_START, 2
115
- )
113
+ sections = self.content.split(SECTION_START, 2)
114
+ changelog_header = sections[0] if len(sections) > 0 else "# Changelog\n\n"
115
+ recent_entry = sections[1] if len(sections) > 1 else ""
116
+ past_entries = sections[2] if len(sections) > 2 else ""
116
117
 
117
118
  # Derive the release template from the last entry.
118
119
  DATE_REGEX = r"\d{4}\-\d{2}\-\d{2}"
119
120
  VERSION_REGEX = r"\d+\.\d+\.\d+"
120
121
 
121
122
  # Replace the release date with the unreleased tag.
122
- new_entry = re.sub(DATE_REGEX, "unreleased", last_entry, count=1)
123
+ new_entry = re.sub(DATE_REGEX, "unreleased", recent_entry, count=1)
123
124
 
124
125
  # Update GitHub's comparison URL to target the main branch.
125
126
  new_entry = re.sub(
@@ -135,7 +136,7 @@ class Changelog:
135
136
  new_entry = re.sub(
136
137
  r"\n\n.*",
137
138
  "\n\n"
138
- "> \[!IMPORTANT\]\n"
139
+ "> \\[!IMPORTANT\\]\n"
139
140
  "> This version is not released yet and is under active development.\n\n",
140
141
  new_entry,
141
142
  flags=re.MULTILINE | re.DOTALL,
@@ -143,7 +144,7 @@ class Changelog:
143
144
 
144
145
  # Prefix entries with section marker.
145
146
  new_entry = f"{SECTION_START}{new_entry}"
146
- history = f"{SECTION_START}{last_entry}{SECTION_START}{past_entries}"
147
+ history = f"{SECTION_START}{recent_entry}{SECTION_START}{past_entries}"
147
148
 
148
149
  logging.info("New generated section:\n" + indent(new_entry, " " * 2))
149
150
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gha-utils
3
- Version: 4.4.3
3
+ Version: 4.4.4
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -0,0 +1,12 @@
1
+ gha_utils/__init__.py,sha256=Gzv8vN-2C0Lt_D26eXbiTv2JcMNyjgKeKUIQ5bfAADU,865
2
+ gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
+ gha_utils/changelog.py,sha256=KuM323SslStwh25fuEiom39t1kfcgwxHAwi6KNy0Lhk,5959
4
+ gha_utils/cli.py,sha256=4wUG29fB0-Z-n105UBgIg5NLuqtODtoMLwKJP7RQFXo,9150
5
+ gha_utils/mailmap.py,sha256=sum4XIme2Dis7XtHyO9U7ogWelZwqb-yvJ5I92PPnqg,6301
6
+ gha_utils/metadata.py,sha256=d7s3_wlWweIxvv5xvtnKg_ohqojRF8eVBR2U5PxHUlA,47224
7
+ gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ gha_utils-4.4.4.dist-info/METADATA,sha256=ZA24vs3J4Vwl85DYgEnMR5pot9WDivMKupQ0dNiffXA,17996
9
+ gha_utils-4.4.4.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
10
+ gha_utils-4.4.4.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
11
+ gha_utils-4.4.4.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
12
+ gha_utils-4.4.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,12 +0,0 @@
1
- gha_utils/__init__.py,sha256=5R49OuzeLrQxav8AF7EpYdaLxVoP28wslS_6asdPM40,865
2
- gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
- gha_utils/changelog.py,sha256=EK0uz8IJidYrWoxoSWutoQ5_g3bdsGrKgOitVCiAXw4,5775
4
- gha_utils/cli.py,sha256=4wUG29fB0-Z-n105UBgIg5NLuqtODtoMLwKJP7RQFXo,9150
5
- gha_utils/mailmap.py,sha256=sum4XIme2Dis7XtHyO9U7ogWelZwqb-yvJ5I92PPnqg,6301
6
- gha_utils/metadata.py,sha256=d7s3_wlWweIxvv5xvtnKg_ohqojRF8eVBR2U5PxHUlA,47224
7
- gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- gha_utils-4.4.3.dist-info/METADATA,sha256=O3wSpn-eqJ2aqlMRA7r8iylfIEqgKu7Qx7_dt2GpFYE,17996
9
- gha_utils-4.4.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
10
- gha_utils-4.4.3.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
11
- gha_utils-4.4.3.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
12
- gha_utils-4.4.3.dist-info/RECORD,,