wix-incubator / zorechka-bot Goto Github PK
View Code? Open in Web Editor NEWGithub bot for keeping your Bazel dependencies up-to-date and clean
License: MIT License
Github bot for keeping your Bazel dependencies up-to-date and clean
License: MIT License
As this is a project for evaluating ZIO, it would be nice to see how to connect Http4s server.
For start, this server could contain just one endpoint for health-checks.
Note, that we have to read HTTP server port from the config file. Project already depends on http4s as it uses it as a client.
ZIO has it's own testing library - https://zio.dev/docs/usecases/usecases_testing.
It would be nice to evaluate it by writing some tests. Things that are not clear for how well it integrates with IntelliJ IDEA and how comfortable is it for a developer.
I have heard about some plugin for ZIO for IDEA, so worth to check it out as well.
The idea is to introduce a file for opt-outing per repo.
I propose to call .zorechka
and put it into a repo root. The format could be JSON, with one key called ignored_deps
and values to be a list of strings in ::. Where a version could be a wildcard.
The project uses old scalaz
organization for ZIO and old scala version. Do you have plans for updating it?
If not that's okay :) I'm just looking for fresh ZIO applications, and this project is a great example how to write real-world ZIO code.
Not so far time ago, a new feature of ZIO released called ZLayer (https://zio.dev/docs/howto/howto_use_layers). It fixes an old approach known as Module Pattern or approach where you hard-code dependencies in interface level (it could be seen in current code).
It would be nice to try it out and migrate current dependencies to a new system.
Some docs could be find here - https://docs.google.com/document/d/1P0mx1gSNU2UTi-9PXUeY8O74v5gyK-UETznM1SbkQjA/edit#heading=h.tsittnt9c96t
Asking because I don't see even dependency updates happening.
If you're not going to use helpers to access services, then I recommend rewriting code like this:
def createNewVersionPullRequest(repo: GitRepo, forkDir: Path, deps: List[Dep]): ZIO[GithubClient, Throwable, Unit] = {
val (depsDesc, branch) = branchName(deps)
for {
_ <- ZIO.accessM[GithubClient](_.githubClient.createBranch(forkDir, branch))
_ <- ZIO.effect(BazelDepsCheck.applyDepUpdates(forkDir, deps))
_ <- ZIO.accessM[GithubClient](_.githubClient.stageAllChanges(forkDir))
_ <- ZIO.accessM[GithubClient](_.githubClient.commit(forkDir, s"zorechka found new versions for deps: $depsDesc #pr"))
_ <- ZIO.accessM[GithubClient](_.githubClient.push(forkDir, branch))
} yield ()
}
to be like this:
def createNewVersionPullRequest(repo: GitRepo, forkDir: Path, deps: List[Dep]): ZIO[GithubClient, Throwable, Unit] = ZIO.accessM[GithubClient] { githubClient =>
val (depsDesc, branch) = branchName(deps)
for {
_ <- githubClient.createBranch(forkDir, branch)
_ <- ZIO.effect(BazelDepsCheck.applyDepUpdates(forkDir, deps)
_ <- githubClient.stageAllChanges(forkDir)
_ <- githubClient.commit(forkDir, s"zorechka found new versions for deps: $depsDesc #pr")
_ <- githubClient.push(forkDir, branch)
} yield ()
}
Makes the code much easier to follow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.