HammerCloth/BangumiCalendar-python

fork 仓库后github action运行出现问题

Closed this issue · 21 comments

Run ad-m/github-push-action@master
  
Push to branch main
remote: Permission to Nine499/BangumiCalendar-python.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/Nine499/BangumiCalendar-python.git/': The requested URL returned error: 403
Error: Invalid exit code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:29:21)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:[16](https://github.com/Nine499/BangumiCalendar-python/actions/runs/3918003566/jobs/6698140147#step:7:17))
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
  code: 128
}
Error: Invalid exit code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:29:[21](https://github.com/Nine499/BangumiCalendar-python/actions/runs/3918003566/jobs/6698140147#step:7:22))
    at ChildProcess.emit (node:events:390:[28](https://github.com/Nine499/BangumiCalendar-python/actions/runs/3918003566/jobs/6698140147#step:7:29))
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

在GitHub setting 中配置sercet,这是指的什么?
我的操作是,点击我 fork 仓库的设置,点击 Secrets and variables 里面的 Actions,
点击 New repository secret ,name : USERID value : t9_233

感谢🙏
@Nine499
remote: Permission to Nine499/BangumiCalendar-python.git denied to github-actions[bot].
参考doc,
https://docs.github.com/zh/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository
在“工作流权限”下,使用“允许 GitHub Actions 创建和批准拉取请求”设置配置 GITHUB_TOKEN 是否可以创建和批准拉取请求。
也可以参考这个issue
ad-m/github-push-action#96

在GitHub setting 中配置sercet,这是指的什么? 我的操作是,点击我 fork 仓库的设置,点击 Secrets and variables 里面的 Actions, 点击 New repository secret ,name : USERID value : t9_233

具体步骤是这样的,但是需要注意value中需要填写你在番组计划中的userid,和用户名不同

在“工作流权限”下,使用“允许 GitHub Actions 创建和批准拉取请求”设置配置 GITHUB_TOKEN 是否可以创建和批准拉取请求。
也可以参考这个issue

Allow GitHub Actions to create and approve pull requests
你指的是这个选项我应该打勾吗

成功运行

https://files.catbox.moe/78xaau.zip

github Actions 的 log @HammerCloth

建议在线下环境调试一下,你的userid可能是错的

https://files.catbox.moe/78xaau.zip
github Actions 的 log @HammerCloth

建议在线下环境调试一下,你的userid可能是错的

https://bgm.tv/user/t9_233

https://files.catbox.moe/78xaau.zip
github Actions 的 log @HammerCloth

建议在线下环境调试一下,你的userid可能是错的

https://bgm.tv/user/t9_233

这样看来userid 没有问题

https://files.catbox.moe/78xaau.zip
github Actions 的 log @HammerCloth

建议在线下环境调试一下,你的userid可能是错的

……可惜我没有线下环境,无法排错,只能放弃使用你的项目了,谢谢开发

https://files.catbox.moe/78xaau.zip
github Actions 的 log @HammerCloth

建议在线下环境调试一下,你的userid可能是错的

https://bgm.tv/user/t9_233

这样看来userid 没有问题

我换了其他人的id,也无法正常更新

……我看你提交了一个更新,是不是修复了

@Nine499 你好我刚刚查看了代码,修复了这个问题,你可以同步到你的仓库看一下

……我看你提交了一个更新,是不是修复了

犯了一个低级错误

……我看你提交了一个更新,是不是修复了

犯了一个低级错误

Run python main.py
  
Traceback (most recent call last):
  File "/home/runner/work/bgm-mi/bgm-mi/main.py", line 19, in <module>
    data.geteps()
  File "/home/runner/work/bgm-mi/bgm-mi/reptile.py", line 36, in geteps
    eps = page.json()["data"]
KeyError: 'data'
Error: Process completed with exit code 1.

@Nine499
兄弟我修复了这个问题,因为我之前没有限定条目的类型,导致在玩的游戏条目也会获取。从而导致解析数据报错,现在应该不会有问题了

@Nine499 兄弟我修复了这个问题,因为我之前没有限定条目的类型,导致在玩的游戏条目也会获取。从而导致解析数据报错,现在应该不会有问题了

https://github.com/Nine499/bgm-mi/blob/main/target.ics

好像正常了