Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Proget: SCA Event Notifier not working



  • Hi,

    we are trying to introduce a new notifier in ProGet Version 2024.25 (Build 11).
    We are already using a custom webhook which notifies us if a package has been added.
    Now we wanted to create a webhook that notifies us if a issue has opened on one of our builds.
    d02add8f-e43c-4991-ad62-6cf1294f1339-image.png
    No special settings have been made, just basic selections. Using the default settings would be fine for first tests.
    The documentation for this type of notifier says that it is being triggered after the ComplianceAnalyzer scheduled job has been run. So I did that, but afterwards I got an error on my notifier:
    085038c1-936e-4894-be4c-0efce74c710b-image.png
    Accessing the same webhook with a package notifier works just fine, so it seems to be an issue with this specific sca event notifier.

    Is it necessary to make specific settings for this type of notifier? Or can you confirm that there is an error?

    Thanks,
    Caterina


  • inedo-engineer

    Hi @caterina ,

    It looks like there was an error processing the template (i.e. what's on the customize webhook tab). Can you share that, and maybe we can spot it?

    It's likely a syntax error of some kind.

    Thanks,
    Steve



  • Hi @stevedennis,

    as mentioned in my initial post, no customizations have been made:
    e089549a-2db4-4c0a-862c-636fa31fba13-image.png
    The package event notifier are working this way.
    I also tried to use the template from your documentation (https://docs.inedo.com/docs/proget/administration/proget-notifications-webhooks), but we got the same error:
    8d68ea27-16e3-4dc6-9d01-2b170841a0df-image.png
    Hope this helps.

    Thanks,
    Caterina


  • inedo-engineer

    Hi @caterina ,

    I was able to find the issues; the correct value should be this:

    $ToJson(%(
        issues: @BuildIssues,
        buildNumber: $BuildNumber,
        releaseNumber: $BuildReleaseNumber,
        projectName: $BuildProjectName
    ))
    

    I've updated the documentation and also ProGet (via PG-2890), which will be in teh next maintenance release. But if you use the above template it should work.

    -- Dean



  • Hi @dean-houston,

    thank you for your response. Using your provided template the webhook is working.

    The webhook is being triggered several times, but the issues property always has an empty array:
    c0496ad5-6d7a-4550-a684-a4fb6fe18814-image.png
    If I have a look at this specific build, the issues tab does not show any issues:
    1abc6a30-1743-490d-80f1-97a083b115c9-image.png

    Can you tell me why exactly the "issues opened on build"-notifier is being triggered by this build?
    We do have a lot of this cases.

    Thanks,
    Caterina


  • inedo-engineer

    Hi @caterina ,

    Looking over the code, I can see that; we will also fix that in the next maintenance release. The notifier should not be dispatched when there are 0 issues.

    -- Dean


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation