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

fix: replace not working for the GitHub builder #129

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Conversation

rustatian
Copy link
Member

@rustatian rustatian commented Jan 15, 2024

Reason for This PR

  • Internal report

Description of Changes

  • Properly set replace if specified in the configuration.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Summary by CodeRabbit

  • New Features
    • Enhanced module configuration options to respect replacement settings.
    • Streamlined template downloading with consistent file extension handling.

Signed-off-by: Valery Piashchynski <[email protected]>
@rustatian rustatian added B-bug Bug: bug, exception B-regression Bug: regression bugs labels Jan 15, 2024
@rustatian rustatian requested a review from wolfy-j January 15, 2024 12:41
@rustatian rustatian self-assigned this Jan 15, 2024
Copy link

coderabbitai bot commented Jan 15, 2024

Walkthrough

The recent updates involve enhancing the configuration flexibility and code maintainability of a Go project. One change allows for dynamic replacement values in module information, driven by plugin configuration. Another standardizes the use of a file extension constant within a repository-related method, replacing previously hardcoded string literals.

Changes

File Path Change Summary
.../pool.go Assign modInfo.Replace from v.pluginCfg.Replace when the latter is set.
.../repo.go Introduce zipExt constant to replace hardcoded ".zip" strings in DownloadTemplate.

🐇✨
In the realm of code where the rabbits hop,
We tweak and we change, we never stop.
Constants and configs, they dance in a line,
For cleaner, better code, is simply divine. 🌟📜🔧

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 8314e04 and f7f0391.
Files ignored due to path filters (1)
  • velox_rr_v2023.toml is excluded by: !**/*.toml
Files selected for processing (2)
  • github/pool.go (1 hunks)
  • github/repo.go (3 hunks)
Additional comments: 4
github/pool.go (1)
  • 157-157: The addition of the conditional assignment to modInfo.Replace ensures that the replace directive is only set when v.pluginCfg.Replace is not empty, which aligns with the intended functionality described in the PR objectives.
github/repo.go (3)
  • 25-25: The introduction of the zipExt constant is a good practice for maintainability, allowing for a single point of change if the extension ever needs to be updated.
  • 88-88: Replacing the hardcoded ".zip" string with the zipExt constant on line 88 is consistent with the change and improves code readability.
  • 105-105: The use of the zipExt constant on line 105 is consistent with the previous change and maintains the use of the constant throughout the method.

@rustatian rustatian merged commit f0b99f6 into master Jan 15, 2024
6 checks passed
@rustatian rustatian deleted the fix/replace-github branch January 15, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception B-regression Bug: regression bugs
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant