Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-semantic-release/python-semantic-release
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.0.1
Choose a base ref
...
head repository: python-semantic-release/python-semantic-release
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.0.2
Choose a head ref
  • 11 commits
  • 21 files changed
  • 8 contributors

Commits on Feb 6, 2024

  1. chore: update pre-commit hooks (#796)

    afuetterer authored Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e238452 View commit details
  2. docs: Remove duplicate note in configuration.rst (#807)

    tdurk93 authored Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fb6f243 View commit details
  3. ci: add grouped github-actions section to dependabot config (#794)

    afuetterer authored Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3eb15c4 View commit details
  4. test(fixtures): cache the base example project directory (#799)

    codejedi365 authored Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    229c647 View commit details
  5. style: beautify 229c647

    actions-user committed Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c7be6e2 View commit details
  6. ci: bump the github-actions group with 3 updates (#831)

    dependabot[bot] authored Feb 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bf96143 View commit details

Commits on Feb 8, 2024

  1. ci: Configure trusted publishing in pypi

    relekang authored Feb 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8e3c00b View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c57b082 View commit details
  3. fix(util): properly parse windows line-endings in commit messages

    Due to windows line-endings `\r\n`, it would improperly split the commit
    description (it failed to split at all) and cause detection of Breaking changes
    to fail. The breaking changes regular expression looks to the start of the line
    for the proper syntax.
    
    Resolves: #820
    codejedi365 authored and relekang committed Feb 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    70193ba View commit details
  4. style: beautify 70193ba

    actions-user committed Feb 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c777bb2 View commit details
  5. 9.0.2

    Automatically generated by python-semantic-release
    semantic-release committed Feb 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    460c73b View commit details
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -14,3 +14,18 @@ updates:
- dependencies
open-pull-requests-limit: 10
rebase-strategy: auto
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "18:00"
commit-message:
prefix: "ci"
labels:
- dependencies
rebase-strategy: auto
groups:
github-actions:
patterns:
- "*"
24 changes: 11 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -17,14 +17,14 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
@@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install mypy & dev packages
@@ -75,12 +75,12 @@ jobs:

steps:
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Ruff
run: python -m pip install ".[dev]"
@@ -109,13 +109,16 @@ jobs:
concurrency: push
needs: [test, lint, beautify]
if: github.repository == 'python-semantic-release/python-semantic-release'
environment:
name: pypi
url: https://pypi.org/project/python-semantic-release/
permissions:
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#metadata
id-token: write
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
@@ -126,20 +129,15 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
root_options: "-vv"

# https://github.com/pypa/gh-action-pypi-publish#specifying-a-different-username
# This will need converting to use trusted publishing at a later date
# see https://docs.pypi.org/trusted-publishers/
- name: Publish package distributions to PyPI
id: pypi-publish

# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}

- name: Publish package distributions to GitHub Releases
id: github-release
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -13,15 +13,15 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
@@ -40,9 +40,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install mypy & dev packages
@@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ repos:

# Formatters that may modify source files automatically
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
rev: v0.1.11
hooks:
- id: ruff-format
name: ruff (format)
@@ -51,7 +51,7 @@ repos:

# Linters and validation
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
rev: v0.1.11
hooks:
- id: ruff
name: ruff (lint)
@@ -64,7 +64,7 @@ repos:
pass_filenames: false

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.1"
rev: "v1.8.0"
hooks:
- id: mypy
args: ["--config-file", "pyproject.toml"]
@@ -100,7 +100,7 @@ repos:
- "tests"

- repo: https://github.com/pycqa/bandit
rev: 1.7.5
rev: 1.7.6
hooks:
- id: bandit
args:
@@ -114,7 +114,7 @@ repos:

# GHA linting
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.27.0"
rev: "0.27.3"
hooks:
- id: check-github-workflows
- id: check-readthedocs
64 changes: 53 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,48 @@



## v9.0.2 (2024-02-08)

### Chore

* chore: update pre-commit hooks (#796) ([`e238452`](https://github.com/python-semantic-release/python-semantic-release/commit/e23845226120b4fb934dd8755ce1b3f822cac041))

### Ci

* ci: Configure trusted publishing in pypi ([`8e3c00b`](https://github.com/python-semantic-release/python-semantic-release/commit/8e3c00b238859559d82ff692bcee15f70bf4f6ad))

* ci: bump the github-actions group with 3 updates (#831) ([`bf96143`](https://github.com/python-semantic-release/python-semantic-release/commit/bf961436fd81c6398ca2c456143b64517a2b4cac))

* ci: add grouped github-actions section to dependabot config (#794) ([`3eb15c4`](https://github.com/python-semantic-release/python-semantic-release/commit/3eb15c413cec0430fe2b27a313185068f900c61d))

### Documentation

* docs: Remove duplicate note in configuration.rst (#807) ([`fb6f243`](https://github.com/python-semantic-release/python-semantic-release/commit/fb6f243a141642c02469f1080180ecaf4f3cec66))

### Fix

* fix(util): properly parse windows line-endings in commit messages

Due to windows line-endings `\r\n`, it would improperly split the commit
description (it failed to split at all) and cause detection of Breaking changes
to fail. The breaking changes regular expression looks to the start of the line
for the proper syntax.

Resolves: #820 ([`70193ba`](https://github.com/python-semantic-release/python-semantic-release/commit/70193ba117c1a6d3690aed685fee8a734ba174e5))

### Style

* style: beautify 70193ba117c1a6d3690aed685fee8a734ba174e5 ([`c777bb2`](https://github.com/python-semantic-release/python-semantic-release/commit/c777bb261e8e46497c5c4b3fd84303db71772142))

* style: beautify 229c6471efc2c1bee002c3b89f58caf391b89e78 ([`c7be6e2`](https://github.com/python-semantic-release/python-semantic-release/commit/c7be6e2330c3527302915fcf3334923ab5252480))

### Test

* test(util): add windows line-endings possibilities for commit parsing ([`c57b082`](https://github.com/python-semantic-release/python-semantic-release/commit/c57b0825c632da166c6dbe5b976c9edb1aa5882b))

* test(fixtures): cache the base example project directory (#799) ([`229c647`](https://github.com/python-semantic-release/python-semantic-release/commit/229c6471efc2c1bee002c3b89f58caf391b89e78))


## v9.0.1 (2024-02-06)

### Fix
@@ -2301,11 +2343,7 @@ Fixes #237 ([`fe6a7e7`](https://github.com/python-semantic-release/python-semant

## v7.0.0 (2020-05-22)

### Documentation

* docs: add conda-forge badge ([`e9536bb`](https://github.com/python-semantic-release/python-semantic-release/commit/e9536bbe119c9e3b90c61130c02468e0e1f14141))

### Feature
### Breaking

* feat(changelog): add changelog components (#240)

@@ -2330,6 +2368,10 @@ BREAKING CHANGE: The `compare_url` option has been removed in favor of using
Changelog components may now receive the value of `changelog_sections`,
split and ready to use. ([`3e17a98`](https://github.com/python-semantic-release/python-semantic-release/commit/3e17a98d7fa8468868a87e62651ac2c010067711))

### Documentation

* docs: add conda-forge badge ([`e9536bb`](https://github.com/python-semantic-release/python-semantic-release/commit/e9536bbe119c9e3b90c61130c02468e0e1f14141))

### Style

* style: improve code formatting ([`1dfca97`](https://github.com/python-semantic-release/python-semantic-release/commit/1dfca97c3856e496e9e2cda429b8aa093799bd5b))
@@ -2350,7 +2392,7 @@ Fixes #239 ([`34acbbc`](https://github.com/python-semantic-release/python-semant

## v6.4.0 (2020-05-15)

### Feature
### Breaking

* feat(history): create emoji parser (#238)

@@ -2719,11 +2761,7 @@ will get the version they specify. ([`123984d`](https://github.com/python-semant

## v5.0.0 (2020-03-22)

### Documentation

* docs(pypi): update docstings in pypi.py ([`6502d44`](https://github.com/python-semantic-release/python-semantic-release/commit/6502d448fa65e5dc100e32595e83fff6f62a881a))

### Feature
### Breaking

* feat(build): allow config setting for build command (#195)

@@ -2733,6 +2771,10 @@ BREAKING CHANGE: Previously the build_commands configuration variable set the ty

Closes #188 ([`740f4bd`](https://github.com/python-semantic-release/python-semantic-release/commit/740f4bdb26569362acfc80f7e862fc2c750a46dd))

### Documentation

* docs(pypi): update docstings in pypi.py ([`6502d44`](https://github.com/python-semantic-release/python-semantic-release/commit/6502d448fa65e5dc100e32595e83fff6f62a881a))

### Fix

* fix: Rename default of build_command config ([`d5db22f`](https://github.com/python-semantic-release/python-semantic-release/commit/d5db22f9f7acd05d20fd60a8b4b5a35d4bbfabb8))
5 changes: 0 additions & 5 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
@@ -100,11 +100,6 @@ In this structure:
Settings
--------
.. note::
If you are using the built-in GitHub Action, the default value is set to
``github-actions <actions@github.com>``. You can modify this with the
``git_committer_name`` and ``git_committer_email`` inputs.
.. _config-root:
``[tool.semantic_release]``
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "python-semantic-release"
version = "9.0.1"
version = "9.0.2"
description = "Automatic Semantic Versioning for Python projects"
requires-python = ">=3.8"
license = { text = "MIT" }
2 changes: 1 addition & 1 deletion semantic_release/__init__.py
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
tags_and_versions,
)

__version__ = "9.0.1"
__version__ = "9.0.2"


def setup_hook(argv: list[str]) -> None:
18 changes: 13 additions & 5 deletions semantic_release/commit_parser/util.py
Original file line number Diff line number Diff line change
@@ -9,11 +9,19 @@ def parse_paragraphs(text: str) -> list[str]:
"""
This will take a text block and return a list containing each
paragraph with single line breaks collapsed into spaces.
To handle Windows line endings, carriage returns '\r' are removed before
separating into paragraphs.
:param text: The text string to be divided.
:return: A list of condensed paragraphs, as strings.
"""
return [
paragraph.replace("\n", " ")
for paragraph in text.split("\n\n")
if len(paragraph) > 0
]
return list(
filter(
None,
[
paragraph.replace("\n", " ").strip()
for paragraph in text.replace("\r", "").split("\n\n")
],
)
)
4 changes: 2 additions & 2 deletions tests/command_line/conftest.py
Original file line number Diff line number Diff line change
@@ -53,8 +53,8 @@ def mocked_git_push(monkeypatch: MonkeyPatch) -> MagicMock:


@pytest.fixture
def config_path(example_project: Path) -> Path:
return example_project / DEFAULT_CONFIG_FILE
def config_path(example_project_dir: Path) -> Path:
return example_project_dir / DEFAULT_CONFIG_FILE


@pytest.fixture
Loading