How could I find the pull request that belongs to a given task? I’m listening to TaskUpdatedEvent and need to identify the pull request that the task belongs to. I’m a bit lost as to what info in the TaskAnchor will get me to the pull request the task is associated with.
Here are the Task fields.
If I’m not mistaken the context_type value determines if the task belongs to a pull request and the context_id value determines the pull request id?
Thanks Kristy! That solves the problem. Within the Listener context I had to use CommentService to fetch the comment based on the task anchor. Otherwise we’d get a LazyInitializationException.