Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(blocks): add text replace block #9366

Merged
merged 2 commits into from
Jan 30, 2025
Merged

feat(blocks): add text replace block #9366

merged 2 commits into from
Jan 30, 2025

Conversation

ntindle
Copy link
Member

@ntindle ntindle commented Jan 29, 2025

User in discord requested the replace text block

Changes πŸ—οΈ

  • Adds replace text block

Checklist πŸ“‹

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Passed unit tests

Copy link

supabase bot commented Jan 29, 2025

This pull request has been ignored for the connected project bgwpwdsxblryihinutbx because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings β†—οΈŽ.


Preview Branches by Supabase.
Learn more about Supabase Branching β†—οΈŽ.

Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end platform/blocks labels Jan 29, 2025
@github-actions github-actions bot changed the base branch from master to dev January 29, 2025 14:42
Copy link

deepsource-io bot commented Jan 29, 2025

Here's the code health analysis summary for commits a4b9624..6e55d1e. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β SuccessView CheckΒ β†—
DeepSource Python LogoPythonβœ…Β Success
❗ 1 occurence introduced
View CheckΒ β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

netlify bot commented Jan 29, 2025

βœ… Deploy Preview for auto-gpt-docs canceled.

Name Link
πŸ”¨ Latest commit 6e55d1e
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/679b4640f3d28600096c5855

@ntindle ntindle marked this pull request as ready for review January 29, 2025 17:05
@ntindle ntindle requested a review from a team as a code owner January 29, 2025 17:05
@ntindle ntindle requested review from Swiftyos and aarushik93 and removed request for a team January 29, 2025 17:06
Copy link

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 πŸ”΅βšͺβšͺβšͺβšͺ
πŸ§ͺΒ PR contains tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Input Validation

The block should validate that the old and new text parameters are not empty strings to avoid unnecessary processing

def run(self, input_data: Input, **kwargs) -> BlockOutput:
    yield "output", input_data.text.replace(input_data.old, input_data.new)

Copy link

netlify bot commented Jan 30, 2025

βœ… Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
πŸ”¨ Latest commit 6e55d1e
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/679b4640d1d2280008063434

Copy link
Member

@Bentlybro Bentlybro left a comment

Choose a reason for hiding this comment

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

Tested and this works :) - this will be a very useful block

@Bentlybro Bentlybro enabled auto-merge January 30, 2025 09:32
@Bentlybro Bentlybro added this pull request to the merge queue Jan 30, 2025
Merged via the queue into dev with commit b03e3e4 Jan 30, 2025
23 checks passed
@Bentlybro Bentlybro deleted the text-replace-block branch January 30, 2025 09:50
waterstark pushed a commit to waterstark/AutoGPT that referenced this pull request Jan 30, 2025
<!-- Clearly explain the need for these changes: -->
User in discord requested the replace text block

### Changes πŸ—οΈ
- Adds replace text block
<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist πŸ“‹

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Passed unit tests

Co-authored-by: Bently <[email protected]>
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.

2 participants