Commit b4414f8
authored
fix: notifications processing crash for task triggered pipelines (#601)
## 📝 Description
For task runs there is no hook -> failed processing of pipeline finished
message, this fixes the issue and takes if possible tag and pr names
from hook, otherwise falls back to pipeline data.
#### `logs`
```
INFO 2025-09-22T15:18:44.605829774Z [resource.labels.containerName: notifications] ** (UndefinedFunctionError) function nil.git_ref_type/0 is undefined
INFO 2025-09-22T15:18:44.605831724Z [resource.labels.containerName: notifications] nil.git_ref_type()
INFO 2025-09-22T15:18:44.605834104Z [resource.labels.containerName: notifications] (notifications 0.1.0) lib/notifications/workers/coordinator.ex:29: anonymous fn/1 in Notifications.Workers.Coordinator.PipelineFinished.handle_message/1
```
this issue was present before
#591 was merged also:
```
INFO 2025-09-22T12:33:05.523589599Z [resource.labels.containerName: notifications] ** (UndefinedFunctionError) function nil.pr_branch_name/0 is undefined
INFO 2025-09-22T12:33:15.596608567Z [resource.labels.containerName: notifications] ** (UndefinedFunctionError) function nil.pr_branch_name/0 is undefined
INFO 2025-09-22T12:33:25.758473405Z [resource.labels.containerName: notifications] ** (UndefinedFunctionError) function nil.pr_branch_name/0 is undefined
```
## ✅ Checklist
- [x] I have tested this change
- [ ] This change requires documentation update1 parent 3ba4770 commit b4414f8
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
0 commit comments