I have configured a GitHub webhook in my repo that contains multiple userscripts to that the site can auto-update three of them that I have uploaded there. The ping event was delivered successfully but the actual push fails with a 403 error:

I highly suspect this is caused by me having main as my default branch name. I have found another issue here about the same problem (#1781), but it's locked because of what seems like a major misunderstanding.
Regardless of the maintainers' position re: the name of OpenUserJS.org default branch, it would be great if sync could be fixed to work with repos that have main as their default branch name. AFAICT that would require adding payload.ref !== 'refs/heads/master' && payload.ref !== 'refs/heads/main' here:
|
// Only accept commits from the `master` branch |
|
if (payload.ref !== 'refs/heads/master') { |
|
aRes.status(403).send(); // Forbidden |
|
return; |
|
} |
I have configured a GitHub webhook in my repo that contains multiple userscripts to that the site can auto-update three of them that I have uploaded there. The ping event was delivered successfully but the actual push fails with a 403 error:
I highly suspect this is caused by me having
mainas my default branch name. I have found another issue here about the same problem (#1781), but it's locked because of what seems like a major misunderstanding.Regardless of the maintainers' position re: the name of OpenUserJS.org default branch, it would be great if sync could be fixed to work with repos that have
mainas their default branch name. AFAICT that would require addingpayload.ref !== 'refs/heads/master' && payload.ref !== 'refs/heads/main'here:OpenUserJS.org/controllers/scriptStorage.js
Lines 2181 to 2185 in 0e6ec48