Commit Graph

226 Commits

Author SHA1 Message Date
dependabot[bot]
df6612b585
build(deps): bump org.mockito:mockito-core from 4.8.0 to 5.1.1
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 4.8.0 to 5.1.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.8.0...v5.1.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 10:36:47 +00:00
dependabot[bot]
59aa83c93e
build(deps): bump org.junit.jupiter:junit-jupiter-api (#33)
Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) from 5.9.0 to 5.9.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.0...r5.9.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 18:36:02 +08:00
3ea0f4eacb
feat(metrics): 指标信息增加 bot_id label.
由于 bot_name 不能作为机器人的唯一标识, 因此增加 bot_id 为监控平台提供唯一标识.
2023-02-21 18:32:35 +08:00
d3e18d80ca
ci(github-action): 移除针对子模块的依赖项更新.
根据目前的效果来看, 即使不指定子模块的路径, dependabot 也会检查子模块的依赖项更新情况, 因此尝试移除子模块配置.
2023-02-21 16:00:08 +08:00
1e0eebbd7e
build(deps): 更新日志相关依赖(Slf4j 2.0.6, Logback-classic 1.4.5, Kotlin-logging 3.0.5).
Slf4j: 2.0.3 -> 2.0.6
Logback-classic: 1.4.4 -> 1.4.5
Kotlin-logging: 3.0.2 -> 3.0.5
2023-02-21 15:51:28 +08:00
dependabot[bot]
6f3c1ec592
build(deps): bump org.junit.jupiter:junit-jupiter-api (#19)
Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) from 5.9.0 to 5.9.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.0...r5.9.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 15:29:54 +08:00
dependabot[bot]
c013dafdd7
build(deps): bump io.mockk:mockk from 1.13.2 to 1.13.4 in /scalabot-app (#26)
Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.2 to 1.13.4.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.13.2...v1.13.4)

