Greasy Fork is available in English.

Discussões » Feedback do Greasy Fork

github webhook不起作用

§
Publicado: 15/11/2022

我添加了github的webhook,然后push代码,github显示也成功了,为啥代码没有更新呢?

请求的payload

{
  "ref": "refs/heads/main",
  "before": "f29d947021ba2dec76379d261e05b58012a888e2",
  "after": "e3f63a41d6d4249aab4f5373ee7af344c37e546f",
  "repository": {
    "id": 566247695,
    "node_id": "R_kgDOIcBBDw",
    "name": "TamperMonkeyScripts",
    "full_name": "Zhangyanshen/TamperMonkeyScripts",
    "private": false,
    "owner": {
      "name": "Zhangyanshen",
      "email": "zhangyanshen86@163.com",
      "login": "Zhangyanshen",
      "id": 16679925,
      "node_id": "MDQ6VXNlcjE2Njc5OTI1",
      "avatar_url": "https://avatars.githubusercontent.com/u/16679925?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/Zhangyanshen",
      "html_url": "https://github.com/Zhangyanshen",
      "followers_url": "https://api.github.com/users/Zhangyanshen/followers",
      "following_url": "https://api.github.com/users/Zhangyanshen/following{/other_user}",
      "gists_url": "https://api.github.com/users/Zhangyanshen/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Zhangyanshen/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Zhangyanshen/subscriptions",
      "organizations_url": "https://api.github.com/users/Zhangyanshen/orgs",
      "repos_url": "https://api.github.com/users/Zhangyanshen/repos",
      "events_url": "https://api.github.com/users/Zhangyanshen/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Zhangyanshen/received_events",
      "type": "User",
      "site_admin": false
    },
    "html_url": "https://github.com/Zhangyanshen/TamperMonkeyScripts",
    "description": "油猴脚本",
    "fork": false,
    "url": "https://github.com/Zhangyanshen/TamperMonkeyScripts",
    "forks_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/forks",
    "keys_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/teams",
    "hooks_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/hooks",
    "issue_events_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/issues/events{/number}",
    "events_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/events",
    "assignees_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/assignees{/user}",
    "branches_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/branches{/branch}",
    "tags_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/tags",
    "blobs_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/languages",
    "stargazers_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/stargazers",
    "contributors_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/contributors",
    "subscribers_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/subscribers",
    "subscription_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/subscription",
    "commits_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/contents/{+path}",
    "compare_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/merges",
    "archive_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/downloads",
    "issues_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/issues{/number}",
    "pulls_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/labels{/name}",
    "releases_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/releases{/id}",
    "deployments_url": "https://api.github.com/repos/Zhangyanshen/TamperMonkeyScripts/deployments",
    "created_at": 1668504031,
    "updated_at": "2022-11-15T09:22:54Z",
    "pushed_at": 1668506757,
    "git_url": "git://github.com/Zhangyanshen/TamperMonkeyScripts.git",
    "ssh_url": "git@github.com:Zhangyanshen/TamperMonkeyScripts.git",
    "clone_url": "https://github.com/Zhangyanshen/TamperMonkeyScripts.git",
    "svn_url": "https://github.com/Zhangyanshen/TamperMonkeyScripts",
    "homepage": null,
    "size": 0,
    "stargazers_count": 0,
    "watchers_count": 0,
    "language": "JavaScript",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "has_discussions": false,
    "forks_count": 0,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 0,
    "license": null,
    "allow_forking": true,
    "is_template": false,
    "web_commit_signoff_required": false,
    "topics": [

    ],
    "visibility": "public",
    "forks": 0,
    "open_issues": 0,
    "watchers": 0,
    "default_branch": "main",
    "stargazers": 0,
    "master_branch": "main"
  },
  "pusher": {
    "name": "Zhangyanshen",
    "email": "zhangyanshen86@163.com"
  },
  "sender": {
    "login": "Zhangyanshen",
    "id": 16679925,
    "node_id": "MDQ6VXNlcjE2Njc5OTI1",
    "avatar_url": "https://avatars.githubusercontent.com/u/16679925?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/Zhangyanshen",
    "html_url": "https://github.com/Zhangyanshen",
    "followers_url": "https://api.github.com/users/Zhangyanshen/followers",
    "following_url": "https://api.github.com/users/Zhangyanshen/following{/other_user}",
    "gists_url": "https://api.github.com/users/Zhangyanshen/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/Zhangyanshen/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/Zhangyanshen/subscriptions",
    "organizations_url": "https://api.github.com/users/Zhangyanshen/orgs",
    "repos_url": "https://api.github.com/users/Zhangyanshen/repos",
    "events_url": "https://api.github.com/users/Zhangyanshen/events{/privacy}",
    "received_events_url": "https://api.github.com/users/Zhangyanshen/received_events",
    "type": "User",
    "site_admin": false
  },
  "created": false,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  "compare": "https://github.com/Zhangyanshen/TamperMonkeyScripts/compare/f29d947021ba...e3f63a41d6d4",
  "commits": [
    {
      "id": "e3f63a41d6d4249aab4f5373ee7af344c37e546f",
      "tree_id": "847d448911bdee13af93e361c9a9a5672c67a0f2",
      "distinct": true,
      "message": "添加homepage元数据",
      "timestamp": "2022-11-15T18:05:48+08:00",
      "url": "https://github.com/Zhangyanshen/TamperMonkeyScripts/commit/e3f63a41d6d4249aab4f5373ee7af344c37e546f",
      "author": {
        "name": "Jensen",
        "email": "zys2@meitu.com"
      },
      "committer": {
        "name": "Jensen",
        "email": "zys2@meitu.com"
      },
      "added": [

      ],
      "removed": [

      ],
      "modified": [
        "bugly_crash.user.js"
      ]
    }
  ],
  "head_commit": {
    "id": "e3f63a41d6d4249aab4f5373ee7af344c37e546f",
    "tree_id": "847d448911bdee13af93e361c9a9a5672c67a0f2",
    "distinct": true,
    "message": "添加homepage元数据",
    "timestamp": "2022-11-15T18:05:48+08:00",
    "url": "https://github.com/Zhangyanshen/TamperMonkeyScripts/commit/e3f63a41d6d4249aab4f5373ee7af344c37e546f",
    "author": {
      "name": "Jensen",
      "email": "zys2@meitu.com"
    },
    "committer": {
      "name": "Jensen",
      "email": "zys2@meitu.com"
    },
    "added": [

    ],
    "removed": [

    ],
    "modified": [
      "bugly_crash.user.js"
    ]
  }
}

响应

{"updated_scripts":[],"updated_failed":[]}
§
Publicado: 28/12/2022

你去你的腳本,點Admin / 管理
裡面有一個位置放你的url
設為 raw.githubusercontent.com/.... 那個
然後點update / 更新

成功的話,那個url的空格就沒有了,變成已經sync

另外代碼歷史也會有第一次的 imported from url

之後的更新才是webhook

Publicar resposta

Faça o login para publicar uma resposta.