ReleaseBell: a `website` project is accepted by the API but never syncs
-
Read against
eb9d805. Second of three small findings from the same read.routes.js:123accepts three project types when adding one:if ([ database.PROJECT_TYPE_GITHUB_MANUAL, database.PROJECT_TYPE_GITLAB, database.PROJECT_TYPE_WEBSITE ].indexOf(req.body.type) === -1) return next(new HttpError(400, 'invalid type'));But
syncReleasesByProjecthas no branch forwebsite(tasks.js:152-161), so it falls through to the "unknown type" case and returns — beforelastSuccessfulSyncAtis set at line 217.So the row is stored, never syncs, never errors, and is indistinguishable in the UI from a project that simply has no new releases. Someone who adds one waits indefinitely for a notification that cannot arrive.
If a website backend is not imminent, the cheapest honest fix is to stop accepting the type until something consumes it:
- if ([ database.PROJECT_TYPE_GITHUB_MANUAL, database.PROJECT_TYPE_GITLAB, database.PROJECT_TYPE_WEBSITE ].indexOf(req.body.type) === -1) + if ([ database.PROJECT_TYPE_GITHUB_MANUAL, database.PROJECT_TYPE_GITLAB ].indexOf(req.body.type) === -1)Worth keeping the constant and the
project_typemigration either way, since website watching is an obvious future feature. -
J joseph moved this topic from Apps
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login