@zio.dev/zio-sbt 0.4.10 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.md +89 -4
  2. package/package.json +1 -1
package/index.md CHANGED
@@ -12,9 +12,9 @@ _ZIO SBT_ contains multiple sbt plugins that are useful for ZIO projects. It pro
12
12
  Add the following lines to your `plugin.sbt` file:
13
13
 
14
14
  ```scala
15
- addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.4.10")
16
- addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.4.10")
17
- addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.10")
15
+ addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.5.0")
16
+ addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.5.0")
17
+ addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.5.0")
18
18
  ```
19
19
 
20
20
  Then you can enable them by using the following code in your `build.sbt` file:
@@ -27,6 +27,10 @@ enablePlugins(
27
27
  )
28
28
  ```
29
29
 
30
+ :::note
31
+ Always try to keep the SBT version specified in the `project/build.properties` file up to date to ensure compatibility with the ZIO SBT plugins.
32
+ :::
33
+
30
34
  ## ZIO SBT Ecosystem
31
35
 
32
36
  ZIO SBT Ecosystem plugin is an sbt plugin that provides a set of sbt settings and tasks that are very common and useful for configuring and managing ZIO projects. It is designed help developers to quickly set up a new ZIO project with a minimal amount of effort.
@@ -97,7 +101,7 @@ ZIO SBT CI plugin generates a default GitHub workflow that includes common CI ta
97
101
  To use ZIO SBT CI plugin, add the following lines to your `plugins.sbt` file:
98
102
 
99
103
  ```scala
100
- addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.4.10")
104
+ addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.5.0")
101
105
 
102
106
  resolvers ++= Resolver.sonatypeOssRepos("public")
103
107
  ```
@@ -125,6 +129,87 @@ This will generate a GitHub workflow file inside the `.github/workflows` directo
125
129
  >
126
130
  > To use this plugin, we also need to install [ZIO Assistant](https://github.com/apps/zio-assistant) bot.
127
131
 
132
+ ## ZIO SBT GitHub Query Plugin
133
+
134
+ ZIO SBT GitHub Query is an sbt plugin for fetching GitHub issues/PRs and building a searchable SQLite database with full-text search.
135
+
136
+ ### Installation
137
+
138
+ Add to `plugins.sbt`:
139
+
140
+ ```scala
141
+ addSbtPlugin("dev.zio" % "zio-sbt-gh-query" % "0.5.0")
142
+ ```
143
+
144
+ The plugin is auto-enabled. Configure in `build.sbt`:
145
+
146
+ ```scala
147
+ // Required: specify your GitHub repository
148
+ ghRepo := "your-org/your-repo"
149
+
150
+ // Optional: override the default data directory (defaults to .zio-sbt)
151
+ ghDir := file(".zio-sbt")
152
+ ```
153
+
154
+ ### Commands
155
+
156
+ | Command | Description |
157
+ |---------|-------------|
158
+ | `gh-sync` | Fetch data from GitHub and build/update the search database. On first run (or with `--force`), does a full fetch and rebuild. On subsequent runs, fetches only new/updated items incrementally. |
159
+ | `gh-query <query>` | Full-text search across issues and PRs. Supports `--verbose` flag to include body text. |
160
+ | `gh-status` | Show database statistics (issue/PR/comment counts, last fetch time). |
161
+
162
+ ### Usage
163
+
164
+ ```bash
165
+ # Fetch all issues/PRs and build the database
166
+ sbt gh-sync
167
+
168
+ # Incrementally fetch new/updated items
169
+ sbt gh-sync
170
+
171
+ # Re-fetch everything and rebuild from scratch
172
+ sbt "gh-sync --force"
173
+
174
+ # Basic search query
175
+ sbt "gh-query codec"
176
+
177
+ # Search with full body content
178
+ sbt "gh-query --verbose codec"
179
+
180
+ # Check database statistics
181
+ sbt gh-status
182
+ ```
183
+
184
+ ### Dependencies
185
+
186
+ The plugin checks for all required dependencies before running any command and reports clear
187
+ error messages with install instructions if anything is missing.
188
+
189
+ | Dependency | Required by | Install |
190
+ |---|---|---|
191
+ | `bash` | `gh-sync` | https://www.gnu.org/software/bash/ |
192
+ | `gh` (GitHub CLI) | `gh-sync` | https://cli.github.com |
193
+ | `jq` | `gh-sync` | https://jqlang.github.io/jq/download/ |
194
+ | `python3` | all commands | https://www.python.org/downloads/ |
195
+ | `sqlite3` with [FTS5](https://www.sqlite.org/fts5.html) | `gh-sync`, `gh-query` | Ensure your Python's sqlite3 is built with FTS5 support |
196
+
197
+ Before running `gh-sync` for the first time, authenticate the GitHub CLI:
198
+
199
+ ```bash
200
+ gh auth login
201
+ ```
202
+
203
+ The authenticated account must have read access to the target repository.
204
+
205
+ ### Database Schema
206
+
207
+ The plugin creates a SQLite database with:
208
+
209
+ - `issues` table - stores issues and PRs
210
+ - `comments` table - stores issue and PR comments
211
+ - `search_index` - FTS5 full-text search index (requires SQLite built with FTS5 enabled)
212
+
128
213
  ## Testing Strategies
129
214
 
130
215
  ### Default Testing Strategy
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@zio.dev/zio-sbt",
3
3
  "description": "ZIO SBT Documentation",
4
4
  "license": "Apache-2.0",
5
- "version": "0.4.10",
5
+ "version": "0.5.0",
6
6
  "repository": {
7
7
  "url": "https://github.com/zio/zio-sbt"
8
8
  }