Discussions » Greasy Fork Feedback

Webhook triggered but script was not update

§
Posted: 05 September 2022
Edited: 05 September 2022

I've set up a webhook on my GitHub repo and should be triggered on the release event.
But when I did a release, the script in GreasyFork didn't get updated.
I've checked the webhook response and it was 200 but the body said {"message":"No scripts found for this release."}.
How could I fix this?
Here are the GitHub repo and the script page.
Below are the contents of the webhook request and response.

Request

Request URL: https://greasyfork.org/en/users/57176-peng-devs/webhook
Request method: POST
Accept: */*
content-type: application/json
User-Agent: GitHub-Hookshot/bcb466c
X-GitHub-Delivery: f99e7030-2d05-11ed-93b8-15206810dbd9
X-GitHub-Event: release
X-GitHub-Hook-ID: 377690824
X-GitHub-Hook-Installation-Target-ID: 532827334
X-GitHub-Hook-Installation-Target-Type: repository
X-Hub-Signature: sha1=c9cc8b19c7a3836adcec43c5fb3c96efb2ce29fe
X-Hub-Signature-256: sha256=1f8eca24ca7b1c727425e2d73cf88c17c576cfeed67ed4b596c61cbe78db8109

{
  "action": "published",
  "release": {
    "url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/releases/76275497",
    "assets_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/releases/76275497/assets",
    "upload_url": "https://uploads.github.com/repos/peng-devs/grease-fork-deployment/releases/76275497/assets{?name,label}",
    "html_url": "https://github.com/peng-devs/grease-fork-deployment/releases/tag/0.0.5",
    "id": 76275497,
    "author": {
      "login": "github-actions[bot]",
      "id": 41898282,
      "node_id": "MDM6Qm90NDE4OTgyODI=",
      "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github-actions%5Bbot%5D",
      "html_url": "https://github.com/apps/github-actions",
      "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
      "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
      "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
      "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
      "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
      "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
      "type": "Bot",
      "site_admin": false
    },
    "node_id": "RE_kwDOH8JMxs4Ei98p",
    "tag_name": "0.0.5",
    "target_commitish": "main",
    "name": "0.0.5",
    "draft": false,
    "prerelease": false,
    "created_at": "2022-09-05T10:31:10Z",
    "published_at": "2022-09-05T10:32:00Z",
    "assets": [

    ],
    "tarball_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/tarball/0.0.5",
    "zipball_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/zipball/0.0.5",
    "body": ""
  },
  "repository": {
    "id": 532827334,
    "node_id": "R_kgDOH8JMxg",
    "name": "grease-fork-deployment",
    "full_name": "peng-devs/grease-fork-deployment",
    "private": false,
    "owner": {
      "login": "peng-devs",
      "id": 37236002,
      "node_id": "MDQ6VXNlcjM3MjM2MDAy",
      "avatar_url": "https://avatars.githubusercontent.com/u/37236002?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/peng-devs",
      "html_url": "https://github.com/peng-devs",
      "followers_url": "https://api.github.com/users/peng-devs/followers",
      "following_url": "https://api.github.com/users/peng-devs/following{/other_user}",
      "gists_url": "https://api.github.com/users/peng-devs/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/peng-devs/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/peng-devs/subscriptions",
      "organizations_url": "https://api.github.com/users/peng-devs/orgs",
      "repos_url": "https://api.github.com/users/peng-devs/repos",
      "events_url": "https://api.github.com/users/peng-devs/events{/privacy}",
      "received_events_url": "https://api.github.com/users/peng-devs/received_events",
      "type": "User",
      "site_admin": false
    },
    "html_url": "https://github.com/peng-devs/grease-fork-deployment",
    "description": "Just a simple project for testing Greasy Fork webhook deployment feature.",
    "fork": false,
    "url": "https://api.github.com/repos/peng-devs/grease-fork-deployment",
    "forks_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/forks",
    "keys_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/teams",
    "hooks_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/hooks",
    "issue_events_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/issues/events{/number}",
    "events_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/events",
    "assignees_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/assignees{/user}",
    "branches_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/branches{/branch}",
    "tags_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/tags",
    "blobs_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/languages",
    "stargazers_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/stargazers",
    "contributors_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/contributors",
    "subscribers_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/subscribers",
    "subscription_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/subscription",
    "commits_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/contents/{+path}",
    "compare_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/merges",
    "archive_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/downloads",
    "issues_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/issues{/number}",
    "pulls_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/labels{/name}",
    "releases_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/releases{/id}",
    "deployments_url": "https://api.github.com/repos/peng-devs/grease-fork-deployment/deployments",
    "created_at": "2022-09-05T09:17:56Z",
    "updated_at": "2022-09-05T10:21:55Z",
    "pushed_at": "2022-09-05T10:31:24Z",
    "git_url": "git://github.com/peng-devs/grease-fork-deployment.git",
    "ssh_url": "git@github.com:peng-devs/grease-fork-deployment.git",
    "clone_url": "https://github.com/peng-devs/grease-fork-deployment.git",
    "svn_url": "https://github.com/peng-devs/grease-fork-deployment",
    "homepage": null,
    "size": 15,
    "stargazers_count": 0,
    "watchers_count": 0,
    "language": "TypeScript",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 0,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 0,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "allow_forking": true,
    "is_template": false,
    "web_commit_signoff_required": false,
    "topics": [

    ],
    "visibility": "public",
    "forks": 0,
    "open_issues": 0,
    "watchers": 0,
    "default_branch": "main"
  },
  "sender": {
    "login": "github-actions[bot]",
    "id": 41898282,
    "node_id": "MDM6Qm90NDE4OTgyODI=",
    "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/github-actions%5Bbot%5D",
    "html_url": "https://github.com/apps/github-actions",
    "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
    "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
    "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
    "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
    "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
    "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
    "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
    "type": "Bot",
    "site_admin": false
  }
}

Response

Access-Control-Allow-Origin: *
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Sep 2022 10:55:32 GMT
Etag: W/"b9ddcdb9d780c06b100bfaa4ed96e72e"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Strict-Transport-Security: max-age=31536000
Vary: Accept
X-Backend-Server: janeway
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: c0d0b6d5-cd6b-4bbf-b564-223fd54dff6c
X-Runtime: 0.038141
X-Xss-Protection: 0

{"message":"No scripts found for this release."}
§
Posted: 05 September 2022

This is because the URL you used for syncing, https://github.com/peng-devs/grease-fork-deployment/releases/latest/download/grease-fork-deployment.user.js, was not a recognized format by the site. I've fixed this and it should be working now.

§
Posted: 05 September 2022

Still not working. I've tried another release but the script is still not updated.
The webhook response is here.

Access-Control-Allow-Origin: *
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Sep 2022 23:01:26 GMT
Etag: W/"3a9920af96e19ec8b76600adcd047fc2"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Strict-Transport-Security: max-age=31536000
Vary: Accept
X-Backend-Server: archer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: ec171140-b3b4-45ab-b3d0-df7da09beac0
X-Runtime: 0.046700
X-Xss-Protection: 0

{"updated_scripts":[],"updated_failed":[]}
§
Posted: 06 September 2022

Does https://github.com/peng-devs/grease-fork-deployment/releases/latest/download/grease-fork-deployment.user.js actually exist in the repo or is this just the output of a build process? Because it's looking in git for the files.

§
Posted: 06 September 2022
Edited: 06 September 2022

It does not exist in the repo.
The link will always point to the latest release asset which is built by the CI process because I thought you would just easily re-pulling the sync URL when the webhook is triggered.
So that means I have to commit the built script in the repo?

§
Posted: 06 September 2022

It can be fixed to work for your use case, but it's not working right now. It expects the file to exist in git, and it downloads it with git.

Normal syncing (once every 24h) should still work as that uses the actual URL you provide.

§
Posted: 06 September 2022

Ok, guess I have to work around it. Anyway, thanks for the help.

Post reply

Sign in to post a reply.