diff --git a/.github/workflows/changelogs.yml b/.github/workflows/changelogs.yml index 4b777dad6cce..ed06298df0e9 100644 --- a/.github/workflows/changelogs.yml +++ b/.github/workflows/changelogs.yml @@ -68,6 +68,9 @@ jobs: echo echo "See https://github.com/uyuni-project/uyuni/wiki/Contributing for a guide to writing changelogs." exit 1 + - id: files + name: Get changed files + uses: Ana06/get-changed-files@v2.3.0 - name: Test changelog entries env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -75,9 +78,8 @@ jobs: run: | pip install python-bugzilla~=3.2.0 - CHANGED_FILES=$(gh pr diff -R ${{ github.event.pull_request.base.repo.full_name }} \ - ${{ github.event.pull_request.number }} --name-only) - echo $CHANGED_FILES + echo "Changed files:" + echo ${{ steps.files.outputs.added_modified }} # Tracker file can be retrieved from the OBS/IBS API # by calling 'osc api /issue_trackers/' (with authentication) @@ -85,7 +87,7 @@ jobs: --tracker-file .github/workflows/changelogs/trackers.xml \ --git-repo uyuni-project/uyuni \ --pr-number ${{ github.event.pull_request.number }} \ - $CHANGED_FILES + ${{ steps.files.outputs.added_modified }} # Warns the user if they merged the PR, but the changelog test failed warn_user_if_merged: diff --git a/.github/workflows/changelogs/changelogs.py b/.github/workflows/changelogs/changelogs.py index 79e40f5def85..ffa5da20bbc6 100644 --- a/.github/workflows/changelogs/changelogs.py +++ b/.github/workflows/changelogs/changelogs.py @@ -246,9 +246,7 @@ def get_modified_files_for_pkg(self, pkg_path: str, pkg_name: str, files: list[s # Check if the file exists in a subdirectory of the base path of the package if os.path.normpath(os.path.dirname(f)).startswith(os.path.normpath(pkg_path)): if os.path.basename(f).startswith(pkg_name + ".changes."): - # Ignore if the change is a removal - if os.path.isfile(os.path.join(self.uyuni_root, f)): - pkg_chlogs.append(f) + pkg_chlogs.append(f) else: pkg_files.append(f)