Skip to content

[change] Releaser: removed chatGPT integration#661

Merged
nemesifier merged 3 commits into
openwisp:masterfrom
BHARATH0153:remove-chatgpt-integration
May 4, 2026
Merged

[change] Releaser: removed chatGPT integration#661
nemesifier merged 3 commits into
openwisp:masterfrom
BHARATH0153:remove-chatgpt-integration

Conversation

@BHARATH0153

@BHARATH0153 BHARATH0153 commented May 2, 2026

Copy link
Copy Markdown
Contributor

changes

Removed the obsolete chatGPT integration from the releaser tool (openwisp_utils/releaser/release.py). The get_ai_summary function which called the OpenAI API to generate a human-readable changelog summary has been fully deleted. Along with it, the OPENAI_CHATGPT_TOKEN environment variable lookup and the get_ai_summary(...) call in main() were removed, replacing that line with a direct assignment changelog_content = formatted_block_rst. Since requests and retryable_request were only used inside that function, both imports were also cleaned up.

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #645

@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request removes the AI-based changelog summarization from the releaser tool. The get_ai_summary() function and its imports (requests, retryable_request) were deleted; the main flow no longer reads OPENAI_CHATGPT_TOKEN and now assigns changelog_content directly from the already-formatted formatted_block_rst. Related tests for the AI summarization were removed and test fixtures adjusted. Documentation references to the optional OpenAI token and the GPT-based summary were also removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Bug Fixes ❓ Inconclusive This PR removes obsolete ChatGPT integration code rather than fixing a bug, making it a feature removal not a bug fix. Evaluate using feature removal criteria instead of bug fix criteria, verifying the code is truly obsolete and no dependencies exist.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The PR description provides a clear summary of changes and includes the required reference to issue #645, though the checklist items are all unchecked.
Linked Issues check ✅ Passed All code changes directly address the objective to remove ChatGPT integration [#645]: get_ai_summary function deleted, OPENAI_CHATGPT_TOKEN removed, related imports cleaned up, tests and documentation updated accordingly.
Out of Scope Changes check ✅ Passed All changes are in-scope: removal of ChatGPT integration from release.py, deletion of AI summary tests, documentation updates, and test fixture adjustments are all directly related to issue #645 objectives.
Title check ✅ Passed The title clearly identifies the main change: removal of ChatGPT integration from the releaser tool. It uses the correct [change] prefix format and directly matches the PR objectives and all file-level changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kilo-code-bot

kilo-code-bot Bot commented May 2, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This PR cleanly removes the obsolete ChatGPT integration from the releaser tool as described in #645.

Changes verified:

  • release.py: Removed unused requests import, retryable_request import, get_ai_summary() function, and OPENAI_CHATGPT_TOKEN env lookup
  • test_ai_summary.py: Deleted (tests for removed feature)
  • conftest.py: Removed OPENAI_CHATGPT_TOKEN environment variable mock
  • test_release.py: Adjusted mock side_effects to remove AI summary question responses
  • docs/developer/releaser-tool.rst: Removed OpenAI token documentation section and updated changelog workflow description

All cleanup changes are appropriate and complete.

Files Reviewed (5 files)
  • openwisp_utils/releaser/release.py - Clean removal of ChatGPT integration
  • openwisp_utils/releaser/tests/test_ai_summary.py - Deleted (tests for removed feature)
  • openwisp_utils/releaser/tests/conftest.py - Removed AI token mock
  • openwisp_utils/releaser/tests/test_release.py - Updated test flows
  • docs/developer/releaser-tool.rst - Updated documentation

Reviewed by kimi-k2.5 · 254,284 tokens

@BHARATH0153

Copy link
Copy Markdown
Contributor Author

@nemesifier please review when you are free

@openwisp-companion

Copy link
Copy Markdown

Test Import Error in Releaser

Hello @BHARATH0153,
(Analysis for commit a875df5)

There is an ImportError in the test file openwisp_utils/releaser/tests/test_ai_summary.py. The test is unable to import the name get_ai_summary from openwisp_utils.releaser.release.

Fix:
Ensure that the get_ai_summary function is correctly defined and exported in openwisp_utils/releaser/release.py, or update the import statement in the test file if the function has been moved or renamed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@openwisp_utils/releaser/release.py`:
- Line 225: Remove the orphaned test file
openwisp_utils/releaser/tests/test_ai_summary.py which imports the removed
function get_ai_summary from release.py; deleting this test will prevent pytest
ImportError during collection since get_ai_summary no longer exists in
openwisp_utils/releaser/release.py.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8445c438-4549-44dc-9ac5-45580e279b4f

📥 Commits

Reviewing files that changed from the base of the PR and between 83ac9fc and a875df5.

📒 Files selected for processing (1)
  • openwisp_utils/releaser/release.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Python==3.13 | django~=5.2.0
  • GitHub Check: Python==3.13 | django~=5.1.0
  • GitHub Check: Python==3.12 | django~=5.2.0
  • GitHub Check: Python==3.12 | django~=5.0.0
  • GitHub Check: Python==3.12 | django~=4.2.0
  • GitHub Check: Python==3.10 | django~=5.0.0
  • GitHub Check: Python==3.12 | django~=5.1.0
  • GitHub Check: Python==3.11 | django~=5.1.0
  • GitHub Check: Python==3.11 | django~=4.2.0
  • GitHub Check: Python==3.10 | django~=5.2.0
  • GitHub Check: Python==3.11 | django~=5.0.0
  • GitHub Check: Python==3.10 | django~=5.1.0
  • GitHub Check: Python==3.10 | django~=4.2.0
  • GitHub Check: Kilo Code Review
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{py,html,txt}

📄 CodeRabbit inference engine (Custom checks)

For Django pull requests, ensure all user-facing strings are marked as translatable using the Django i18n framework

Files:

  • openwisp_utils/releaser/release.py
🔇 Additional comments (1)
openwisp_utils/releaser/release.py (1)

225-225: LGTM — direct assignment correctly simplifies the flow.

changelog_content = formatted_block_rst cleanly replaces the former get_ai_summary(...) call. The variable feeds into the header-stripping regex on the next line without any behavioural change.

Comment thread openwisp_utils/releaser/release.py
@BHARATH0153
BHARATH0153 force-pushed the remove-chatgpt-integration branch from a875df5 to 052bb31 Compare May 2, 2026 15:47
@openwisp-companion

Copy link
Copy Markdown

Test Failure in Release Module

Hello @BHARATH0153,
(Analysis for commit 052bb31)

  • Test Failure: The test test_main_flow_user_rejects_changelog in openwisp_utils/releaser/tests/test_release.py failed because it expected a SystemExit exception but did not receive one.

  • Fix: Modify the test to ensure that a SystemExit is raised when the changelog block is rejected. This might involve adjusting the logic within the test or the code it is testing to correctly trigger the exception under the specified conditions.

@BHARATH0153
BHARATH0153 force-pushed the remove-chatgpt-integration branch from 052bb31 to c73286e Compare May 2, 2026 15:56
@coveralls

coveralls commented May 2, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 97.458% (-0.07%) from 97.529% — BHARATH0153:remove-chatgpt-integration into openwisp:master

@openwisp-companion

Copy link
Copy Markdown

QA and Commit Message Failures

Hello @BHARATH0153,
(Analysis for commit 3d27af3)

  • Code Style (Black & Flake8): The CI failed due to trailing whitespace errors in openwisp_utils/releaser/tests/test_release.py. Please run openwisp-qa-format to automatically fix these issues.
  • Commit Message: The commit message does not adhere to the OpenWISP convention. Please format it correctly.

Example of a correct commit message:

[fix] Correctly handle trailing whitespace in test files #123

This commit addresses trailing whitespace issues found in the
test_release.py file, ensuring compliance with code style guidelines.

Fixes #123

The chatGPT integration in the releaser tool is obsolete now that
the change-log bot has been added and it never worked reliably.

- Removed the get_ai_summary function and its OpenAI API call
- Removed OPENAI_CHATGPT_TOKEN environment variable usage
- Removed unused requests and retryable_request imports
- Removed the orphaned test_ai_summary.py test file
- Updated test_release.py and conftest.py to remove AI-related mocks

Closes openwisp#645
@BHARATH0153
BHARATH0153 force-pushed the remove-chatgpt-integration branch from 3d27af3 to 5f55d62 Compare May 2, 2026 16:10
nemesifier
nemesifier previously approved these changes May 3, 2026

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@BHARATH0153 thanks for this, a few things to note:

Your author is set to BHARATH0153 <bharath@example.com>, which looks fake.

Please coordinate with us in the dev chat before opening new PRs.

@openwisp-companion

Copy link
Copy Markdown
[change] Releaser: remove chatGPT integration.

`#661 <https://github.com/openwisp/openwisp-utils/pull/661>`_

@BHARATH0153
BHARATH0153 requested a review from nemesifier May 4, 2026 10:20
@nemesifier nemesifier changed the title [change] Releaser: remove chatGPT integration [change] Releaser: removed chatGPT integration May 4, 2026
@nemesifier
nemesifier merged commit 3eda503 into openwisp:master May 4, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[change] Releaser: remove chatGPT integration (obsolete)

3 participants