From 41b7c42c5626173619a979b47aca8e60e2bdde6c Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 22 Oct 2025 23:05:58 +0300 Subject: [PATCH 1/3] fix(action): must not use commit-range action from local copy --- action.yml | 5 ++++- release_tools/bump-version-patterns.yaml | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index fd4c8c59e..2fbd358af 100644 --- a/action.yml +++ b/action.yml @@ -48,7 +48,10 @@ runs: steps: - name: Commit Range id: commit-range - uses: ./.github/actions/commit-range + # The commit range action needs to be run from a remote repository. A reference + # to a local copy like `./.github/actions/commit-range` won't work since that + # path won't exist when this GitHub action is used from another repository. + uses: akaihola/darkgraylib/.github/actions/commit-range@v2.4.0 - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/release_tools/bump-version-patterns.yaml b/release_tools/bump-version-patterns.yaml index 12114164d..c20d03241 100644 --- a/release_tools/bump-version-patterns.yaml +++ b/release_tools/bump-version-patterns.yaml @@ -62,9 +62,6 @@ - |- ^ default: "~={old_version->new_version}" - - |- - ^ uses: akaihola/darker/.github/actions/commit-range@{old_version->new_version} - "src/darker/version.py": - |- ^__version__ *= *\"{old_version->new_version}\" From 479a2c199700ee6cc98d9de9914ac87d1b8760f6 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 22 Oct 2025 23:10:05 +0300 Subject: [PATCH 2/3] chore: remove unused commit-range action --- .github/actions/commit-range/LICENSE.md | 29 ----------------- .github/actions/commit-range/action.yml | 43 ------------------------- 2 files changed, 72 deletions(-) delete mode 100644 .github/actions/commit-range/LICENSE.md delete mode 100644 .github/actions/commit-range/action.yml diff --git a/.github/actions/commit-range/LICENSE.md b/.github/actions/commit-range/LICENSE.md deleted file mode 100644 index 58584a014..000000000 --- a/.github/actions/commit-range/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2022, Eindhoven University of Technology - CST Robotics Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.github/actions/commit-range/action.yml b/.github/actions/commit-range/action.yml deleted file mode 100644 index 9c43415fb..000000000 --- a/.github/actions/commit-range/action.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# Copyright (c) 2022, Eindhoven University of Technology - CST Robotics Group -# BDS 3-Clause License (see ./LICENSE.md) - -name: 'Commit range' -description: 'Determine commit range' -outputs: - commit-range: - description: 'Range of commits in this run' - value: ${{ steps.commit-range.outputs.commit-range }} -runs: - using: "composite" - steps: - - name: Commit range - id: commit-range - env: - # Doing this inside run doesn't work because of piping: - commit_list: ${{ toJson(github.event.commits) }} - run: | - if [ "${GITHUB_EVENT_NAME}" == "push" ] - then - NUMBER_COMMITS=$(echo "${commit_list}" | jq 'length') - if [ ${NUMBER_COMMITS} -le 1 ] - then - COMMIT_RANGE="" - else - OLDEST=$(echo "${commit_list}" | jq 'first.id' | tr -d '"') - NEWEST=$(echo "${commit_list}" | jq 'last.id' | tr -d '"') - OLDEST_PARENTS=($(git show --no-patch --format="%P" ${OLDEST})) - NUMBER_OLDEST_PARENTS=${#OLDEST_PARENTS[@]} - # Take second parent if possible, - # see https://stackoverflow.com/a/2222920: - COMMIT_RANGE="${OLDEST}^${NUMBER_OLDEST_PARENTS}...${NEWEST}" - fi - elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ] - then - OLDEST=${{ github.event.pull_request.base.sha }} - NEWEST=${{ github.event.pull_request.head.sha }} - COMMIT_RANGE="${OLDEST}...${NEWEST}" - fi - echo -e "\e[35m\e[1m COMMIT_RANGE = ${COMMIT_RANGE} \e[0m" - echo "commit-range=${COMMIT_RANGE}" >> $GITHUB_OUTPUT - shell: bash From 0e5ec6ebce3e227f09d39667d6250eeac90731b9 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 22 Oct 2025 23:11:10 +0300 Subject: [PATCH 3/3] docs: update the change log --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e7d30b99d..c49a58f15 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,10 +8,13 @@ Added Fixed ----- +- Revert running ``commit-range`` from the repository itself (again; we've reverted it + already once in 1.7.2_). This broke the GitHub action. Internal -------- - Require Pytest 6.2.4+ for compatibility across Python 3.9+ versions. +- Remove the unused ``commit-range`` action. 3.0.0_ - 2025-09-01