karin-plugin-kkk 1.0.2-commit.ced194c → 1.0.4-commit.16cac2b
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.
- package/CHANGELOG.md +7 -0
- package/lib/cli/pr.js +3 -4
- package/lib/platform/bilibili/push.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.3](https://github.com/ikenxuan/karin-plugin-kkk/compare/1.0.2-commit.ced194c...v1.0.3-commit.ced194c) (2025-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **platform/bilibili:** 优化 B 站推送中UP主信息的处理 ([079833f](https://github.com/ikenxuan/karin-plugin-kkk/commit/079833fef0a0e875f8c256f9e9898d4c0a67146f))
|
|
9
|
+
|
|
3
10
|
## [1.0.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.0.0...v1.0.1) (2025-01-15)
|
|
4
11
|
|
|
5
12
|
|
package/lib/cli/pr.js
CHANGED
|
@@ -14,16 +14,15 @@ const readPkg = () => JSON.parse(fs.readFileSync(getPkgPath(), 'utf-8'));
|
|
|
14
14
|
*/
|
|
15
15
|
const writePkg = (pkg) => fs.writeFileSync(getPkgPath(), JSON.stringify(pkg, null, 2));
|
|
16
16
|
/**
|
|
17
|
-
* @description 构建pr版本号 <主版本号>.<次版本号>.<修订号>.<PR
|
|
17
|
+
* @description 构建pr版本号 <主版本号>.<次版本号>.<修订号>.<PR标识>.<PR编号>.<当前提交唯一短哈希>
|
|
18
18
|
* @example 1.0.0.pr.184.a1b2c3d
|
|
19
19
|
* @param pkg package.json
|
|
20
20
|
*/
|
|
21
21
|
const updateVersion = (pkg) => {
|
|
22
22
|
const list = pkg.version.split('.');
|
|
23
|
-
|
|
24
|
-
const shortHash = process.env.PR_COMMIT_HASH?.substring(0, 7) ?? 'unknown';
|
|
23
|
+
const shortHash = process.env.GITHUB_SHA?.substring(0, 7) ?? 'unknown';
|
|
25
24
|
list[2] = `${Number(list[2]) + 1}`;
|
|
26
|
-
pkg.version = `${list.join('.')}
|
|
25
|
+
pkg.version = `${list.join('.')}.pr.${process.env.PR_NUMBER}.${shortHash}`;
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
28
|
* @description 设置环境变量
|
|
@@ -624,7 +624,7 @@ export class Bilibilipush extends Base {
|
|
|
624
624
|
renderOpt.push({
|
|
625
625
|
avatar_img: userInfo.data.card.face,
|
|
626
626
|
username: userInfo.data.card.name,
|
|
627
|
-
host_mid,
|
|
627
|
+
host_mid: host_mid ?? userInfo.data.card.mid,
|
|
628
628
|
fans: this.count(userInfo.data.follower),
|
|
629
629
|
total_favorited: this.count(userInfo.data.like_num),
|
|
630
630
|
following_count: this.count(userInfo.data.card.attention),
|