YDX-2147483647 / best-of-bits

🏆 北京理工大学相关的精选列表。(又名 bytes)A ranked list of awesome BITs — projects related to Beijing Institute of Technology. (aka. bytes)
https://best.haobit.top
Creative Commons Attribution Share Alike 4.0 International
143 stars 5 forks source link

配置:Releases 中的“➕ Added Projects”总是落后 #147

Closed YDX-2147483647 closed 10 months ago

YDX-2147483647 commented 10 months ago

问题

https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.26https://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 总是慢一拍。此问题可以复现。

时间分析

可能的原因

best-of 原本设计是每周更新一次,现在降为每月一次,有可能不兼容了。

YDX-2147483647 commented 10 months ago

先用 https://github.com/YDX-2147483647/best-of-bits/blob/023ec602a1f9c097e4d2742129135136c5550ad3/history/2023-11-26_changes.md 等手动更正了一些。以下是 releases 原本的内容。

2023.11.26 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.11.26 ## 📈 Trending Up _Projects that have a higher project-quality score compared to the last update. There might be a variety of reasons, such as increased downloads or code activity._ - BIT_yanhe_download - 🥇9 · ⭐ 18 · 📈 · MIT · 🐍Python
北京理工大学延河课堂回放下载器. - BIT101-Android - 🥈5 · ⭐ 10 · 📈 · ❗️AGPL-3.0
针对北京理工大学搞的怪安卓. - 组织部芝士虾 - 🥉2 · 🐣 · ❗Unlicensed
2023年夏在QQ群“2022网协组织部”发生的 stand alone complex 现象。. ## ➕ Added Projects _Projects that were recently added to this best-of list._ - biteduML - 🥈5 · ⭐ 58 · 💀 · ❗Unlicensed
北京理工大学Python机器学习应用超详细学习笔记和代码注释(未完待续). - BIT_Second_Round_Exam - 🥈5 · ⭐ 19 · 💀 · ❗Unlicensed
北京理工大学复试历年上机代码.
2023.10.26 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.26 ## 📈 Trending Up _Projects that have a higher project-quality score compared to the last update. There might be a variety of reasons, such as increased downloads or code activity._ - BIT_yanhe_download - 🥇7 · ⭐ 15 · 📈 · MIT · 🐍Python
北京理工大学延河课堂回放下载器. - Batch_Collections ➡️ Campus_network - 🥉2 · ⭐ 3 · 📈 · ❗️WTFPL · 🐍Python
校园网脚本(登录、登出,自动重连). ## 📉 Trending Down _Projects that have a lower project-quality score compared to the last update. There might be a variety of reasons such as decreased downloads or code activity._ - BIT101-Android - 🥈4 · ⭐ 9 · 📉 · ❗️AGPL-3.0
针对北京理工大学搞的怪安卓. - 组织部芝士虾 - 🥉1 · 🐣 · ❗Unlicensed
2023年夏在QQ群“2022网协组织部”发生的 stand alone complex 现象。.
2023.10.19 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.19 ## 📈 Trending Up _Projects that have a higher project-quality score compared to the last update. There might be a variety of reasons, such as increased downloads or code activity._ - vouv/srun - 🥇13 · ⭐ 98 · 📈 · MIT · 💨Go
北京理工大学校园网命令行登录工具,多系统支持. - Bulletin Issues Transferred - 🥇11 · ⭐ 25 · 📈 · MIT · 🕸️Web
汇总 BIT 各种网站的通知。(以及钉钉、RSS插件等). - bitroom (Book an Incongruent Topological Room Or be Out of Mind) - 🥇8 · 🐣 · MIT · 🐍Python
BIT 场地预约查询接口。(bitroom)🚩🏠. - detect-BITOJ - 🥉2 · ⭐ 2 · 📈 · ❗Unlicensed · 🐍Python
探测BIT乐学OJ的保密测试用例(合法方法). ## 📉 Trending Down _Projects that have a lower project-quality score compared to the last update. There might be a variety of reasons such as decreased downloads or code activity._ - Signs - 🥇5 · 🐣 · MIT
整理腾讯在线收集表的签名。(适用于班级远程签字). - BIT101-GO - 🥉4 · ⭐ 4 · 📉 · ❗️AGPL-3.0 · 💨Go
针对北京理工大学搞的怪东西后面的东西.
2023.10.12 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.12 ## 📉 Trending Down _Projects that have a lower project-quality score compared to the last update. There might be a variety of reasons such as decreased downloads or code activity._ - vouv/srun - 🥇12 · ⭐ 98 · 📉 · MIT · 💨Go
北京理工大学校园网命令行登录工具,多系统支持. - bitroom (Book an Incongruent Topological Room Or be Out of Mind) - 🥇7 · 🐣 · MIT · 🐍Python
BIT 场地预约查询接口。(bitroom)🚩🏠. - PySPT - 🥈5 · ⭐ 14 · 📉 · MIT · 🐍Python
Python信号处理工具箱 Python Signal Processing Toolbox. - BIT-Courses-for-C-and-CPP - 🥉2 · ⭐ 5 · 📉 · ❗Unlicensed
北京理工大学C语言程序设计、程序设计方法与实践、数据结构与算法设计等课程题目程序整理(更新中). - 一点儿北理地图 - 🥉2 · ⭐ 4 · 📉 · ❗Unlicensed · 🕸️Web
一个校园地图。 校内:https://map.bitnp.net/ 。 旧版:https://capchdo.com/xyc/map 。.
2023.10.05 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.10.05 ## 📈 Trending Up _Projects that have a higher project-quality score compared to the last update. There might be a variety of reasons, such as increased downloads or code activity._ - BIT101 - 🥇9 · ⭐ 63 · 📈 · ❗️AGPL-3.0 · 🕸️Web
百丽宫攻略、课程评价及资料、课表、查成绩。. - BIT101-GO - 🥈5 · ⭐ 4 · 🐣 · ❗️AGPL-3.0 · 💨Go
针对北京理工大学搞的怪东西后面的东西. - BIT_yanhe_download - 🥇4 · ⭐ 10 · 🐣 · MIT · 🐍Python
北京理工大学延河课堂回放下载器. ## 📉 Trending Down _Projects that have a lower project-quality score compared to the last update. There might be a variety of reasons such as decreased downloads or code activity._ - BIT101-Android - 🥈5 · ⭐ 8 · 🐣 · ❗️AGPL-3.0
针对北京理工大学搞的怪安卓. - BlockIt - 🥉3 · 🐣 · MIT
⚠️ 该仓库重新调整定位中! 提高您的Verilog设计工作效率!.
2023.09.28 https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.09.28 ## 📈 Trending Up _Projects that have a higher project-quality score compared to the last update. There might be a variety of reasons, such as increased downloads or code activity._ - BIT101-Android - 🥈6 · ⭐ 8 · 🐣 · ❗️AGPL-3.0
针对北京理工大学搞的怪安卓. - BIT101-GO - 🥉4 · ⭐ 3 · 🐣 · ❗️AGPL-3.0 · 💨Go
针对北京理工大学搞的怪东西后面的东西. - 数字信号处理 - 🥉3 · ⭐ 5 · 📈 · ❗️GPL-3.0 · 🐍Python
北京理工大学《数字信号处理》课程教学资料,采用Matlab和Python实现仿真。. ## 📉 Trending Down _Projects that have a lower project-quality score compared to the last update. There might be a variety of reasons such as decreased downloads or code activity._ - bitroom (Book an Incongruent Topological Room Or be Out of Mind) - 🥇8 · 🐣 · MIT · 🐍Python
BIT 场地预约查询接口。(bitroom)🚩🏠. - Batch_Collections ➡️ Campus_network - 🥉2 · ⭐ 3 · 📉 · ❗️WTFPL · 🐍Python
校园网脚本(登录、登出,自动重连).
YDX-2147483647 commented 10 months ago
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
  }
]
YDX-2147483647 commented 10 months ago

https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.07.30https://github.com/YDX-2147483647/best-of-bits/releases/tag/2023.09.21 现已全部手动更正。

YDX-2147483647 commented 10 months ago

大约是 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正常。