Discussions » Greasy Fork Feedback

Release webhook "updated_failed": Could not pull contents from git: fatal: path 'script.user.js' does not exist

§
Posted: 2024-01-29

Greasy Fork isn't updating my script on release. I am getting the following error on release.published events:

{
    "updated_scripts": [],
    "updated_failed": [
        "https://greasyfork.org/scripts/469793-reddit-expanded-community-filter"
    ],
    "message": "Could not pull contents from git: fatal: path 'script.user.js' does not exist in 'release-1.1.6'"
}

Webhook payload:

{
    "action": "published",
    "release": {
        "url": "https://api.github.com/repos/AJGranowski/reddit-expanded-community-filter-userscript/releases/138849217",
        "assets_url": "https://api.github.com/repos/AJGranowski/reddit-expanded-community-filter-userscript/releases/138849217/assets",
        "upload_url": "https://uploads.github.com/repos/AJGranowski/reddit-expanded-community-filter-userscript/releases/138849217/assets{?name,label}",
        "html_url": "https://github.com/AJGranowski/reddit-expanded-community-filter-userscript/releases/tag/release-1.1.6",
        "id": 138849217,
        "author": {
            "login": "AJGranowski",
            "id": 10159461,
            "node_id": "MDQ6VXNlcjEwMTU5NDYx",
            "avatar_url": "https://avatars.githubusercontent.com/u/10159461?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/AJGranowski",
            "html_url": "https://github.com/AJGranowski",
            "followers_url": "https://api.github.com/users/AJGranowski/followers",
            "following_url": "https://api.github.com/users/AJGranowski/following{/other_user}",
            "gists_url": "https://api.github.com/users/AJGranowski/gists{/gist_id}",
            "starred_url": "https://api.github.com/users/AJGranowski/starred{/owner}{/repo}",
            "subscriptions_url": "https://api.github.com/users/AJGranowski/subscriptions",
            "organizations_url": "https://api.github.com/users/AJGranowski/orgs",
            "repos_url": "https://api.github.com/users/AJGranowski/repos",
            "events_url": "https://api.github.com/users/AJGranowski/events{/privacy}",
            "received_events_url": "https://api.github.com/users/AJGranowski/received_events",
            "type": "User",
            "site_admin": false
        },
        "node_id": "RE_kwDOJ0J9aM4IRqvB",
        "tag_name": "release-1.1.6",
        "target_commitish": "7ba13065a545a19297055145c75fc7c66899a320",
        "name": "Release 1.1.6",
        "draft": false,
        "prerelease": false,
        "created_at": "2024-01-29T04:39:40Z",
        "published_at": "2024-01-29T04:42:34Z",
        "assets": [],
        "tarball_url": "https://api.github.com/repos/AJGranowski/reddit-expanded-community-filter-userscript/tarball/release-1.1.6",
        "zipball_url": "https://api.github.com/repos/AJGranowski/reddit-expanded-community-filter-userscript/zipball/release-1.1.6",
        "body": "Verify artifacts: `minisign -HV -P 'RWQzlcfYwjz4IPiyyUgFiCkqFuQoOfolfw4AWUwCSRBRYNDuaEqqa6h/' -m script.user.js` ([public key](https://raw.githubusercontent.com/AJGranowski/reddit-expanded-community-filter-userscript/mainline/minisign.pub))\n\n<!-- Release notes generated using configuration in .github/release.yml at 7ba13065a545a19297055145c75fc7c66899a320 -->\n\n\n\n**Full Changelog**: https://github.com/AJGranowski/reddit-expanded-community-filter-userscript/compare/release-1.1.5...release-1.1.6"
    },
    ...
}

The script's sync URL matches the format listed in Setting up a webhook, so I'm not sure what's going wrong here.

The sync URL you supply to Greasy Fork must be one of the following formats:

  • https://github.com/YourRepoName/YourProjectName/releases/latest/download/path/to/script.user.js (only for release events)

Sync URL: https://github.com/AJGranowski/reddit-expanded-community-filter-userscript/releases/latest/download/script.user.js


If the file you want it to grab is only in the release, and not in git, then it won't find it. This is a limitation with how it works right now.
JasonBarnabe

Is this still the case?

§
Posted: 2024-02-03
Edited: 2024-02-03

This question is asked many times.

Webhook for Commit Push with updated files only, not Release.

See https://github.com/JasonBarnabe/greasyfork/issues/1211#issuecomment-1826291455

§
Posted: 2024-02-04

Thank you! I assumed support for release webhooks meant reading release artifacts, but that appears to be clarified further down the page.

...
(In either case, Greasy Fork will be looking for modified files in these events.)

I assumed support for release webhooks meant reading release artifacts

I think it is a mistake. I find no one use the following:

Release -> Update the file stored in https://github.com/YourRepoName/YourProjectName/releases/latest/download/path/to/script.user.js

It requires the exactly the same path for each release.

(In either case, Greasy Fork will be looking for modified files in these events.)

Yes. This is what I clarified with Jason and he added it to make it clear.

Post reply

Sign in to post a reply.