Closed YDX-2147483647 closed 10 months ago
先用 https://github.com/YDX-2147483647/best-of-bits/blob/023ec602a1f9c097e4d2742129135136c5550ad3/history/2023-11-26_changes.md 等手动更正了一些。以下是 releases 原本的内容。
2023.11.26
MIT
· 🐍Python
❗️AGPL-3.0
❗Unlicensed
❗Unlicensed
❗Unlicensed
2023.10.26
MIT
· 🐍Python
❗️WTFPL
· 🐍Python
❗️AGPL-3.0
❗Unlicensed
2023.10.19
MIT
· 💨Go
MIT
· 🕸️Web
MIT
· 🐍Python
❗Unlicensed
· 🐍Python
MIT
❗️AGPL-3.0
· 💨Go
2023.10.12
MIT
· 💨Go
MIT
· 🐍Python
MIT
· 🐍Python
❗Unlicensed
❗Unlicensed
· 🕸️Web
2023.10.05
❗️AGPL-3.0
· 🕸️Web
❗️AGPL-3.0
· 💨Go
MIT
· 🐍Python
❗️AGPL-3.0
MIT
2023.09.28
❗️AGPL-3.0
❗️AGPL-3.0
· 💨Go
❗️GPL-3.0
· 🐍Python
MIT
· 🐍Python
❗️WTFPL
· 🐍Python
import { crypto } from "https://deno.land/std@0.207.0/crypto/mod.ts"
import { encodeHex } from "https://deno.land/std@0.207.0/encoding/hex.ts"
import { Octokit } from "https://esm.sh/octokit@3.1.2?dts"
async function trimmed_hash(text: string): Promise<string> {
return encodeHex(
await crypto.subtle.digest(
"SHA-256",
new TextEncoder().encode(text.trimEnd()),
),
)
}
const octokit = new Octokit({
auth: `personal-access-token123`,
})
const data = (await octokit.request("GET /repos/{owner}/{repo}/releases", {
owner: "YDX-2147483647",
repo: "best-of-bits",
headers: {
"X-GitHub-Api-Version": "2022-11-28",
},
})).data as { tag_name: string; body: string }[]
const hashes = await Promise.all(
data.map(
async ({ tag_name, body: released_body }) => {
const local_body = await Deno.readTextFile(
`history/${tag_name.replaceAll(".", "-")}_changes.md`,
)
const local_hash = await trimmed_hash(local_body)
const released_hash = await trimmed_hash(released_body)
return {
tag_name,
local_hash,
released_hash,
match: local_hash == released_hash,
}
},
),
)
console.log(hashes)
Deno.exit(0)
deno run --allow-env=USERPROFILE --allow-net=api.github.com --allow-read=./history ./releases.ts
[
{
tag_name: "2023.11.26",
local_hash: "e3d58032b3cf3009b230c7d6ccdf6a34075215f861e25d966f40a531ba60ce74",
released_hash: "e3d58032b3cf3009b230c7d6ccdf6a34075215f861e25d966f40a531ba60ce74",
match: true
},
{
tag_name: "2023.10.26",
local_hash: "320840b9a40450e0d5536f4b907e281d03424f7dde582e476edea4674560d4c0",
released_hash: "320840b9a40450e0d5536f4b907e281d03424f7dde582e476edea4674560d4c0",
match: true
},
{
tag_name: "2023.10.19",
local_hash: "5230a75e61c230af39e7d0c7c49585b478302425d23e3aff86022af73fe6e018",
released_hash: "5230a75e61c230af39e7d0c7c49585b478302425d23e3aff86022af73fe6e018",
match: true
},
{
tag_name: "2023.10.12",
local_hash: "b3034da175328e2acc364385629cbd9b5596d9cc28cedaa0caf98fe49528809a",
released_hash: "b3034da175328e2acc364385629cbd9b5596d9cc28cedaa0caf98fe49528809a",
match: true
},
{
tag_name: "2023.10.05",
local_hash: "e6f5c297eabcbca2d0d49a2b3515bd8a5cbc719cde025c84497035b7f84c52c6",
released_hash: "e6f5c297eabcbca2d0d49a2b3515bd8a5cbc719cde025c84497035b7f84c52c6",
match: true
},
{
tag_name: "2023.09.28",
local_hash: "a6b6435471eeb9727af17b498ba254da13e5ac6d7cbe14ec042d4f83bb449539",
released_hash: "a6b6435471eeb9727af17b498ba254da13e5ac6d7cbe14ec042d4f83bb449539",
match: true
},
{
tag_name: "2023.09.21",
local_hash: "a0dacae1fe82b92d2f05ac59bff24c3462ba5ca265ed15884d7d2044e431eac6",
released_hash: "ccb39698d2986926c4143f81704d214dcf0995116e99de168ea344da1c2ab0fa",
match: false
},
{
tag_name: "2023.09.14",
local_hash: "ccb39698d2986926c4143f81704d214dcf0995116e99de168ea344da1c2ab0fa",
released_hash: "58354970a3008033ff911085bad5916eacdfe3f1d752bf22e6ffdd3d1564832c",
match: false
},
{
tag_name: "2023.09.07",
local_hash: "58354970a3008033ff911085bad5916eacdfe3f1d752bf22e6ffdd3d1564832c",
released_hash: "ab1e64c503eaf6bf55a94f76ae28da7aeb7d9310ce0b7ab7edf9c4ce306dd37b",
match: false
},
{
tag_name: "2023.08.31",
local_hash: "ab1e64c503eaf6bf55a94f76ae28da7aeb7d9310ce0b7ab7edf9c4ce306dd37b",
released_hash: "5f7314d64aa687278972afedab5ab72508cdf423dc8c066f379dd2065acf0e59",
match: false
},
{
tag_name: "2023.08.24",
local_hash: "5f7314d64aa687278972afedab5ab72508cdf423dc8c066f379dd2065acf0e59",
released_hash: "566693ae4f5754394345c2e79f6d69d3cb7a020e1b2fe96f69e8783d42cbc6dd",
match: false
},
{
tag_name: "2023.08.17",
local_hash: "566693ae4f5754394345c2e79f6d69d3cb7a020e1b2fe96f69e8783d42cbc6dd",
released_hash: "4580d7c42cd7c873aafa989fbf5c043ccb0e49fbd79337825c37542541658ec4",
match: false
},
{
tag_name: "2023.08.10",
local_hash: "4580d7c42cd7c873aafa989fbf5c043ccb0e49fbd79337825c37542541658ec4",
released_hash: "c157061759f12d500f7910247d531830b38de6ee8ae9ba7d82dbaee523d1223c",
match: false
},
{
tag_name: "2023.08.03",
local_hash: "c157061759f12d500f7910247d531830b38de6ee8ae9ba7d82dbaee523d1223c",
released_hash: "5d62a4cf558a3ad7087e3355635bd01c988fb203f9515dee30fab20e73978521",
match: false
},
{
tag_name: "2023.07.30",
local_hash: "5d62a4cf558a3ad7087e3355635bd01c988fb203f9515dee30fab20e73978521",
released_hash: "82c2ca58da87b8561bdebfbf9b284ba0a56f2b04fe62d4b0f5aea6922565062c",
match: false
},
{
tag_name: "2023.07.27",
local_hash: "82c2ca58da87b8561bdebfbf9b284ba0a56f2b04fe62d4b0f5aea6922565062c",
released_hash: "82c2ca58da87b8561bdebfbf9b284ba0a56f2b04fe62d4b0f5aea6922565062c",
match: true
},
{
tag_name: "2023.07.20",
local_hash: "1a3f5261ddbcdfe20da98fd7789656166c6a6eaf16e6d488a59d3c0de51f7641",
released_hash: "1a3f5261ddbcdfe20da98fd7789656166c6a6eaf16e6d488a59d3c0de51f7641",
match: true
},
{
tag_name: "2023.07.13",
local_hash: "625e2b1d05abc97b4b6664047575b2ce09576980f723de23a33e86fc16ae44b7",
released_hash: "625e2b1d05abc97b4b6664047575b2ce09576980f723de23a33e86fc16ae44b7",
match: true
},
{
tag_name: "2023.07.10",
local_hash: "bd5343de41fa1869a7183178f9622e991d25aea956eac94afb85f15aa0613f28",
released_hash: "4e5f0d16e6d93057d6eca5af37db066adddbc7cdfdede9df61443e7022a1d602",
match: false
},
{
tag_name: "2023.07.06",
local_hash: "3d310ca19e45a7a8da925325bd147536ac778a99cc6ab336b39e61f88d8d2b43",
released_hash: "3d310ca19e45a7a8da925325bd147536ac778a99cc6ab336b39e61f88d8d2b43",
match: true
},
{
tag_name: "2023.06.30",
local_hash: "53c647cd3afd4f1ae67ff3088b276eb53b1590fc7fef0aa54a0d1362e010477e",
released_hash: "53c647cd3afd4f1ae67ff3088b276eb53b1590fc7fef0aa54a0d1362e010477e",
match: true
},
{
tag_name: "2023.06.29",
local_hash: "6f64e0adaf98521023499f1452c9790eb1bfbde0a51b703055cb1315ab9c5131",
released_hash: "6f64e0adaf98521023499f1452c9790eb1bfbde0a51b703055cb1315ab9c5131",
match: true
},
{
tag_name: "2023.06.22",
local_hash: "66142102173d54b022fc54f1d8c353d98fa7394331eb0716de2a4e4e380e1e1a",
released_hash: "1184fff915d752957404ce4c45a7f1568be88054ca2ee4b55ab36e3c661431dd",
match: false
},
{
tag_name: "2023.06.15",
local_hash: "af89b7871d09fa5bb3b4d57b67d60d7ec54a793a30335d43df11db7b536513eb",
released_hash: "af89b7871d09fa5bb3b4d57b67d60d7ec54a793a30335d43df11db7b536513eb",
match: true
},
{
tag_name: "2023.06.08",
local_hash: "461aed74771adf61ad92fbb7a7f41266d3a608ddcdd1afe944038709096a53c9",
released_hash: "461aed74771adf61ad92fbb7a7f41266d3a608ddcdd1afe944038709096a53c9",
match: true
},
{
tag_name: "2023.06.01",
local_hash: "0a9c469a632307bc0d25f93ee2e5ad377eca8b49748cf154dba2d0a5e5195e21",
released_hash: "b9e642e5236f8cbf5993958af7a52db1400dc1b3a8642e67bd6085922592eb28",
match: false
},
{
tag_name: "2023.05.25",
local_hash: "289dfdd2d625791234f1c96a95859af2269384e218aca2c070b8cfba12b06c83",
released_hash: "289dfdd2d625791234f1c96a95859af2269384e218aca2c070b8cfba12b06c83",
match: true
},
{
tag_name: "2023.05.18",
local_hash: "a3c8a46c89aac755341d8c097b1dbc055bf287e752c965e169b0190c444d2da6",
released_hash: "a3c8a46c89aac755341d8c097b1dbc055bf287e752c965e169b0190c444d2da6",
match: true
},
{
tag_name: "2023.05.12",
local_hash: "84ec8f36ce336ad43261651d3f7d76322a2ece63854368b1f16984483a4a475d",
released_hash: "c71f67c930b08b5f48e5208e9abadd741e48e0bcf22dcb7725eb519b7e4f7cde",
match: false
},
{
tag_name: "2023.05.11",
local_hash: "c04654397c9008d871ba33a3bd4d436bce492f4b15424acf561627f973af7fd4",
released_hash: "c04654397c9008d871ba33a3bd4d436bce492f4b15424acf561627f973af7fd4",
match: true
}
]
大约是 https://github.com/softprops/action-gh-release/blob/c9b46fe7aad9f02afd89b12450b780f52dacfb2d/src/util.ts#L32-L38 的问题,设置body_path: "latest-changes.md"
不行,但直接cat latest-changes.md
存到 $GITHUB_OUTPUT
,再设置body
正常。
问题
https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.26 与 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.11.26 之间的11月20日添加了 bit-genshin (#143),但 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.11.26 的“➕ Added Projects”一节并未列出它。
然而 https://github.com/YDX-2147483647/best-of-bits/blob/023ec602a1f9c097e4d2742129135136c5550ad3/history/2023-11-26_changes.md 的内容和 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.11.26 有很大差异。对比
history/*_changes.md
与 releases,似乎 releases 总是慢一拍。此问题可以复现。时间分析
127 是10月19日合并的。
93 是7月29日合并的。
可能的原因
best-of 原本设计是每周更新一次,现在降为每月一次,有可能不兼容了。