diff --git a/.bumpversion.cfg b/.bumpversion.cfg index cbcd356..25ad46d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.1.14 +current_version = 1.1.15 commit = True tag = False diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 447d0a1..e6a6ed2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -85,14 +85,17 @@ repos: always_run: true pass_filenames: false language: system + stages: [pre-commit] - id: generate-changelog name: generate-changelog entry: python generate_changelog/main.py --log-level=INFO always_run: true pass_filenames: false language: system + stages: [pre-commit] - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 hooks: - id: prettier files: \.(markdown|md)$ + stages: [pre-commit] diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ea3fd..ca6d961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,152 @@ -## [1.0.8] - 2024-10-27 +## [1.1.14] - 2025-04-06 + +### Bug Fixes + +- **core**: deps update (`patch candidate`) + +### Other Changes + +- deps: update setuptools requirement from ^75.2.0 to ^78.1.0 (#64) +- deps: update isort requirement from ^5.12.0 to ^6.0.1 (#61) +- deps: update certifi requirement from ^2024.8.30 to ^2025.1.31 (#60) +- deps: update black requirement from ^24.3.0 to ^25.1.0 (#59) +- deps: update setuptools requirement from ^75.2.0 to ^78.1.0 +- deps: update isort requirement from ^5.12.0 to ^6.0.1 +- deps: update certifi requirement from ^2024.8.30 to ^2025.1.31 +- deps: update black requirement from ^24.3.0 to ^25.1.0 + +## [1.1.13] - 2025-01-07 + +### Documentation + +- **core**: bump year version (`patch candidate`) + +## [1.1.12] - 2025-01-07 + +### Documentation + +- **core**: bump year version (`patch candidate`) + +### Chores + +- **core**: bump year version (`patch candidate`) + +## [1.1.10] - 2024-11-07 + +### Styles + +- **core**: fixed md files (`patch candidate`) +- **core**: fixed license +- **core**: fixed license +- **core**: fixed license +- **core**: fixed readme +- **core**: fixed readme and license + +### Other Changes + +- deps: update pytest-cov requirement from ^5.0.0 to ^6.0.0 (#45) +- deps: update pytest-cov requirement from ^5.0.0 to ^6.0.0 + +## [1.1.9] - 2024-10-29 + +### Features + +- **core**: added crypto controller (`patch candidate`) +- **core**: added crypto controller times on debug +- **core**: added crypto controller validation status and timestamp +- **core**: added status verify on crypto controller + +### Bug Fixes + +- **core**: fixed crypto controller logging levels +- **core**: fixed crypto controller expiration years + +### Styles + +- **core**: fixed crypto_controller readme +- **core**: fixed crypto_controller readme +- **core**: visual changes on readme, local env + +## [1.1.8] - 2024-10-27 + +### Styles + +- **core**: added kofi (`patch candidate`) + +## [1.1.7] - 2024-10-27 + +### Features + +- **core**: refactored init security config script (`patch candidate`) + +## [1.1.6] - 2024-10-27 + +### Features + +- **core**: icons parse (`patch candidate`) +- **core**: icons parse (`patch candidate`) +- **core**: icons parse (`patch candidate`) +- **core**: icons parse (`patch candidate`) + +## [1.1.2] - 2024-10-27 + +### Features + +- **core**: fix commit icons and commit regex validation (`patch candidate`) +- **core**: added commit icons and commit regex validation (`minor candidate`) + +### Bug Fixes + +- **core**: fix commit icons and commit regex validation (`patch candidate`) + +### Chores + +- **core**: test icons +- **core**: test icons +- **core**: test icons (`patch candidate`) +- **core**: test icons (`patch candidate`) +- **core**: test icons +- **core**: test icons flow + +## [1.0.17] - 2024-10-27 + +### Chores + +- **core**: test icons flow (`patch candidate`) +- **core**: test version controller (`patch candidate`) + +## [1.0.13] - 2024-10-27 + +### Chores + +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **core**: test bump commit msg version (`patch candidate`) +- **style**: test bump version msg (`patch candidate`) +- **style**: test bump version msg (`patch candidate`) +- **style**: test bump version msg (`patch candidate`) + +### Other Changes + +- 🔧 chore(core): test bump commit msg version [patch candidate] + +## [1.0.10] - 2024-10-26 + +### Chores + +- **style**: fixed bump year flow (`patch candidate`) +- **style**: fixed bump year flow (`patch candidate`) +- **core**: added crypto controller + +## [1.0.8] - 2024-10-23 ### Styles @@ -6,15 +154,11 @@ ### Other Changes -- from prod - from test - from dev - Bump version: 1.0.7 → 1.0.8 into test (#11)Automatically created pull request for release v1.0.8-dev into testbranch. into prod (#12)Automatically created pull request for release v1.0.8-test into prodbranch. into main (#13) -- from test - from dev - Bump version: 1.0.7 → 1.0.8 into test (#11)Automatically created pull request for release v1.0.8-dev into testbranch. into prod (#12) -- from dev - Bump version: 1.0.7 → 1.0.8 into test (#11) -- Bump version: 1.0.7 → 1.0.8 - Update CNAME - Update CNAME - Create CNAME -## [1.0.7] - 2024-10-27 +## [1.0.7] - 2024-10-23 ### Styles @@ -23,56 +167,24 @@ - **core**: fixed confs (`patch candidate`) - **core**: fixed confs (`patch candidate`) -### Other Changes - -- from prod - from test - from dev - Bump version: 1.0.6 → 1.0.7 into test (#8)Automatically created pull request for release v1.0.7-dev into testbranch. into prod (#9)Automatically created pull request for release v1.0.7-test into prodbranch. into main (#10) -- from test - from dev - Bump version: 1.0.6 → 1.0.7 into test (#8)Automatically created pull request for release v1.0.7-dev into testbranch. into prod (#9) -- from dev - Bump version: 1.0.6 → 1.0.7 into test (#8) -- Bump version: 1.0.6 → 1.0.7 -- Bump version: 1.0.5 → 1.0.6 -- Bump version: 1.0.4 → 1.0.5 -- Bump version: 1.0.3 → 1.0.4 - -## [1.0.3] - 2024-10-27 +## [1.0.3] - 2024-10-23 ### Styles - **core**: added readme file (`patch candidate`) - **core**: added readme file (`patch candidate`) +- **core**: added readme file -### Other Changes - -- from prod - from test - from dev - Bump version: 1.0.2 → 1.0.3 into test (#5)Automatically created pull request for release v1.0.3-dev into testbranch. into prod (#6)Automatically created pull request for release v1.0.3-test into prodbranch. into main (#7) -- from test - from dev - Bump version: 1.0.2 → 1.0.3 into test (#5)Automatically created pull request for release v1.0.3-dev into testbranch. into prod (#6) -- from dev - Bump version: 1.0.2 → 1.0.3 into test (#5) -- Bump version: 1.0.2 → 1.0.3 -- Bump version: 1.0.1 → 1.0.2 -- style(core): added readme file - -## [1.0.1] - 2024-10-27 +## [1.0.1] - 2024-10-23 ### Features - **core**: add cicd flows (`patch candidate`) +- **core**: fix cicd flows +- **core**: added cicd flows +- added scripts ### Other Changes -- from prod - from test - from dev - Bump version: 1.0.0 → 1.0.1 into test (#1)Automatically created pull request for release v1.0.1-dev into testbranch. into prod (#2)Automatically created pull request for release v1.0.1-test into prodbranch. into main (#3) -- from test - from dev - Bump version: 1.0.0 → 1.0.1 into test (#1)Automatically created pull request for release v1.0.1-dev into testbranch. into prod (#2) -- from dev - Bump version: 1.0.0 → 1.0.1 into test (#1) -- Bump version: 1.0.0 → 1.0.1 -- feat(core): fix cicd flows -- feat(core): added cicd flows - rebased scripts -- feat: added scripts - Initial commit - -## [Unreleased] - 2024-10-27 - -### Chores - -- **style**: fixed bump year flow (`patch candidate`) - -### Other Changes - -- chore(core): added crypto controller diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c982269..6ca4089 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -37,4 +37,4 @@ This code of conduct is adapted from the [Contributor Covenant, version 2.0](htt ## 📜 License -2025 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. +2026 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5be00b4..b0ee211 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,4 +50,4 @@ Thank you for helping improve! ## 📜 License -2025 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. +2026 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. diff --git a/LICENSE b/LICENSE index d52b2cf..ddfbb92 100644 --- a/LICENSE +++ b/LICENSE @@ -530,7 +530,7 @@ modification follow. conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, - or that patent license was granted, prior to 28 March 2025. + or that patent license was granted, prior to 28 March 2026. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may @@ -631,7 +631,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. CICD Core Scripts - Copyright (C) 2025 Na0nh + Copyright (C) 2026 Na0nh This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - scripts Copyright (C) 2025 Na0nh + scripts Copyright (C) 2026 Na0nh This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c` for details. diff --git a/README.md b/README.md index 13aa934..fc55686 100644 --- a/README.md +++ b/README.md @@ -147,4 +147,4 @@ For any inquiries or support, please open an issue or contact [r6ty5r296it6tl4eg ## 📜 License -2025 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. +2026 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. diff --git a/SECURITY.md b/SECURITY.md index 5fec0ab..b428363 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -29,7 +29,6 @@ If you discover a security vulnerability within this project, please follow thes 1. **Do not create a public issue.** Instead, contact us directly to responsibly disclose the vulnerability. 2. **Email** [r6ty5r296it6tl4eg5m.constant214@passinbox.com](mailto:r6ty5r296it6tl4eg5m.constant214@passinbox.com) with the following information: - - A description of the vulnerability. - Steps to reproduce the issue. - Any potential impact or severity. @@ -47,4 +46,4 @@ Thank you for helping us keep this project secure! ## 📜 License -2025 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. +2026 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. diff --git a/VERSIONING.md b/VERSIONING.md index c0e88b2..0e752f9 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -61,7 +61,6 @@ Examples: ## 🚀 Release Process 1. Development Phase: - - Developers work on features and bug fixes in the `dev` branch. - Commit messages should follow the guidelines above to indicate the type of changes. @@ -74,7 +73,6 @@ Examples: Final testing and validation occur here before deployment. 4. Release: - - Changes from `prod` are merged into `main`. - A release is tagged, and the `CHANGELOG.md` is updated automatically based on commit messages. @@ -89,4 +87,4 @@ Examples: ## 📜 License -2025 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. +2026 - This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the [LICENSE](LICENSE) file included in this repository. diff --git a/generate_changelog/main.py b/generate_changelog/main.py index 0dd9825..2f14c2e 100644 --- a/generate_changelog/main.py +++ b/generate_changelog/main.py @@ -27,12 +27,22 @@ # Define the commit message regex pattern # Example: feat(authentication): add OAuth2 support [minor candidate] +# The versioning keyword is now optional to match commits without it COMMIT_REGEX = re.compile( r"^(?Pfeat|fix|docs|style|refactor|perf|test|chore)" - r"(?:\((?P[^)]+)\))?:\s+(?P.+?)\s+\[(?Pminor candidate|major candidate|patch candidate)]$", + r"(?:\((?P[^)]+)\))?:\s+(?P.+?)" + r"(?:\s+\[(?Pminor candidate|major candidate|patch candidate)])?$", re.IGNORECASE, ) +# Patterns to filter out noise commits from changelog +NOISE_PATTERNS = [ + re.compile(r"Bump version:", re.IGNORECASE), + re.compile(r"^Merge branch", re.IGNORECASE), + re.compile(r"^Merge pull request", re.IGNORECASE), + re.compile(r"from \w+ - from \w+", re.IGNORECASE), +] + # Mapping of commit types to changelog sections TYPE_MAPPING = { "feat": "### Features", @@ -165,6 +175,47 @@ def compare_versions(v1: str, v2: str) -> int: return 0 +def is_noise_commit(commit: str) -> bool: + """ + Checks if a commit message is noise that should be filtered out. + + Args: + commit (str): The commit message. + + Returns: + bool: True if the commit should be filtered out. + """ + for pattern in NOISE_PATTERNS: + if pattern.search(commit): + return True + return False + + +def get_tag_date(tag: str) -> str: + """ + Retrieves the date of a Git tag. + + Args: + tag (str): The Git tag name. + + Returns: + str: The date in YYYY-MM-DD format. + """ + try: + date_str = ( + subprocess.check_output( + ["git", "log", "-1", "--format=%ai", tag], + encoding="utf-8", + ) + .strip() + .split(" ")[0] + ) + return date_str + except subprocess.CalledProcessError: + logger.warning(f"Could not get date for tag {tag}, using today's date.") + return datetime.now(timezone.utc).strftime("%Y-%m-%d") + + def get_sorted_tags() -> List[str]: """ Retrieves all semantic Git tags and sorts them in ascending order. @@ -279,23 +330,9 @@ def get_all_commits(tags: List[str]) -> Dict[str, List[str]]: """ commits_dict = OrderedDict() - # Handle commits after the latest tag (Unreleased) - if tags: - latest_tag = tags[-1] # Last tag is the latest - try: - commit_range = f"{latest_tag}..HEAD" - logger.debug(f"Retrieving commits after the latest tag: {latest_tag}") - unreleased_commits = ( - subprocess.check_output(["git", "log", commit_range, "--pretty=format:%s"]) - .decode() - .split("\n") - ) - unreleased_commits = [commit.strip() for commit in unreleased_commits if commit.strip()] - if unreleased_commits: - commits_dict["Unreleased"] = unreleased_commits - logger.info(f"Number of unreleased commits: {len(unreleased_commits)}") - except subprocess.CalledProcessError as error: - logger.error(f"Error retrieving unreleased commits: {error}") + # Only include tagged versions in the changelog. + # Unreleased commits are excluded to keep the changelog stable + # and avoid conflicts with pre-push hooks that amend commits. # Process sorted_tags in ascending order previous_tag = None @@ -311,6 +348,23 @@ def get_all_commits(tags: List[str]) -> Dict[str, List[str]]: return commits_dict +def get_tag_dates(tags: List[str]) -> Dict[str, str]: + """ + Retrieves dates for all tags. + + Args: + tags (List[str]): A list of Git tags. + + Returns: + Dict[str, str]: A mapping of version (without 'v') to date string. + """ + dates = {} + for tag in tags: + dates[tag.lstrip("v")] = get_tag_date(tag) + dates["Unreleased"] = datetime.now(timezone.utc).strftime("%Y-%m-%d") + return dates + + def parse_commits(commits: List[str]) -> Tuple[Dict[str, List[str]], List[str]]: """ Parses commit messages and categorizes them based on type. @@ -325,27 +379,41 @@ def parse_commits(commits: List[str]) -> Tuple[Dict[str, List[str]], List[str]]: non_conforming_commits: List[str] = [] for commit in commits: - match = COMMIT_REGEX.match(commit) + # Skip noise commits + if is_noise_commit(commit): + logger.debug(f"Skipping noise commit: {commit}") + continue + + # Strip leading emoji + space if present (e.g. "✨ feat(core): ...") + clean_commit = re.sub( + r"^[\U0001f300-\U0001faff\u2600-\u27bf\u2702-\u27b0♻️⚡️]\s*", "", commit + ) + + match = COMMIT_REGEX.match(clean_commit) if match: commit_type = match.group("type").lower() scope = match.group("scope") description = match.group("description").strip() - versioning_keyword = match.group("versioning_keyword").lower() + versioning_keyword = match.group("versioning_keyword") section = TYPE_MAPPING.get(commit_type) if section: + if versioning_keyword: + keyword_str = f" (`{versioning_keyword.lower()}`)" + else: + keyword_str = "" if scope: - entry = f"- **{scope}**: {description} (`{versioning_keyword}`)" + entry = f"- **{scope}**: {description}{keyword_str}" else: - entry = f"- {description} (`{versioning_keyword}`)" + entry = f"- {description}{keyword_str}" changelog[section].append(entry) logger.debug(f"Commit categorized under {section}: {entry}") else: - non_conforming_commits.append(commit) + non_conforming_commits.append(clean_commit) logger.debug(f"Commit type '{commit_type}' not recognized.") else: - non_conforming_commits.append(commit) - logger.debug(f"Commit does not match pattern: {commit}") + non_conforming_commits.append(clean_commit) + logger.debug(f"Commit does not match pattern: {clean_commit}") # Remove empty sections changelog = {k: v for k, v in changelog.items() if v} @@ -355,7 +423,10 @@ def parse_commits(commits: List[str]) -> Tuple[Dict[str, List[str]], List[str]]: def generate_changelog_entry( - version: str, changelog: Dict[str, List[str]], non_conforming: List[str] + version: str, + changelog: Dict[str, List[str]], + non_conforming: List[str], + date: str = "", ) -> str: """ Generates a changelog entry for a specific version. @@ -364,11 +435,13 @@ def generate_changelog_entry( version (str): The version number. changelog (Dict[str, List[str]]): The categorized changelog entries. non_conforming (List[str]): List of non-conforming commit messages. + date (str): The date string in YYYY-MM-DD format. Returns: str: The formatted changelog entry. """ - date = datetime.now(timezone.utc).strftime("%Y-%m-%d") + if not date: + date = datetime.now(timezone.utc).strftime("%Y-%m-%d") entry = f"## [{version}] - {date}\n\n" logger.debug(f"Generating changelog entry for version {version}.") @@ -388,12 +461,13 @@ def generate_changelog_entry( return entry -def generate_full_changelog(commits_dict: Dict[str, List[str]]) -> str: +def generate_full_changelog(commits_dict: Dict[str, List[str]], tag_dates: Dict[str, str]) -> str: """ Generates the full changelog content from the commits' dictionary. Args: commits_dict (Dict[str, List[str]]): An OrderedDict with version keys and commit lists. + tag_dates (Dict[str, str]): A mapping of version to date string. Returns: str: The full formatted changelog content. @@ -405,7 +479,8 @@ def generate_full_changelog(commits_dict: Dict[str, List[str]]) -> str: if not commits: continue changelog, non_conforming = parse_commits(commits) - changelog_entry = generate_changelog_entry(version, changelog, non_conforming) + date = tag_dates.get(version, datetime.now(timezone.utc).strftime("%Y-%m-%d")) + changelog_entry = generate_changelog_entry(version, changelog, non_conforming, date) changelog_content += changelog_entry return changelog_content @@ -413,10 +488,13 @@ def generate_full_changelog(commits_dict: Dict[str, List[str]]) -> str: def update_changelog(new_content: str) -> bool: """ - Creates or updates the CHANGELOG.md file by prepending the new content. + Creates or overwrites the CHANGELOG.md file with the full generated content. + + The changelog is always regenerated from scratch based on git tags, + so we do a full write instead of prepending to avoid duplicates. Args: - new_content (str): The new changelog content to add. + new_content (str): The complete changelog content. Returns: bool: True if the changelog was updated, False if no changes were necessary. @@ -426,7 +504,6 @@ def update_changelog(new_content: str) -> bool: if os.path.exists(CHANGELOG_PATH): with open(CHANGELOG_PATH, "r", encoding="utf-8") as file: existing_content = file.read() - else: existing_content = "" logger.warning(f"{CHANGELOG_PATH} not found. A new changelog will be created.") @@ -434,15 +511,18 @@ def update_changelog(new_content: str) -> bool: logger.error(f"Error reading {CHANGELOG_PATH}: {error}") return False - # Compare the new content with the existing content - if new_content.strip() == existing_content.strip(): + # Compare normalized content (ignore whitespace differences from formatters like prettier) + def normalize(text: str) -> str: + return re.sub(r"\s+", " ", text.strip()) + + if normalize(new_content) == normalize(existing_content): logger.info("No changes detected in the changelog. No update needed.") return False - # Update the changelog + # Write the full changelog (overwrite, not prepend) try: with open(CHANGELOG_PATH, "w", encoding="utf-8") as file: - file.write(new_content + "\n" + existing_content) + file.write(new_content) logger.info(f"{CHANGELOG_PATH} has been updated.") return True except Exception as error: @@ -456,17 +536,14 @@ def main() -> None: """ fetch_tags() sorted_tags = get_sorted_tags() + tag_dates = get_tag_dates(sorted_tags) commits_dict = get_all_commits(sorted_tags) - changelog_content = generate_full_changelog(commits_dict) + changelog_content = generate_full_changelog(commits_dict, tag_dates) if not changelog_content: logger.info("No commits found to include in the changelog.") return - # TODO: Solve error comparing, for now running manual - if os.path.exists(CHANGELOG_PATH): - return - # Check and update the changelog only if necessary updated = update_changelog(changelog_content) if not updated: logger.info("Changelog was not updated as there are no new changes.") diff --git a/pyproject.toml b/pyproject.toml index c24d51a..eb56c8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "1.1.14" +version = "1.1.15" description = "CICD Core Scripts" authors = ["B "] license = "GLPv3" @@ -9,22 +9,22 @@ package-mode = false [tool.poetry.dependencies] python = "^3.12" -setuptools = "^78.1.0" +setuptools = "^82.0.0" idna = "^3.0" -certifi = "^2025.1.31" +certifi = "^2026.1.4" bump2version = "^1.0.0" python-dotenv = "^1.0.0" -cryptography = "^44.0.0" +cryptography = "^46.0.5" requests = "^2.32.3" wheel = ">=0.36.2" [tool.poetry.group.dev.dependencies] pre-commit = "^4.0.0" -pylint="^3.3.0" +pylint="^4.0.5" yamllint="^1.35.0" isort = "^6.0.1" toml = "^0.10.0" -black = "^25.1.0" +black = "^26.1.0" pytest = "^8.3.1" httpx = { version = ">=0.24.0", optional = true } pytest-cov = "^6.0.0" diff --git a/requirements.txt b/requirements.txt index 5fc76a2..2c38fac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ pytest-cov>=5.0.0 # Coverage Reporting coverage>=7.2.5 -requests~=2.32.3 +requests~=2.32.4 python-dotenv>=1.0.0