Commit cf65302
Add support for repository dispatch notifications to GitHub service. (#393)
* Add support for repository dispatch notifications to GitHub service.
Part of #356
Repository dispatch allows for triggering GitHub Actions via event type
(as opposed to "workflow dispatch", which requires specifying a specific
workflow to trigger). The triggering calls can pass arbitrary data via
"client_payload" JSON.
API docs here: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
Signed-off-by: Daniel Moran <[email protected]>
* refactor(tests): replace assert with require for error handling and update map types to 'any'
- Updated test cases in github_test.go to use require.NoError for better error handling.
- Changed map types from map[string]interface{} to map[string]any for improved type safety.
- Replaced assert.Equal with assert.JSONEq for comparing JSON strings in tests.
- Cleaned up unnecessary lines in github.go.
This refactor enhances code readability and consistency across test cases.
---------
Signed-off-by: Daniel Moran <[email protected]>
Co-authored-by: Pasha Kostohrys <[email protected]>
Co-authored-by: pasha <[email protected]>1 parent f859d51 commit cf65302
2 files changed
+129
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| |||
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
207 | 225 | | |
208 | 226 | | |
209 | 227 | | |
| |||
375 | 393 | | |
376 | 394 | | |
377 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
378 | 410 | | |
379 | 411 | | |
380 | 412 | | |
| |||
447 | 479 | | |
448 | 480 | | |
449 | 481 | | |
| 482 | + | |
450 | 483 | | |
451 | 484 | | |
452 | 485 | | |
| |||
699 | 732 | | |
700 | 733 | | |
701 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
702 | 751 | | |
703 | 752 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
251 | 293 | | |
252 | 294 | | |
253 | 295 | | |
| |||
340 | 382 | | |
341 | 383 | | |
342 | 384 | | |
343 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
344 | 388 | | |
345 | 389 | | |
346 | 390 | | |
| |||
358 | 402 | | |
359 | 403 | | |
360 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
361 | 410 | | |
362 | 411 | | |
363 | 412 | | |
| |||
377 | 426 | | |
378 | 427 | | |
379 | 428 | | |
380 | | - | |
| 429 | + | |
381 | 430 | | |
382 | 431 | | |
| 432 | + | |
383 | 433 | | |
384 | 434 | | |
385 | 435 | | |
386 | | - | |
| 436 | + | |
387 | 437 | | |
388 | 438 | | |
389 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
390 | 465 | | |
391 | 466 | | |
392 | 467 | | |
393 | | - | |
| 468 | + | |
394 | 469 | | |
395 | 470 | | |
396 | 471 | | |
| |||
0 commit comments