Skip to content

Follow-up from "Fix incident noteable_kind and update comment"

The following discussions from !2375 (merged) should be addressed:

  • @godfat-gitlab started a discussion:

    This method was originally private. I noticed this by trying to run the tests you added on the default branch, and got this:

         NoMethodError:
           private method `noteable_kind' called for #<Triage::IncidentEvent:0x000000014565c200

    What do you think about still marking it private to keep it consistent? Of course, that means the tests need to change as well.

  • @godfat-gitlab started a discussion:

    I think we have a test gap here that the event is actually an IssueEvent, rather than an IncidentEvent, and that's why we didn't realize there's an exception will be raised in the processor using IncidentEvent.

    I think we should change that.

    Maybe the processor should also check that if the event is expected based on what we want to react to, in case we might mismatch it in the tests testing the wrong event that will never happen in practice.