Closed a1mersnow closed 7 months ago
F, [2023-11-20T11:55:36.696751 #1280047] FATAL -- : [03263401-6183-401d-b88a-c79be953d603]
[03263401-6183-401d-b88a-c79be953d603] RuntimeError (fatal: Path 'aliyundrive-rename.user.js' does not exist in '0.2.5'
):
[03263401-6183-401d-b88a-c79be953d603]
[03263401-6183-401d-b88a-c79be953d603] lib/git.rb:10:in `block (2 levels) in get_contents'
[03263401-6183-401d-b88a-c79be953d603] lib/git.rb:8:in `each'
[03263401-6183-401d-b88a-c79be953d603] lib/git.rb:8:in `block in get_contents'
[03263401-6183-401d-b88a-c79be953d603] lib/git.rb:36:in `with_repo'
[03263401-6183-401d-b88a-c79be953d603] lib/git.rb:7:in `get_contents'
[03263401-6183-401d-b88a-c79be953d603] app/controllers/concerns/webhooks.rb:140:in `process_webhook_changes'
[03263401-6183-401d-b88a-c79be953d603] app/controllers/users_controller.rb:143:in `webhook'
It's expecting to find the file in git. It's doing git show 0.2.5:aliyundrive-rename.user.js
, but looking at your repo, that file exists only as an attachment to the release and is not in git itself.
I've made a change so that you get a better message in this scenario.
I'm not sure what exactly to do here though... The expected input is a URL on GitHub that can be translated to a path in a GitHub repo. Maybe it needs to detect if something is a release URL and if so, just download it from the release path?
First of all, the script is a compilation result, the /dist
dir shouldn't be commited to the git.
I think you can directly download the script from the "sync url" I have configed in the website when the webhook request hit the website server.
Sorry, I don't known ruby language so I can't compose a PR.
@a1mersnow see https://greasyfork.org/en/discussions/greasyfork/204541-why-is-my-webhook-update-not-working
you must place your user.js in the file tree, not in the release.
You can refer https://github.com/Ex124OJ/Ex124OJ , https://github.com/Ex124OJ/Ex124OJ/blob/main/.github/workflows/build.yml and https://github.com/Ex124OJ/Ex124OJ/tree/build/dist to get the idea.
Here is my settings of GitHub webhook:
When a release is created, released, published, it will send three requests:
However, the last one always failed.
And, there is no error message telling me why:
Request
Response