---
updated-dependencies:
- dependency-name: io.mockk:mockk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 15:08:06 +08:00
dependabot[bot]
e0bfd8796c
build(deps): bump org.jetbrains.kotlin:kotlin-reflect in /scalabot-app (#29)
Bumps [org.jetbrains.kotlin:kotlin-reflect](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.8.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.20...v1.8.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 15:07:45 +08:00
dependabot[bot]
67d561c0ab
build(deps): bump org.jetbrains.kotlinx.kover from 0.5.1 to 0.6.1 (#32)
Bumps [org.jetbrains.kotlinx.kover](https://github.com/Kotlin/kotlinx-kover) from 0.5.1 to 0.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx-kover/releases)
- [Changelog](https://github.com/Kotlin/kotlinx-kover/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx-kover/compare/v0.5.1...v0.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx.kover
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 12:53:54 +08:00
63687da0bb
build(dependencies): 更新 binary-compatibility-validator 插件(0.11.1 -> 0.13.0).
更新后插件将支持 Kotlin 1.8.10 版本.
2023-02-21 12:44:06 +08:00
dependabot[bot]
cd76249c33
build(deps): bump gradle/gradle-build-action from 2.2.1 to 2.4.0 (#23)
Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](https://github.com/gradle/gradle-build-action/compare/v2.2.1...v2.4.0)

---
updated-dependencies:
- dependency-name: gradle/gradle-build-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 11:24:23 +08:00
dependabot[bot]
5a8afd1549
build(deps): bump docker/build-push-action from 3 to 4 (#18)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 11:21:09 +08:00
651569dc8f
ci(github-action): 增加 Dependabot 配置文件.
使用 Dependabot 来自动检查依赖新版本, 减轻工作量.
2023-02-21 10:51:30 +08:00
bf2ea9a367
refactor(launch): 在启动时输出 JVM 和 Kotlin 的版本号.
在日志中添加版本信息, 方便在反馈问题时可以了解出现问题所使用的环境.
2023-02-19 16:12:15 +08:00
540fe84f26
build(dependencies): 更新 Kotlin 版本(1.7.10 -> 1.8.10).
更新 Kotlin 版本, 支持新的平台优化.
2023-02-19 16:09:52 +08:00
712378b3ff
build(dependencies): 更新 telegrambots 依赖项.
将 telegrambots 依赖项更新至 6.5.0, 支持新版 Api;
已确认 telegrambots 6.5.0 版本升级了jackson-databind 版本,
因此移除 jackson-databind 的显性依赖声明.
2023-02-08 10:12:33 +08:00
961382fb56
build(dependencies): 更新 TelegramBots 依赖项的版本号.
将 TelegramBots 依赖版本升级至 6.3.0, 支持新的 Telegram Bot API.
2022-12-16 01:15:09 +08:00
34d9ece6d7
feat(logging): 支持通过参数控制日志输出级别.
通过添加新的 -D 参数 `scalabot.log.level`, 使得用户可以根据需要, 调整日志输出级别, 通过日志来自行(或协助开发者)排查问题,
对于与网络有关的 Debug 级别日志, 则由 `scalabot.log.network.verbose` 参数进行控制;
另外, 由于开发过程中可通过该参数修改日志级别, 因此移除 `logback-test.xml` 文件.
2022-11-11 18:17:05 +08:00
30a2cb34d5
refactor(launch): 将 AppPaths 从 Launcher 解耦.
解耦后有助于后续改进, 以及单元测试的编写.
2022-11-07 11:16:41 +08:00
c94e0476b5
refactor(metrics): 为指标增加 namespace 名称.
遵循 OpenMetrics 规范指南, 为运行指标添加 namespace 名称, 防止指标混乱.

BREAKING CHANGE: 运行指标名称变更,
如果用户启用了运行指标功能, 请注意修改使用指标的名称.
2022-10-28 01:33:03 +08:00
6e5cd07c51
build(dependencies): 更新依赖项版本.
更新与日志和测试有关的依赖项版本.
2022-10-25 17:18:24 +08:00
d4b1438b0b
release: 发布 0.5.2 版本. 2022-10-20 16:04:27 +08:00
90110335f5
fix: 更新 jackson-databind 依赖版本以缓解 CVE-2022-42004 漏洞.
CVE-2022-42004 漏洞报告指出, 由于 jackson-databind 的有关错误, 导致对象序列化过程可能存在数据错误的问题,
目前 jackson-databind 已发布 2.13.4.2 版本以解决该问题, 由于引入 jackson-databind 的 telegrambots 库尚未发布针对该问题的修复版本,
故在本项目中引入新版依赖项, 以确保用户不受该问题影响.
该版本已在 TelegramBots 项目(版本 6.1.0)中进行测试, 测试通过.
------------------------------------------
https://devhub.checkmarx.com/cve-details/CVE-2022-42004/
2022-10-20 01:41:48 +08:00
9c32d26c0d
fix(dependencies): 更新 Commons-codec 依赖项的版本.
由于目前从 TelegramBots-Abilities 引入的 Commons-codec 存在 Base 32 和 64 的编解码漏洞,
考虑到需要防范潜在的安全问题, 因此决定更新 Commons-codec
的版本号.
----------------
参考链接:
https://devhub.checkmarx.com/cve-details/Cxeb68d52e-5509/
2022-09-19 14:32:40 +08:00
dfab6b14bd
build(compatibility): 新增 API 兼容性检查插件(尚未启用).
新增 Jetbrains 的二进制兼容性验证插件, 该插件可确保在兼容性出现更改时及时报告出来.
计划在下一次发布版本时启用.
2022-09-19 14:28:06 +08:00
437cee499a
build(dependencies): 更新依赖项版本.
更新版本有利于维持项目安全性.
2022-09-19 01:14:31 +08:00
4c30a1ac68
ci(github-action): 更改工作流名称.
后续可能会加上 Maven 的发布, 所以把名字和文件名都改一下, 防止出现歧义.
2022-08-25 16:11:10 +08:00
3932db11a1
release: 发布 0.5.1 版本. 2022-08-23 13:40:21 +08:00
d18c059498
ci(github-action): 显性声明允许工作流写入仓库.
安全起见, 仓库将设置工作流的 Github Token 默认不可写, 因此需要在该工作流添加权限声明, 以支持其创建 Release.
2022-08-23 13:40:20 +08:00
e6b581b8cd
ci(github-action): 移除容器镜像对 windows-amd64 的构建.
windows-amd64 的镜像构建依然不太不稳定, 因此移除 windows-amd64 平台的镜像构建.
2022-08-23 13:40:18 +08:00
26d7443c87
ci(github-action): 把 Gradle Wrapper 检查步骤加入到所有构建工作流中.
单独检查 Wrapper 并不能阻止其他工作流被恶意 jar 影响, 所以取消单独的检查工作流, 并将检查步骤插入到其他构建工作流中.
2022-08-23 13:40:17 +08:00
2bf4eb684e
ci(github-action): 延长镜像构建工作流的超时时间.
鉴于镜像构建可能会很慢, 因此将时间统一延长到 15 分钟.
2022-08-23 13:40:15 +08:00
5251b62733
ci(github-action): 修改开发版镜像构建工作流的名称和配置文件名.
为了与发布版镜像构建工作流区分开来, 防止弄混乱了.
2022-08-23 13:40:13 +08:00
3ec5a8e9c3
ci(github-action): 增加自动发布工作流.
使用 Action 自动执行发布过程, 可避免不少发布问题(比如构建成品包括了其他代码, 内容错误等).
同时在确认发布版本后,将自动构建并发布容器镜像, 支持多平台.
2022-08-23 13:40:11 +08:00
62f6c08cd2
ci(github-action): 移除对测试分支的容器镜像构建.
因为要并入 main 分支了.
2022-08-23 13:40:09 +08:00
5e6f64f056
ci(github-action): 尝试为 Windows 平台构建容器镜像.
看 OpenJdk 18 应该是有对 Windows/amd64 支持的, 所以添加上去, 看看能不能构建成功.
2022-08-23 13:40:07 +08:00
a036695330
ci(github-action): 修复推送 tag 错误的问题.
修复一下这个问题, 如果不加用户名, 就会推送到 library 去.
2022-08-23 13:40:05 +08:00
e9c975f5c5
ci(github-action): 更改容器发布配置名称
忘记改名字了, 改名后会更好的识别工作流.
2022-08-23 13:40:02 +08:00
9aac42d414
ci(github-action): 增加一段容器构建发布配置.
试一下看看能不能生成容器, 如果可以的话就整合到发布工作流中.
2022-08-23 13:39:58 +08:00
5add6d9909
build(container): 增加一个 Docker Context 过滤文件.
该文件用于优化向 Docker Daemon 发送 Context 文件的文件数量, 增加之后, 从四千个文件降至143个文件, 优化显著.
2022-08-23 13:39:56 +08:00
eee6b7d2c9
build(container): 新增一个比较基础的 Dockerfile.
初步测试了一下运行, 没啥问题.
2022-08-23 13:39:53 +08:00
ff396425a7
refactor: 补充缺失代码.
由于先前的修改导致代码缺失, 我现在同意暂存功能很好用了.
2022-08-18 01:06:54 +08:00
580d9122e5
refactor(utils): 把日志记录器的获取方式改的优雅一点(对于测试来说).
由于 Kover 一直不把无代码高阶函数忽略掉, 所以稍微改一下这个日志记录器的获取方法, 让测试覆盖数据好看点(doge).
2022-08-17 23:01:06 +08:00
2a607f1129
fix(extension): 修复 ExtensionClassLoader 无法过滤非扩展包内 BotExtensionFactory 对象的问题.
按照 ServiceLoader 的规范, 文件应该是在 META-INF/services/{class} 这里的, 但当时忘记这个设计了, 导致直接判断 name == class, 然后失效.
修复好了.
2022-08-15 02:00:34 +08:00
2d6da7c1ae
build(test): 添加 Jacoco 插件.
给 Extension 模块添加 Jacoco 插件, 以后估计会开 Codecov 来统计测试覆盖率.
2022-08-15 01:45:22 +08:00
6235c5f51a
build(dependencies): 更新 Kotlin 版本(1.6.10 -> 1.7.10). 2022-08-15 01:39:08 +08:00
255a02c93c
refactor(config): 重构 AppPaths 的构造方法, 应对将来 Kotlin 更新中的特性.
先前的方法是利用了初始化与调用的顺序, 来实现的 Supplier 互补(虽然在代码中, 确实存在未初始化调用的情况, 但实际运行的时候, 会先初始化, 再调用 Supplier),
但是未来 Kotlin 的更新中,编译器会把这个操作视为未初始化错误, 所以在这次改动中修复掉这个 bug 操作.
2022-08-15 01:38:08 +08:00
dce28be9c7
fix(logging): 修复日志滚动文件路径错误.
由于在滚动格式中没有使用 DATA_LOGS 占位符, 导致在日志滚动时会把日志归档文件保存在运行目录下, 而不是指定的数据目录,
该改动已修复该问题.
2022-08-13 13:19:09 +08:00
673c6d8392
build: 为项目支持可重现构建.
为确保项目的使用者(无论是开发者, 还是最终用户)可以完全重现构建, 确保安全, 故调整相关配置, 以实现"可重现构建".
有关可重现构建, 可以看这个: https://reproducible-builds.org/
2022-08-06 03:23:35 +08:00
d586ca378e
fix(launch): 修复缺省的 Maven 中央库不遵循代理规则的问题.
这个属于漏网之鱼, 已修复.
2022-08-05 00:23:13 +08:00