Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Release Bell
  3. Notification emails for manually-tracked GitHub projects link to "undefined"

Notification emails for manually-tracked GitHub projects link to "undefined"

Scheduled Pinned Locked Moved Release Bell
2 Posts 2 Posters 72 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LoudLemur
    wrote last edited by
    #1

    Read against eb9d805.

    sendNotificationEmail builds versionLink from the project type, at backend/tasks.js:266 —

    if (project.type === database.PROJECT_TYPE_GITHUB) {
        versionLink = `https://github.com/${project.name}/releases/tag/${release.version}`;
    } else if (project.type === database.PROJECT_TYPE_GITLAB) {
    

    PROJECT_TYPE_GITHUB_MANUAL ('github_manual', database.js:11) is a separate constant and is never tested, so versionLink stays undefined for every manually-added GitHub project.

    Result:

    • text body: Read more about this release at undefined (tasks.js:278)
    • HTML body: <a href="undefined"> (notification.template:78)

    Repro: add a GitHub project via the "track manually" path rather than starring it, then wait for a release notification.

    syncReleasesByProject already treats both constants as GitHub (tasks.js:152-155), which is what makes this look like an oversight rather than intent.

    One-line fix:

    --- a/backend/tasks.js
    +++ b/backend/tasks.js
    @@ -264,7 +264,7 @@ async function sendNotificationEmail(release) {
         }));
     
         let versionLink;
    -    if (project.type === database.PROJECT_TYPE_GITHUB) {
    +    if (project.type === database.PROJECT_TYPE_GITHUB || project.type === database.PROJECT_TYPE_GITHUB_MANUAL) {
             versionLink = `https://github.com/${project.name}/releases/tag/${release.version}`;
         } else if (project.type === database.PROJECT_TYPE_GITLAB) {
             versionLink = `${project.origin}/${project.name}/-/tags/${release.version}`;
    

    One question while I'm here: is git.cloudron.io the canonical repo now? The GitHub mirror is archived, so I could not open an issue or a PR there, and I could not check GitLab without an account. Line numbers above are against the mirror, so worth a sanity check if the code has moved.

    1 Reply Last reply
    0
    • J joseph moved this topic from Apps
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote last edited by
      #2

      Fixed

      1 Reply Last reply
      1

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search