@@ -14,8 +14,8 @@ import type { ActionConfig } from "./action.ts";
1414import {
1515 dispatchWorkflow ,
1616 fetchWorkflowId ,
17- getWorkflowRunIds ,
18- getWorkflowRunJobSteps ,
17+ fetchWorkflowRunIds ,
18+ fetchWorkflowRunJobSteps ,
1919 fetchWorkflowRunUrl ,
2020 init ,
2121 retryOrTimeout ,
@@ -249,14 +249,14 @@ describe("API", () => {
249249
250250 // Behaviour
251251 await expect ( fetchWorkflowId ( "implode" ) ) . rejects . toThrow (
252- `Failed to get workflows, expected 200 but received ${ errorStatus } ` ,
252+ `Failed to fetch workflows, expected 200 but received ${ errorStatus } ` ,
253253 ) ;
254254
255255 // Logging
256256 assertOnlyCalled ( coreErrorLogMock , coreDebugLogMock ) ;
257257 expect ( coreErrorLogMock ) . toHaveBeenCalledOnce ( ) ;
258258 expect ( coreErrorLogMock . mock . calls [ 0 ] ?. [ 0 ] ) . toMatchInlineSnapshot (
259- `"fetchWorkflowId: An unexpected error has occurred: Failed to get workflows, expected 200 but received 401"` ,
259+ `"fetchWorkflowId: An unexpected error has occurred: Failed to fetch workflows, expected 200 but received 401"` ,
260260 ) ;
261261 } ) ;
262262
@@ -283,7 +283,7 @@ describe("API", () => {
283283 } ) ;
284284 } ) ;
285285
286- describe ( "getWorkflowRunIds " , ( ) => {
286+ describe ( "fetchWorkflowRunIds " , ( ) => {
287287 const workflowIdCfg : ActionConfig = {
288288 token : "secret" ,
289289 ref : "/refs/heads/feature_branch" ,
@@ -315,7 +315,7 @@ describe("API", () => {
315315 ) ;
316316
317317 // Behaviour
318- await expect ( getWorkflowRunIds ( 0 , branch ) ) . resolves . toStrictEqual (
318+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . resolves . toStrictEqual (
319319 mockData . workflow_runs . map ( ( run ) => run . id ) ,
320320 ) ;
321321
@@ -346,15 +346,15 @@ describe("API", () => {
346346 ) ;
347347
348348 // Behaviour
349- await expect ( getWorkflowRunIds ( 0 , branch ) ) . rejects . toThrow (
350- `Failed to get Workflow runs, expected 200 but received ${ errorStatus } ` ,
349+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . rejects . toThrow (
350+ `Failed to fetch Workflow runs, expected 200 but received ${ errorStatus } ` ,
351351 ) ;
352352
353353 // Logging
354354 assertOnlyCalled ( coreErrorLogMock , coreDebugLogMock ) ;
355355 expect ( coreErrorLogMock ) . toHaveBeenCalled ( ) ;
356356 expect ( coreErrorLogMock . mock . calls [ 0 ] ?. [ 0 ] ) . toMatchInlineSnapshot (
357- `"getWorkflowRunIds : An unexpected error has occurred: Failed to get Workflow runs, expected 200 but received 401"` ,
357+ `"fetchWorkflowRunIds : An unexpected error has occurred: Failed to fetch Workflow runs, expected 200 but received 401"` ,
358358 ) ;
359359 } ) ;
360360
@@ -374,7 +374,7 @@ describe("API", () => {
374374 ) ;
375375
376376 // Behaviour
377- await expect ( getWorkflowRunIds ( 0 , branch ) ) . resolves . toStrictEqual ( [ ] ) ;
377+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . resolves . toStrictEqual ( [ ] ) ;
378378
379379 // Logging
380380 assertOnlyCalled ( coreDebugLogMock ) ;
@@ -410,7 +410,7 @@ describe("API", () => {
410410 ) ;
411411
412412 // Behaviour
413- await expect ( getWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
413+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
414414 expect ( parsedRef ) . toStrictEqual ( "master" ) ;
415415
416416 // Logging
@@ -447,7 +447,7 @@ describe("API", () => {
447447 ) ;
448448
449449 // Behaviour
450- await expect ( getWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
450+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
451451 expect ( parsedRef ) . toBeUndefined ( ) ;
452452
453453 // Logging
@@ -484,7 +484,7 @@ describe("API", () => {
484484 ) ;
485485
486486 // Behaviour
487- await expect ( getWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
487+ await expect ( fetchWorkflowRunIds ( 0 , branch ) ) . resolves . not . toThrow ( ) ;
488488 expect ( parsedRef ) . toBeUndefined ( ) ;
489489
490490 // Logging
@@ -502,7 +502,7 @@ describe("API", () => {
502502 } ) ;
503503 } ) ;
504504
505- describe ( "getWorkflowRunJobSteps " , ( ) => {
505+ describe ( "fetchWorkflowRunJobSteps " , ( ) => {
506506 it ( "should get the step names for a given Workflow Run ID" , async ( ) => {
507507 const mockData = {
508508 total_count : 1 ,
@@ -533,7 +533,7 @@ describe("API", () => {
533533 ) ;
534534
535535 // Behaviour
536- await expect ( getWorkflowRunJobSteps ( 0 ) ) . resolves . toStrictEqual ( [
536+ await expect ( fetchWorkflowRunJobSteps ( 0 ) ) . resolves . toStrictEqual ( [
537537 "Test Step 1" ,
538538 "Test Step 2" ,
539539 ] ) ;
@@ -565,15 +565,15 @@ describe("API", () => {
565565 ) ;
566566
567567 // Behaviour
568- await expect ( getWorkflowRunJobSteps ( 0 ) ) . rejects . toThrow (
569- `Failed to get Workflow Run Jobs, expected 200 but received ${ errorStatus } ` ,
568+ await expect ( fetchWorkflowRunJobSteps ( 0 ) ) . rejects . toThrow (
569+ `Failed to fetch Workflow Run Jobs, expected 200 but received ${ errorStatus } ` ,
570570 ) ;
571571
572572 // Logging
573573 assertOnlyCalled ( coreErrorLogMock , coreDebugLogMock ) ;
574574 expect ( coreErrorLogMock ) . toHaveBeenCalledOnce ( ) ;
575575 expect ( coreErrorLogMock . mock . calls [ 0 ] ?. [ 0 ] ) . toMatchInlineSnapshot (
576- `"getWorkflowRunJobSteps : An unexpected error has occurred: Failed to get Workflow Run Jobs, expected 200 but received 401"` ,
576+ `"fetchWorkflowRunJobSteps : An unexpected error has occurred: Failed to fetch Workflow Run Jobs, expected 200 but received 401"` ,
577577 ) ;
578578 } ) ;
579579
@@ -598,7 +598,7 @@ describe("API", () => {
598598 ) ;
599599
600600 // Behaviour
601- await expect ( getWorkflowRunJobSteps ( 0 ) ) . resolves . toStrictEqual ( [ ] ) ;
601+ await expect ( fetchWorkflowRunJobSteps ( 0 ) ) . resolves . toStrictEqual ( [ ] ) ;
602602
603603 // Logging
604604 assertOnlyCalled ( coreDebugLogMock ) ;
@@ -642,14 +642,14 @@ describe("API", () => {
642642
643643 // Behaviour
644644 await expect ( fetchWorkflowRunUrl ( 0 ) ) . rejects . toThrow (
645- `Failed to get Workflow Run state, expected 200 but received ${ errorStatus } ` ,
645+ `Failed to fetch Workflow Run state, expected 200 but received ${ errorStatus } ` ,
646646 ) ;
647647
648648 // Logging
649649 assertOnlyCalled ( coreErrorLogMock , coreDebugLogMock ) ;
650650 expect ( coreErrorLogMock ) . toHaveBeenCalledOnce ( ) ;
651651 expect ( coreErrorLogMock . mock . calls [ 0 ] ?. [ 0 ] ) . toMatchInlineSnapshot (
652- `"fetchWorkflowRunUrl: An unexpected error has occurred: Failed to get Workflow Run state, expected 200 but received 401"` ,
652+ `"fetchWorkflowRunUrl: An unexpected error has occurred: Failed to fetch Workflow Run state, expected 200 but received 401"` ,
653653 ) ;
654654 } ) ;
655655 } ) ;
0 commit comments