Skip to content

Commit

Permalink
Finish Exception Handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Frost committed Jun 18, 2021
1 parent 4aa03bc commit 2de178a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rateLimitMessage

^ 'You have been rate-limited. This GitHub Action will now be paused. Consider providing a token to prevent this.'
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"class" : {
"message" : "ng 6/18/2021 13:55" },
"message" : "ng 6/18/2021 13:55",
"rateLimitMessage" : "BF 6/18/2021 14:51" },
"instance" : {
"defaultAction" : "ng 6/18/2021 13:53" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
action
refreshGitHubAction: aGitHubAction

aGitHubAction refresh
[ aGitHubAction refresh ]
on: ATDDAccessDeniedError
do: [
UIManager default inform: ATDDAccessDeniedError rateLimitMessage.
self pauseTestingEntity: aGitHubAction
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ resumeGitHubAction: aGitHubAction

[ aGitHubAction resume ]
on: ATDDAccessDeniedError
do: [UIManager default inform: 'test' ]
do: [
UIManager default inform: ATDDAccessDeniedError rateLimitMessage.
self pauseTestingEntity: aGitHubAction
]
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"pauseTestingEntity:" : "sw 5/28/2021 15:17",
"pauseTravisStatuses" : "sw 5/26/2021 00:03",
"pauseWatchers" : "sw 5/26/2021 00:04",
"refreshGitHubAction:" : "sw 5/21/2021 21:01",
"refreshGitHubAction:" : "BF 6/18/2021 14:51",
"refreshSelectedGitHubActions" : "sw 5/21/2021 21:02",
"refreshSelectedTravisStatuses" : "swi 7/10/2019 14:03",
"refreshTravisStatus:" : "swi 7/10/2019 14:03",
Expand All @@ -93,7 +93,7 @@
"resultsTravisStatuses" : "sw 5/26/2021 00:07",
"resultsWatchers" : "sw 5/26/2021 00:07",
"resumeAll" : "sw 5/21/2021 21:05",
"resumeGitHubAction:" : "ng 6/18/2021 15:03",
"resumeGitHubAction:" : "BF 6/18/2021 14:51",
"resumeSelectedGitHubActions" : "sw 5/21/2021 22:17",
"resumeSelectedTravisStatuses" : "swi 7/25/2019 15:30",
"resumeSelectedWatchers" : "swi 7/25/2019 15:31",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ applyChanges

super applyChanges.

self gitHubAction resume
[ self gitHubAction resume ]
on: ATDDAccessDeniedError
do: [ self gitHubAction pause ]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ hasValidUrl
client := ATDDGitHubActionsClient new.
client token: self token.
[ client requestOn: 'repos/' , self repositoryUrl ]
on: ATDDAccessDeniedError
do: [ UIManager default inform: ATDDAccessDeniedError rateLimitMessage. ]
on: ATDDNotFoundError
do: [ ^ false ].

^ true
^ true

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tokenHelpLabel" : "sw 5/25/2021 20:51",
"validSlug" : "BF 5/21/2021 14:07" },
"instance" : {
"applyChanges" : "sw 5/25/2021 20:21",
"applyChanges" : "BF 6/18/2021 14:54",
"gitHubAction" : "sw 5/25/2021 19:21",
"hasValidUrl" : "ng 6/18/2021 14:52",
"hasValidUrl" : "BF 6/18/2021 14:52",
"save" : "ng 6/18/2021 14:53" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updateJobs
| id jobs |

id := self parser parseIdOfWorkflowAt: self selectedHistory ofWorkflowsOfRepository: self data repositoryJson.
jobs := self parser parseJobsOf: ( self data client getJsonForJobsForRepository: (self data repository , '/') forWorkflowRunId: id ).
jobs := self parser parseJobsOf: (self data client getJsonForJobsForRepository: (self data repository , '/') forWorkflowRunId: id).

self jobs: (jobs collect: [ :job | ATDDGitHubActionWorkflowJob newForId: (parser primitiveParseIdOf: job)
name: (parser primitiveParseNameOf: job)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"parseSmalltalkCILog:" : "BF 6/11/2021 19:48",
"selectedJob:" : "ng 5/26/2021 14:54",
"updateJobLogForId:" : "ng 6/18/2021 14:43",
"updateJobs" : "ClassTest 5/29/2021 19:12" } }
"updateJobs" : "BF 6/18/2021 14:41" } }

0 comments on commit 2de178a

Please sign in to comment.