Greasy Fork is available in English.

Conversaciones » Comentarios y opiniones sobre Greasy Fork

[GreasyFork Bug Report] Webhook not working for my GitHub workflow push

Publicado: 14/5/2023
Editado: 14/5/2023

I am using workflow to automatic generate the userscript based on my template.

      - name: Commit and push changes
        if: steps.version-check.outputs.has_changed == 'true'
        run: |
          git config --global "github-actions[bot]"
          git config --global "github-actions[bot]"
          git push origin --delete generated-files
          git checkout -B generated-files
          git add generated/Tabview-Youtube.user.js
          git commit -m "Userscript Generation" -m "This is automatically generated by GitHub Actions."
          git push -u origin generated-files

In GitHub, it will delete the branch generated-files and recreate the branch generated-files with the xxx.user.js

Webhook is generated in git push -u origin generated-files as per GitHub's logging, and it successfully sent to GreasyFork ("tick" mark). However, GreasyFork cannot automatically update the script, until I press "update and sync" in the admin panel.

I guess it is due to the commit is adding a file rather than modifying a file?

Publicado: 14/5/2023
Editado: 14/5/2023

Confirmed. The bug is that, it triggers only for Push Event with Modified.
Please mention in the webhook description.

I modified my workflow script to make it become "modified" instead of "added"

Publicado: 17/5/2023

Wouldn't consider that a bug... your setup seems pretty unusual. In any case, I've specified in the documentation that it's only looking for modified files.

Publicar respuesta

Inicia sesión para responder.