Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/actions/bot-changelog-generator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,24 @@ inputs:
repo-name:
description: "Repository name in format owner/repo"
required: true
cache-dependency-path:
description: "Path to dependency metadata used for pip cache invalidation"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Set up Python with cache
if: ${{ inputs.cache-dependency-path != '' }}
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: ${{ inputs.cache-dependency-path }}

- name: Set up Python
if: ${{ inputs.cache-dependency-path == '' }}
uses: actions/setup-python@v5
with:
python-version: "3.13"
Comment on lines +26 to 38
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🌐 Web query:

What is the latest version of actions/setup-python GitHub Action?

💡 Result:

The latest release of actions/setup-python is v6.2.0 (tagged “Latest” on the Releases page). You can reference it as actions/setup-python@v6.2.0 (pinned) or actions/setup-python@v6 (floating major). (github.com)

Citations:


🏁 Script executed:

find .github/workflows -type f -name "*.yml" -o -name "*.yaml" | xargs grep -n "actions/setup-python"

Repository: openwisp/openwisp-utils

Length of output: 900


Version inconsistency: actions/setup-python@v5 vs @v6 used elsewhere.

This composite action uses actions/setup-python@v5 (lines 28, 36), while the workflow files in this PR use actions/setup-python@v6. Consider updating to @v6 for consistency across the codebase.

♻️ Suggested fix for version consistency
     - name: Set up Python with cache
       if: ${{ inputs.cache-dependency-path != '' }}
-      uses: actions/setup-python@v5
+      uses: actions/setup-python@v6
       with:
         python-version: "3.13"
         cache: "pip"
         cache-dependency-path: ${{ inputs.cache-dependency-path }}

     - name: Set up Python
       if: ${{ inputs.cache-dependency-path == '' }}
-      uses: actions/setup-python@v5
+      uses: actions/setup-python@v6
       with:
         python-version: "3.13"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Set up Python with cache
if: ${{ inputs.cache-dependency-path != '' }}
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: ${{ inputs.cache-dependency-path }}
- name: Set up Python
if: ${{ inputs.cache-dependency-path == '' }}
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up Python with cache
if: ${{ inputs.cache-dependency-path != '' }}
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: ${{ inputs.cache-dependency-path }}
- name: Set up Python
if: ${{ inputs.cache-dependency-path == '' }}
uses: actions/setup-python@v6
with:
python-version: "3.13"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/bot-changelog-generator/action.yml around lines 26 - 38,
Update the composite action steps that currently reference "uses:
actions/setup-python@v5" to use "@v6" for consistency with the rest of the repo;
specifically modify both occurrences of the "uses: actions/setup-python@v5"
lines in the steps that handle the cache (with cache-dependency-path) and the
non-cache branch so they read "uses: actions/setup-python@v6", leaving the
existing with: keys (python-version, cache, cache-dependency-path) unchanged.

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bot-autoassign-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: pip install -e .[github_actions]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bot-autoassign-pr-issue-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: pip install -e .[github_actions]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/bot-autoassign-pr-reopen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: pip install -e .[github_actions]
Expand Down Expand Up @@ -65,6 +67,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: pip install -e .[github_actions]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bot-autoassign-stale-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "setup.py"

- name: Install dependencies
run: pip install -e .[github_actions]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable-bot-autoassign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "openwisp-utils/setup.py"

- name: Install dependencies
run: pip install -e 'openwisp-utils/.[github_actions]'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable-bot-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ jobs:
ref: master
sparse-checkout: |
.github/actions/bot-changelog-generator
setup.py
path: openwisp-utils-action

- name: Generate changelog
if: steps.check-commits.outputs.has_noteworthy == 'true'
uses: ./openwisp-utils-action/.github/actions/bot-changelog-generator
with:
cache-dependency-path: openwisp-utils-action/setup.py
github-token: ${{ steps.app-token.outputs.token }}
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}
pr-number: ${{ steps.check-commits.outputs.pr_number }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable-bot-ci-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "trusted_scripts/setup.py"

- name: Install Tools
run: |
Expand Down
Loading